Intelligent open air microphones
Would you like to be able to speak to HAL 2000 from various rooms in your house, without picking up a local handset? Would you like it if HAL knew which room you were in and only responded through the speakers in that room? Would you like to be able to use the generic commands in any room like, "Lets watch TV" or "Let there be light" and HAL would turn on the TV or light in the room you are addressing HAL from? Would you like to have the microphone you are speaking at be forced open so HAL could understand you better? Would you like it if HAL could turn off the microphones in a room when a TV or stereo is turned on so you can address HAL from another part of the house? I do all of this with an intelligent open air microphone system. Read on if you want to learn how I did it.
One of the most important aspects of this project has nothing to do with electronics. It has to do with setting your expectations of voice control in an open room environment.
In a quiet environment, you will be able to walk up to any microphone, get HAL’s attention and give voice commands without pressing any buttons. To successfully control HAL, the distance between you and the microphone depends on several factors. First and foremost; how quiet is the environment. If you have a TV or stereo on and expect HAL to differentiate between you speaking and the TV in the background… Forget it. Voice Recognition is not that far advanced.
The success of speech recognition in a room also depends on how "bright" or reflective a room is. For example, I installed a microphone in my bathroom which has a tile floor, and had a very difficult time controlling HAL. This is challenging since the speech recognition engine hears your speech, at the microphone, then milliseconds later, it hears the same speech as it is reflected off the walls and floors. This confuses the speech recognition engine. I’m not saying a tile or hardwood floor cannot used, however you will have to lower the gain and speak much closer to the microphones in these environments.
I have carpet throughout my house and if I speak directly towards a microphone I can reliably control HAL from 10 feet in a quiet environment. Sometimes I can control HAL from 15 feet, sometimes it is 3 feet. It really depends on the reflective properties of the room, microphone placement and background noise.
If you have a party with a lot of people over and expect to show off your ultra cool home automation system, you will have to get everybody to be silent before successfully controlling HAL. Again, the speech recognition cannot differentiate between you speaking and someone else chatting about the weather.
You can have HAL turn on TV’s, stereos or play your MP3 music throughout the house. But once a TV or stereo is on, typically you cannot communicate to HAL since it is filling the room with sound. In this case you can pick up a phone (or use your remote control watch) to communicate with HAL. If you have a very active household communicating to HAL with open air microphones can be challenging . It will be very difficult to get HAL’s attention in the living room if the kids are in the family room making noise. If you can get HAL’s attention this system will force open your microphone, while suppressing the others, but remember before you get HAL’s attention ALL of the microphones are open listening for the attention word. Of course you can always walk over to the microphone mixer and turn off any microphone at any time.
I strongly recommend running two extra wires to each microphone location to install an optional momentary push button switch. This can be used to get HAL’s attention and force open the microphone with a simple quick push of the button when there is noise in other rooms in the house.
It’s also important to set your expectations on cost. First you have to realize I’m pretty cheap. I don’t have the money to spend on a $2,000 audio distribution amplifier. However I’m not going to do all this work and connect it to a $40.00 mixer from Radio Shack. The microphones and mixer are the most important (and costly) components you will choose. Below is a list of components I have used in this project.
Hopefully I haven’t scared you off by now. It’s just important to have your expectations set before investing the time and money into this project. I can tell you that it is all worth while when you can adjust the thermostat in the middle of the night without lifting a finger.
You don't need to have all of the components to start this project. It took me a year to save and install all of the features. However if you do decide to purchase all of the components you can probably have them installed over the course of a few weekends. At a minimum, you will need the microphones, mixer, speakers and audio amplifier. You can then later add the Ocelot, SECU-16 and RLY8-XA module that will provide the intelligent control over the system.
Mixer and MicrophonesShure SCM-810 Documentation Shure SCM-410 Documentation
The mixer and microphones are the most important components of the system. If your voice is received at the sound card with buzz, hum or choppy audio HAL will not be able to easily understand your commands. To accomplish all of the features listed in this article you will need a Shure SCM-810 (8 channel) or SCM-410 (4 channel) Automatic mixer. These mixers have many important features for home automation use that most mixers don’t support:
The most import feature of all is the mixers logic input and output support. This is accomplished with a DB-25 connector on the SCM-810 or a DB-15 connector on the SCM-410. These are NOT RS-232 connectors. We will use this input/output to connect to the Ocelot’s SECU-16 modules. This will allow HAL 2000 to be able to:
1. Force a microphone open. (Override) 2. Force a microphone closed. (Muting) 3. Detect which microphone is being addressed. (Gating)
These capabilities are necessary to make HAL aware of what room you are in when you get HAL’s attention so he can hold open that microphone and only open the speaker in that particular room. It is also very useful to automatically shut off certain microphones when someone turns on a TV or stereo in a specific area of the house. This allows you to still be able to address HAL from another room that isn’t affected by the TV or stereo noise. (Without this feature it would be close to impossible to get HAL’s attention since the active microphone would be captured by the TV or stereo.)
Some of the best microphones for home automation use are the Crown PZM series microphones. These microphones are powered by the mixers built in "phantom power" and are optimized for speech. The two microphones to consider are the PZM-11 (Wall mount) which is your best option, or secondarily your installation may require a PZM-10 (ceiling or table top mount). The PZM-11 is by far your best installation option. It looks like a standard wall switch and can be mounted in a single gang electrical box that can be painted to match the décor. The PZM-11 can be mounted in the ceiling but this is not recommended as the distance from the user is further and the reflective properties of the room are worse from this location. I do have most of my microphones installed in the ceiling so I know it can work, but you will get much better results locating your microphones at a level is equal to your mouth and where you can get within arms length of them. The closer you can get to your microphone the better the recognition will be and this will also allow you to turn down the gain on the mixer. This will reduce the amount of background noise that is picked up by the system.
The quantity and placement of the microphones throughout the house is important to consider. Too few microphones and you will not be able to cover the area that you wish, too many and you may be picking up a lot of noise sources that you will have to deal with. Ideally you want to place these microphones in an area that is close to the user and away from any potential noise sources. I strongly recommend you experiment with different location BEFORE you install the microphones. Simply connect the microphone to the mixer and run the wires throughout the house. Use tie-wraps to hold the microphone in place and get a feel for each proposed location. Consider where you spend most of your time in each room. You want the microphone as close to the user as possible and away from any noise sources. Think about the future if the furniture is re-arranged. You wouldn’t want a couch to cover the microphone if it were moved to a new location. In the master bedroom place the microphone close to the bed. You will be at your laziest while lying in bed and find this system most useful from this position. If you have to choose, place the microphone near your side of the bed. Don’t be fooled to think that your spouse will be controlling the house by voice as much as you will.
Place the microphone in a position where you can speak directly at it. If you have to turn your head unnaturally this can stress your speech and reduce the accuracy of the speech recognition.
Locating the speakers is not as critical as locating the microphones, however you do need to consider a few things. I installed a 6" diameter speaker next to each microphone in the ceiling. I have since learned it is best to separate the microphones from the speakers whenever possible. Now that I have implemented the intelligent control of HAL and the computers responses are not broadcast to every speaker in the house, this is not so much of a problem. Before, the other microphones would be captured so when you started speaking again portions of your speech would not be heard. So if you plan on using an automatic mixer, but will not be adding the intelligent control, be sure to adequately separate the microphones and the speakers.
Be sure to place the speakers in an area where you can hear HAL’s responses. Also consider that HAL will sometimes make "global" announcements on all speakers throughout the house like reminders or announcing the calling party (caller ID). You want to adequately cover the house.
Round speakers are typically installed in ceilings and rectangular speakers are installed in walls, since rectangles match picture frames and circles typically match light fixtures.
You will also have to consider whether to install 1 speaker (mono) or 2 speakers (stereo) in each room. I have only 1 speaker in each area, but the way I have laid them out (left channel then right channel in groups) this gives a stereo effect when playing my digital music on the HAL Digital Music Center. For example, I have the left channel in the bedroom and the right channel in the bathroom. When the door is opened between the two you hear perfect stereo sound. The trick is simply in the wiring back at the control box. Keep in mind a single RLY8-XA can only switch 8 speakers total. If you will be installing 8 pairs of speakers for stereo sound you will need to install and configure 2 RLY8-XA Adicon units.
I mentioned the HAL Digital Music Center add-on which can "voice enable" your entire MP3 and WMA music collection. In addition there is a very cool feature that allows you to specify the music location with voice control. For example you would ask HAL to "Play oldies on the downstairs speakers". Then HAL would switch open only the downstairs speakers and play all of the MP3’s that had the genre of oldies. This is a compelling reason to have the ability to control your speakers with an RLY8-XA.
Wiring your speakers and microphones
This is where we get to have some fun! Don’t be afraid to tackle this on your own. Running wires through your attic and walls puts hair on your chest!
If your house is not built yet, you are in a "bit of" a better position. I said, "bit of" because you have not lived in the house and may not be able to envision the best microphone locations until you do. However, you do have the advantage of having a contractor (or yourself on a "midnight run" just before the drywall is installed) run microphone and speaker cable from each room to your control room.
If you have an existing house and you can’t fit through the attic door anymore, you can contact a local professional to install the necessary cable runs for you. If you can’t find a local home automation professional in your area, look up a service company that routinely runs wires. Computer networking companies and alarm installation professionals are used to installing wires in existing homes. Perhaps you can convince an installer to wire your home as a "side job".
Whether you or a professional install these cables it is very important that the correct cable is used and it is installed correctly.
Shielded cable must be used for microphones. I recommend running a cable that supports 4 conductors + ground. While the microphone only requires 2 conductors + ground, the extra two wires can be used to install a momentary push button in the microphone. This can be optionally used to get HAL’s attention if there is a lot of noise in another room in the house. You would just have to tap the button and HAL could be configured to go strait into listening mode. If you have an active household with kids I strongly recommend this option. These two wires would simply connect to the second SECU-16’s digital input.
Whatever you do, do not use these two extra wires for your speakers. The current that travels to power the speaker may inductively couple to your microphones and create noise to the sound card. When running you microphone cable make sure you (or your contractor) does not run this cable parallel to any AC 110 volt power cables. This could induce noise into the system.
When connecting your microphone cables to your mixer be sure to observe the correct polarity. Carefully review the documentation of both the mixer and microphone. Be consistent and follow the same color scheme on all microphones. If you are installing any PZM-10 microphones, you will need to solder a XLR female connector to the cable that will attach to the microphone. The PZM-11 microphones have convenient screw on connectors and do not require any additional connectors. If you are connecting to the SCM-810 you will connect the cable to the supplied "screw-in" connecting blocks. If you are connecting to the SCM-410 then you will need to solder the cables to a male XLR connector.
Connecting mixer to sound card
After you connect your microphones to the mixer you will then need to connect the mixer to your computers sound card.
If you are using a SCM-410 you will want to purchase this ready made Female XLR to 1/8" Male Stereo Cable. Connect the 1/8"phone jack to the "Mic Input" on your computers sound card. (Not your HAL modem.)
The SCM-810 uses a "screw-in" connecting block so you will need to cut off the XLR side of the cable and connect the 3 wires to the line output of the mixer. Since this mixer has a line level output and not a mic level output, it will be necessary to connect the 1/8" phone jack to the "Line Input" on your computers sound card. (Not your HAL modem.) If this cable is not available you can use any good shielded cable with a male stereo 1/8 phone jack. Use the wiring diagram below.
Wiring of sound card to SCM-810
You must also open your windows sound mixer, select the properties for "recording" (not playback) and mute the microphone input and un-mute the "line input" option. Depending on your sound card this is usually done by placing checkmarks in the MUTE checkbox under the source.
SCM-810 Recording inputs
Next you will need to set the following dip switches on your respective mixer.
If you are installing the SCM-810 there are eight 3 position switches located just above each microphones input connecting block. Be sure these switches are in the center position. This will enable the "phantom power" required to power the microphones.
Adjusting the sound level coming into the sound card is the single most important adjustment for good speech recognition. There are 3 different controls that affect the level of the sound input.
1. The microphones gain control for each individual microphone. 2. The Master gain control located on the mixer. 3. The line input (SCM-810) or mic input (SCM-410) located in the recording properties of the windows mixer. ß This is the most important to fine tune.
Just so you have a beginning reference, I have my individual microphone gain levels set to a value of 4. The master gain control is set to a value of ZERO and the slider bar for my line level input is set to about 50%. Some soundcards support a "mic-boost" option. If you are using a SCM-410 you will want to turn this "mic boost" option off. These settings will get you in the ball park, however you will want to take some time to fine tune each individual microphone for each room. Start with the sound level input in the windows mixer, it is the most important adjustment.
If HAL is having a hard time understanding your speech, try lowering the gain rather then raising it. I have found this often works best. Use the windows sound recorder to record your speech from these microphones and play it back. You should not hear any hum, hiss or buzz. If you do, work to correct the problem.
Now that the microphones are connected and should be working, it’s time to connect the speaker system. How are we going to hear HAL’s responses throughout the house? With a simple low cost approach.
I am using a very old Onkyo brand stereo receiver that I have had around forever. Most people over the last several years have upgraded their stereo system to digital Dolby 5.1 surround and therefore have their old stereo receiver. This receiver is simply used as an amplifier for our speakers. If you don’t have one, Ebay is an excellent source to purchase a good used receiver. Be sure to get the remote control since you can use it to teach the Ocelot IR commands to control the receiver for other projects.
First, we have to connect the sound card to the stereo receiver. Connect the (1/8" Stereo Phone Plug to (2) Phono (RCA) Plugs) cable to the "line output" of your computers sound card (Not the HAL modem). Then connect the "RCA" style connectors to the "CD-input" or another unused line level input on your stereo receiver.
Since the number of speakers active at one time will be constantly changing depending on what HAL is doing, we will need to protect the amplifier. A speaker selector will be used to provide impedance protection to the amplifier. This will keep the impedance equal no matter if we have one speaker open or all eight and keep us from smoking the receiver. The lowest cost solution I could find is a Sima SSW-4 stereo speaker selector. If you choose a different speaker selector make sure it has impedance protection .
Connect the left and right primary speaker output of your receiver to the respected speaker inputs on the Sima SSW-4. Be sure to observe proper polarity when making these 4 connections.
Your speaker choice should be based on personal preference and décor in the room. As mentioned before, round speakers should be mounted in the ceiling and rectangular speakers should be mounted in the walls. In either of these locations you will need to use a stud finder to locate, and avoid, any studs. From the room I was able to approximate my speaker locations and then from the attic I was able to locate the studs. From the attic, I drilled a starter hole in a location that had plenty of clearance for my 6" diameter speakers. Then from the room I penciled in a circle using the supplied template keeping the pilot hole on the inside of the circle. Next I used a standard jigsaw to cut out the hole.
If you use a standard Jig Saw to make the speaker cutout, do not let the base of the Jig Saw come in contact with the ceiling. It will leave scratches and scuff marks. Rather, suspend the saw so that the base is inches away from the ceiling. The speed of the blade is fast enough that it will make a clean cut as you guide it by hand.
The speaker wire you choose, is your preference. I would suggest a two conductor wire that is easy to determine polarity. Don’t waste your money on expensive speaker wire. Buy a twisted strand wire so it is easy to bend and connect to the speaker terminals. This is especially important when making the connection to the RLY8-XA. If you buy "monster" cable, you will regret it when you have to make these connections. As mentioned before, DO NOT wire your speakers from the same cable as your microphone connections as this may induce noise into the sound card.
Route your speaker cable thought the hole and make your connections. Be consistent in the color scheme on all speakers. I connected the black wire to (negative -) and the white wire to (positive +) on all my speakers. Mount your speaker as per the instructions that came with your speakers.
HAL must be able to control your speakers, therefore we need to be able to turn on and off each individual speaker. This will be accomplished with an Adicon RLY8-XA normally open 8 relay controller. It is paramount that you use a normally open relay controller, here’s why:
When addressing HAL with the attention phrase it is quicker to turn on 1 speaker than to turn off 7 speakers. The time it takes to turn on this 1 speaker will be a delay between you saying the attention phrase and HAL responding "YES". If you were to use standard normally closed relays the speakers would always be ON. Then when you addressed HAL you would have to switch 7 relays to "close" the other speakers. This would cause a very long delay between you saying the attention phrase and HAL responding "YES".
Don’t attempt to use X-10 controlled relays for your speaker switching. They will not switch fast enough. We need the speed and accuracy of a serial port connection.
Carefully review the schematic of the RLY8-XA and identify relays 1 – 8. It is important to organize your connections as I have in the chart below. It will be important later when we add the devices and create rules in HAL.
NOTE: Relays 1-8 are actually relays 0-7 when we address them electronically.
Identify the common (C) connection and the normally open (NO) connection of each relay. These two points of each relay will be used to turn on and off each speaker. Connect your speakers (Positive +) wire for each room through this relay. I connected the speaker side to the (NO) connection and the (C) to the respected connector on the Sima speaker selector. The normally closed (NC) side of each relay is not used. The (negative -) speaker wire is not switched and will be connected to the corresponding (negative -) terminal on the Sima speaker switcher. Repeat this for all 8 speakers. Be sure to enable impedance protection on the Sima speaker selector.
NOTE: Since the relays are NOT yet energized you will not hear audio through your speakers.
Connecting the mixer to the Adicon SECU-16’s
The SCM-810 and SCM-410 microphone mixers have logic level outputs and inputs that are essential in controlling the open air microphones. Unfortunately this is not plug and play. You will have to make a cable that will connect the mixer to the SECU-16 relays and sensors. If you are wiring an SCM-810 I recommend buying a DB-25 cable (full 25 conductor) and cutting off the male connector. This will expose the 25 connections we will need to connect to the 2 SECU-16 modules. If you are wiring an SCM-410 you will need to purchase a DB-15 female to male cable with all 15 conductors. If you will be making this cable by hand, as I did, you will want to purchase a flexible 8 conductor cable (SCM-810) or 4 conductor cable (SCM-410). Each cable will be used for the 3 different connection types; gate, override and mute. Assign a wire color to each microphone input number for each of the 3 connection types. See the wiring matrix I used below to keep things in order.
SCM-810 Cable made from DB-25 cable. (Alternative cable : Go Cables)
Two SECU-16’s are needed since each module only supports 8 relays and 8 sensors. The second module will be used for the mixers mute function. This is important to shut off a microphone when a TV or stereo is turned on.
NOTE: If you are using an SCM-410 then only 1 SECU-16 module is needed to connect all 3 function groups.
Wiring the microphone sensors
Once your mixers logic cable is prepared we can start to make the connections. Carefully review the SECU-16’s schematic before you proceed. Remove the power to the first SECU-16. Remove the 4 screws and take the top off. The SECU-16 can be configured for analog or digital sensor inputs. Remove all 8 internal JUMPERS to configure all of the inputs to analog. Connect the mixers #1 channels GATE OUT to the #1 sensor input on the SECU-16. Continue to connect the remaining 7 GATE OUT connections from the mixer logic to the remaining 7 sensors inputs on the SECU-16. Be careful to follow the schematic on the SECU-16. It is easy to incorrectly connect a wire to the "common" connection on the terminal block.
Now we can connect our 1.5 volt power supply to the mixer and SECU-16. We MUST use a 1.5 Volt power supply. Do not substitute any other voltage. The default settings of the SECU-16’s analog inputs will not work with any other voltage. You will need to cut off the barrel connector that came with the power supply. Using a standard volt meter, identify the positive (+) and negative (-) wires on the power supply. Connect the positive wire of the power supply to the logic ground (pin 13 on the SCM-810 or pin 5 on the SCM-410) of the mixer. Important: This is NOT chassis ground! Next connect the negative (-) side of the power supply to any of the open "common" connections on the SECU-16’s sensor input connecting block. See photo below. Keep in mind the mixers logic ground still need to make 2 other connections, so consider this when running this wire.
Connecting override (force open) wires to SECU-16
Before we can connect the 8 override wires to the SECU-16’s relays we need to make 7, 2-inch jumpers. These will be installed in the SECU-16’s relays and used to BRIDGE one side of each individual relay to the mixers logic ground. Follow the schematic below and carefully install your jumpers.
Locate the override group of 8 wires from the mixers logic. Install the override wire for microphone 1 to the unused terminal for relay 1 (that does not have the jumper installed.) When activated, the relay will bridge this wire to the logic ground and force open the microphone. Continue to wire the remaining 7 connections in this fashion. (3 if wiring the SCM-410)
Now we must install the logic ground to the SECU-16 jumpers. IMPORTANT: You must install a diode in line with the logic ground. The cathode (black color band) must be facing away from the SECU-16. The anode side of the diode will be connected to the first terminal in the relay where a jumper is installed. Solder the mixers logic ground to the cathode (black color band) side of the diode. See the picture below. This diode is required to isolate the power supply from the other two circuits utilizing the same logic ground.
Connecting mute wires to SECU-16
Since that was so much fun we get to do it all over again. Since the mute function of the mixer operates identically to the override function we will take the identical steps as above, except you will wire the 8 MUTE wires to the 2nd SECU-16 set of relays. Just as before we must install our jumpers to bridge our logic ground between the relays of this module and we must as also install the diode and logic ground exactly as above. Be sure to connect the #1 mute wire to the #1 relay of the 2nd SECU-16 module and so on until all 8 wires are connected. (If you are wiring an SCM-410 you will connect the 4 mute wires to relays 5-8 on the first SECU-16 module.)
If you optionally installed momentary push buttons to get HAL’s attention in noise environments you will wire these to the 2nd SECU-16 logic inputs. You must leave the built in jumpers installed so the inputs are set up for digital "supervised’ inputs. You will connect one side of the momentary switch to a sensor input and the other side to any of the available common connections. You must use the resistors that came with the SECU-16 module and connect the resister across the common and sensor input wire. (If you are wiring an SCM-410 you will use the 4 remaining sensors from the 1st SECU-16 module. Just be sure these sensors have the internal jumpers installed to enable digital inputs.)
It may be more convenient to connect this resister across the terminals of the push button installed within the PZM-11 microphone.
You can later associate these sensors with an action to get HAL’s attention and "force open’ the microphone and speaker with just a tap of this button.
Configuring and testing the Ocelot and SECU-16 modules
Connect the Ocelot to your computers COM port. Carefully review the documentation that comes with the Adicon units and connect the RLY8-XA and SECU-16’s to the Ocelot. Double check your connections before applying power.
Note: You can use 1 power supply for ALL of your Adicon modules, however it needs to be able to support enough current to run all of your modules. You will not be able to run all your modules off of the supplied transformer that comes standard with the Ocelot.
I use one power supply for the Ocelot and SECU-16’s and a separate power supply for the RLY8-XA.
Once the connections are made and power is applied you can start the CMAX software utility that comes with the ocelot. Set the COM port and select "Attach to CPUXA" under the comms menu. In order for the sensors to work properly with HAL 2000 you must download and install the latest BIN file (firmware) for the Ocelot. Download the file to the same directory where your CMAX software is installed, then "attach to the CPUXA". From the CPU-XA menu select "Reload CPUXA Executive". This will install the latest software into the Ocelot.
Now you will have to address your 3 new Adicon modules. Addressing is done through the CMAX software not in HAL. If you already have Adicon modules addressed to the Ocelot, you will need to address them again since the addressing routine addresses all of the modules connected to the Ocelot. (If you do have existing modules and wish to keep the same addresses for these modules, be sure to address them in the order that they were previously addressed.) Remove the cover from all of your Adicon modules and be prepared to press the "Auto Address" button on each module. From the "CPUXA Utility" menu select "Auto Address Modules". Next, press each modules "Auto Address" button in the desired sequence.
IMPORTANT: Write down the address assigned to each module you will need this to set up HAL.
Once the modules are addressed they will appear in the CPU-XA access window. You should be able to manually control each relay and see the sensor transitions when a microphone is opened or closed.
NOTE: When a microphone is open (on) the Ocelot will report OFF, when it is closed (off) the Ocelot will report ON. This is important to remember when building rules in HAL.
Be sure to test all of your relays and sensors, if they do not work properly with the CMAX software they will not work properly with HAL. Once you have verified all your relays and sensors are working exit the CMAX software and start HAL 2000.
If you have never used the Ocelot with HAL 2000 you will need to open the "HAL System Settings" and select "Input / output". Next, select the "Adicon Ocelot / CPU-XA" from the list. Place a check mark next to the "Enable Adicon 2500 IO" and select the COM port that is attached to the Ocelot. If you will be using the Ocelot for your X-10 communication (using a TW-523 module), be sure to select enable it from the X-10 settings menu. You can also assign the Adicon Ocelot as your IR controller under the "Infra Red / Home Theater" settings menu. Restart HAL.
Creating devices in HAL
Now it is time to create your new devices in HAL. This will allow you to associate a friendly name like "Master Bedroom Speakers" to module 5 relay 1. That way you can use the friendly name when building rules or speaking to HAL. This will need to be done for all 8 speakers, 8 microphone override and 8 microphone mute relays.
From the "devices" window in the "HAL Automations Setup" screen press the "Add" button to create a new device. Lets start with the speakers. Give a friendly name to each speaker like, "Kitchen Speaker" or "Master Bedroom Speaker". If you do not see your room name listed simply type it directly into the text box.
When naming devices be sure to separate each word to enhance the voice recognition of HAL. Do not name a device bedroom name it bed room. Put the word room in the "optional" box in HAL.
Type in SPEAKER for the device. Under the TYPE selection be sure to select "Relay Automation" from the drop down list since are controlling a relay. Press the "Next" button to advance to the next screen.
Now select the "Adicon Ocelot / CPU-XA" from the drop down list and press the "Next" button.
This is where we must tell HAL which device (UNIT) and relay (OUTPUT) we want to control. Identify the ADDRESS that was given to your RLY8-XA and enter it as the UNIT NUMBER. Now identify the relay that you wish to control.
Important Note: Remember the relays numbers are numbered from 1-8 but the logical control are 0-7.
Enter the logical relay number in the OUTPUT box. At this point you should be able to turn the relay on or off by pressing the ON and OFF button from this window.
If you remove the cover of the RLY8-XA you will see a LED light turn on with each relay. You should also hear a pronounced "click" when the relay changes states.
After you verify this is working press the "Next" button.
Select your desired confirmation preferences and press "Next".
Create a new group called "SPEAKERS" then add it to the "Associated groups" box. This will allow you to turn on all 8 speakers as a group with a single group command. Be sure to add all 8 of your speakers to this group. Now select "Finish".
Repeat this for all 8 of your speakers, 8 microphone mute and 8 microphone override relays. Be sure to assign friendly names to the correct address (Unit) and device (output). When testing the relays on the SECU-16 you will not hear a "click" since these relays operate silently. You will have to verify the action through a change in your mixer.
When naming your devices or sensors in HAL 2000, be consistent with each location. For example in the family room I have used the following names;Family Room Speaker Family Room Mute Microphone Family Room Open Microphone Family Room Microphone (Sensor)
This will help you keep track of the many devices and sensors as you create rules in HAL2000.
Microphone Sensors in HAL
Now we must add the microphone sensors in HAL. From the SENSOR window in HAL select the "Add" button to create a new device.
Type in the desired name then select the "Adicon / Ocelot CPU-XA" from the drop down list and press the "Next" button.
Now we must enter the address of the SECU-16 device where our microphone sensors are attached into the UNIT NUMBER selection. Next you must enter the corresponding input number for the sensor you wish to control. Remember these are listed from 0 – 7 for sensors 1- 8. You must enter the logical number. After you have entered these values press "Finished". Repeat these steps for the remaining 7 microphone sensors.
RULES in HAL
Now that we have the hardware installed and the devices and sensors defined in HAL, we can create the rules that will tell HAL how to control everything.
We will start with the easiest rules first: To be able to mute a microphone when a TV or stereo is turned on in certain locations. To accomplish this you will need a way to signal HAL when a TV or STEREO is turned on. One inexpensive way to do this is to build a TV Power Sensor that can send an X-10 signal to HAL when a TV is turned on or off. Once this hardware is in place you can create an "Family Room TV" sensor in HAL that will be used as our rules trigger event (TE).
When naming similar rules always start the rule name with a description of the purpose. This will group "like" rules together since the rules are sorted alphabetically.
Create a new rule and name it something like "Mute Family Room Microphone". Next add a Trigger Event (TE) based on the "Family Room TV" sensor turning ON. Next add an ACTION that will turn ON the mute function for each microphone that can be affected by the TV noise.
Now it is important to create an opposing rule that will turn the microphones back on when the TV is turned off. You will need to create as many rules as necessary to cover the microphones and devices in your house.
A single rule can have multiple Trigger Events therefore if you have a TV and stereo in a single room you can add them to the same rule but as separate Trigger Events to fire the same action. (To mute a microphone when they come on and un-mute them when they turn off.)
If you do not choose to add this functionality into your system it will be near impossible to get HAL’s attention from one room when a TV or stereo is on in another room.
Our next set of rules will do two things; it will open the speaker and capture the microphone when you speak the attention word in a specific room. This rule is a bit more complex as it uses secondary conditions and flags to operate.
First you will need to create a new FLAG from the sensor screen.
Select "Add" and type the name "Microphone Forced Open" then select FLAG from the drop down list. Press the "Next" button to advance to the next screen.
Select "default value" = FALSE and "save value flag" = NO. Select "Finish" to create the new flag.
You must now create a rule for each microphone that looks like this:
Here is how it works. When HAL is not in listening mode all of the microphones are listening for the attention word. When you speak the attention word (and before HAL responds) HAL fires the "Listening via MIC starts" event. Each rule that has this trigger event fires. If the secondary event is true, in our case the microphone is in the OFF state, (remember this really means ON since the Ocelot reports this opposite), and the "Microphone Forced Open" flag is false, then the actions are carried out. In this case, setting the "Microphone Forced Open" flag to TRUE (so no other rules fire) and opening the speaker and holding open the microphone that is being addressed.
Note: These rules add about a 1 second delay between the time you say the attention word and the time HAL responds. This delay time will vary depending on the speed of your computers processor.
Now we must create the rules that will close the speaker and release the microphone when we say goodbye to HAL.
Handling global and independent speaking events
Since our speakers are normally closed we will need to create a couple of rules that will allow HAL to turn on all your speakers when he has something to say.
First create a new flag called "Suppress Speakers". This will allow you to suppress the "global" speaking event if you want to direct audio into one particular room. (More on this in a bit.) Next make a rule using the Speaking Event as a trigger that will turn on all speakers.
This rule will only fire then HAL is not in listening mode and a TTS or WAV event is about to play. This will open up all your speakers BEFORE the audio is played.
Important: Make sure you added all your speakers to the "Speakers" group.
Now you have to create a rule that will do just the opposite; closes all the speakers when HAL is finished speaking.
If you wish to play a wave file or TTS event in just one or more specific rooms (while HAL is not in listening mode) you will need to utilize the "Suppress Speakers" flag so the global speaking event does not fire. This may come in handy if you wanted to create "wake up" announcements at different times in different rooms. Use this rule as an example on how to do this.
Well that about does it, hopefully this gives you some idea of the power an capability of HAL 2000 with open air microphones.