|
|
|
|
View a diagram of this project. If you browser has problems use this diagram. 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. ExpectationsOne 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.
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 DocumentationThe 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.) MicrophonesSome 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.
Speaker PlacementLocating 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.
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 microphonesThis 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 cardAfter you connect your microphones to the mixer you will then need to connect the mixer to your computers sound card. SCM-410 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.) SCM-810 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.
SpeakersNow 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.
Speaker InstallationYour 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.
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.
Speaker SwitchingHAL 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’sThe 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 sensorsOnce 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-16Before 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-16Since 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.)
|