AUTOMATING YOUR HOME THEATER I love my home theater system, but I used to hate getting it ready to show a movie. The process involved numerous steps using three different remote controls. Thanks to home automation, I can now set up the whole system by pressing only one button! This article describes how you can do the same thing. It also discusses many of the details that must be considered to achieve a professional-quality system. HARDWARE CONFIGURATION First, your home automation controller (prefarrably HomeVision!) must be capable of sending infrared (IR) signals to your home theater equipment (television, stereo, VCR). Note that this article describes using a VCR, but any video source (laser disk, satellite dish, etc.) can also be used. For this example the HomeVision controller, which has two-way IR capability, will be used. However, most of the issues discussed apply equally well to other controllers with similar capabilities. Infrared Output The best way to configure the system for IR output is to attach an IR connecting block to HomeVision’s rear IR transmit jack, and then connect mini-emitters to the IR connecting block. The mini-emitters have a self-stick surface that is used to attach them to the IR receive windows on each piece of equipment that needs to be controlled. In this example, a mini-emitter will be attached to the TV, VCR, and stereo receiver. Alternatively, a "whole room" IR transmitter can be connected to HomeVision and placed so that it points at the home theater system. However, the mini-emitter set-up is generally the most reliable, because the IR signal will always be received by the equipment. With the room transmitter, there is a chance that the signals could be blocked (perhaps by someone standing in front of it). If any of the equipment is mounted behind closed, solid doors, then mini-emitters are the only practical option. Knowing Equipment On/Off State It is important that the automation controller be able to determine the current state of the home theater equipment. Since most equipment uses one infrared signal to toggle between on and off, the controller must know whether the equipment is already on or not. A few electronic devices have separate signals for on and off, but these are uncommon. The current states of the TV, VCR, and stereo receiver can be determined through the use of several types of special "probes": • For the TV, a high frequency electromagnetic energy detector probe (such as the SmartLinc TV Sniffer Probe) is used. The probe is placed behind the television, and detects the energy emitted by the TV whenever it is on. Note that these probes sometimes have a slight delay before they detect the TV changing state. In particular, it may take several seconds before they detect when the TV is turned off. • A video signal probe is used for the VCR. This probe connects to the video out jack on the VCR and detects the presence of a video signal on the line. A "Y" connector is used so that the video output jack can be attached to both the probe and your stereo receiver or TV. • An AC voltage detector probe is used for the stereo receiver. This probe is plugged into the switched power outlet on the stereo receiver. If you are using the switched power outlet to provide power to other devices, a "T" power adapter or an extension cord can be used to connect both the probe and the other devices. Each of the three probes is connected to a digital input on the home automation controller. For HomeVision, the probes can be connected to the Port B terminal block (or Port C if it is configured as an input port). Each probe has a three wire connection: power, ground and signal. HomeVision provides common power (Port C terminal 9) and common ground (Port B terminals 9 and 10, and Port C terminal 10). All three probes' power wires are connected to Port C terminal 9, and all three ground wires are connected to any of the common ground terminals. Then each signal input is connected to a separate digital input line. For example, the following connections could be made: • • • TV probe: VCR probe: Stereo probe: Port B terminal 1 Port B terminal 2 Port B terminal 3 Lowering Projection TVs or Screens If you have a projection TV, you may need to lower the projector and/or the screen from the ceiling. How you do this depends on how the device interfaces to the home automation controller. Here are some options: • • • • An IR signal to command the device to lower. An X-10 signal to command the device to lower. An X-10 signal to trigger a Universal module which closes relay contacts and initiates the movement. A relay connected to HomeVision's Port A relays drivers. The relay may simply trigger the movement, or it might directly drive the motor. Depending on the control method, the controller may need to determine whether the projector or screen is already in the lowered position. An alarm contact switch (such as the ones used to tell if a door or window is open or closed) can be tied to one of the controller’s digital inputs and used to check the current position. You could even use two switches, one to indicate fully lowered, another to indicate fully raised. Other Equipment You may also wish to automatically control other devices such as: • • • Lights Draperies or mini-blinds Curtains in front of the TV screen (for those with a real high-end theater system!) AUTOMATION CONTROLLER PROGRAMMING Now that the hardware configuration is complete, we can turn our attention to programming the controller to perform the desired actions. If you're using HomeVision, we recommend putting all the actions into a macro called "Home Theater". It will then be easy to trigger the macro in a variety of different ways. Action Sequence The first step is to determine exactly what functions you want the controller to perform when the Home Theater macro is run. For instance, you may choose the following sequence of events: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. send stop signal to VCR (in case tape automatically started when it was inserted) turn on TV mute TV (or lower volume to lowest setting) set TV to VCR input (Aux 2 for this example) turn on stereo receiver mute stereo receiver set stereo receiver to VCR input set the stereo to surround sound mode set stereo receiver to default volume send play signal to VCR close drapes and blinds turn off room lights At first, developing the sequence of events may seem easy. However, many factors must be considered in order to provide a professional-looking and reliable system. The following paragraphs discuss some of the things that should be considered when developing a home theater macro. Starting the Tape Although the home controller can do almost anything, it can't put the tape in the VCR! In many cases, the VCR will automatically turn on and start playing when a tape is inserted. If your VCR works this way, you may want to assume that the VCR is already on and playing when the home theater macro begins. However, you may then want to issue a "stop" command at the beginning of the macro, and a "play" command at the end. This ensures that you don't miss any of the movie while the stereo and TV are being set up. You can also check the on/off state of the VCR power probe, as is done for the TV and stereo receiver in this example. Turning Equipment On If the TV is already on, we don’t want to transmit the “TV - Power” IR signal, because that will turn the TV back off! Instead, we must check the TV’s state by reading the associated digital input port, and send the “TV - Power” IR signal only if the TV is off. After turning the TV on, the controller may need to wait a certain amount of time before sending another command to it, because the TV may not be ready to receive another signal yet. The controller can be put into a delay, or it can do something else such as turning off lights and then return to setting up the TV. You may need to experiment to determine the best amount of time to wait. The same things hold true for the stereo receiver. Avoiding Unnecessary Noises Since we are going to be using the stereo, we don’t want any audio from the TV. Muting the TV is usually the easiest way to do this. Unfortunately, some TV displays the word “MUTE” on the screen whenever it is muted. Since we don’t want to see “MUTE” throughout the movie, we must instead turn the TV volume all the way down with these TVs. This can be done by sending the “TV Volume Down” IR signal multiple times (several more than the maximum volume level should work fine). Again, you should experiment to determine the correct number. When the stereo is powered up, there is no way of knowing what mode it is in. (It may have been tuned to the heavy metal radio station at full volume!) We recommend muting the stereo receiver as soon as possible after turning it on. This can be accomplished several ways such as using the "mute" command or tuning to an input, such as the phonograph, that should be off. This prevents blasting your audience with loud noise. Setting the Volume Level To set the desired volume level, you'll probably have to turn the volume all the way down and then back up to your desired level. This is necessary because there is usually no way to determine the initial volume level. You can do this quickly using HomeVision's "Transmit IR Signal ## Times" command. This command inserts a short delay between the IR signals, and this delay is sufficient to work with most devices. Unfortunately, for some equipment, sending multiple volume signals this way may not always change the volume the exact same amount each time. The effect depends on the precise timing between the signals. You should test your macro several times to see if the final volume level is consistently right. If not, you may have to transmit the volume up signal one time, then delay a short while (100ms - 200ms will usually work), then repeat these steps the desired number of times, as in this example: Transmit IR signal #39 (Stereo - Volume Up) once Delay for 0.100 seconds Transmit IR signal #39 (Stereo - Volume Up) once Delay for 0.100 seconds Transmit IR signal #39 (Stereo - Volume Up) once Delay for 0.100 seconds etc. Although this is more cumbersome than using a single command, it may achieve more consistent performance. Selecting the Video Input Source Depending on how your video source is connected to the TV, you will need to select the correct TV input. If your VCR output video is being modulated onto a certain TV channel (such as channel 3), then the IR signals to select this channel should be sent (for example, “TV - 0” and “TV - 3”). For our system, the VCR output is routed to the TV’s second auxiliary input, so we must select that input. Our TV uses one IR signal to cycle between three inputs (TV, Aux1, and Aux2), so we send this “TV - A/V Input Select” signal twice to get to Aux2. You will notice that this assumes that the TV was originally set to the TV input. We have to make this assumption because there is no way to determine the original setting. Because our TV is almost always set to the TV input, this will work correctly most of the time, but it does leave open the possibility of an error. Turning the Lights Off The best way to turn the lights off is to slowly dim them to level 0. Sending X-10 Off commands is quicker, but it just isn't as appealing. This also allows you to slowly brighten them when the show is over without going on to full brightness (like most X-10 light switches do). Disabling Other System Functions You should also consider whether there are other automation features that you would like to disable while the Home Theater Mode is running. For instance, if you have HomeVision set up to display messages or surveillance video on the TV, you can disable these features so they will not interrupt your movie. One way to accomplish this is to set a flag called "Viewing Home Theater" whenever you're watching it. Then, you can check the state of this flag in the other events and skip them (or handle them a different way) if the home theater is running. You might even turn a small night-light on when certain events occur like visitors arriving. This alerts you to what's happening without disturbing the show! Running the Home Theater Macro The last step is to decide how to trigger the Home Theater macro. The most common method is to assign the Home Theater macro to an IR signal on you remote control. When the controller receives that IR signal, it runs the Home Theater macro. The macro could also be triggered by an X-10 signal. With HomeVision, the Home Theater macro can also be included as a choice on a custom video screen menu. Look for an upcoming article on how to create your own HomeVision custom video screens. Other Macros Finally, related macros can be written, such as: • • • Exit Home Theater Mode: rewinds the tape, turns off the equipment, raises the lights, etc. Intermission Mode: pauses the video tape, mutes the stereo, raises the lights on, etc. Resume Mode: returns to the Home Theater Mode from the Intermission mode. SAMPLE PROGRAM FOR A HOMEVISION HOME THEATER MACRO ;Assume the VCR is already on and playing since a tape must have been inserted. ;Note that where possible, IR signals are transmitted twice to ensure they are received. ;First, stop the VCR: Transmit IR signal #44 (VCR1 - Stop) 2 times ;Turn on the TV if it is off (input port high = off): If Input Port B-1 (TV On/Off Probe) is high Then Transmit IR signal #17 (TV - Power) once End If ;Turn the TV volume all the way down: Transmit IR signal #21 (TV - Volume Down) 20 times ;Switch TV to A/V input #2: Transmit IR signal # 82 (TV - A/V Input Select) 2 times ;Turn on stereo receiver if it is off: If Input Port B-3 (Stereo On/Off Probe) is high Then Transmit IR signal #33 (Stereo - Power) once End If ;Select stereo phonograph input (phonograph is off) so we don't hear anything (in case volume was up): Transmit IR signal #35 (Stereo - Phono Input) 2 times ;Ensure stereo volume starts at zero: Transmit IR signal #40 (Stereo - Volume Down) 20 times ;Now set the stereo to the video input: Transmit IR signal #36 (Stereo - TV Input) 2 times ;Now turn stereo up to desired volume: Transmit IR signal #39 (Stereo - Volume Up) 8 times ;Start playing the tape: Transmit IR signal #43 (VCR1 - Play) 2 times ;Turn off the lights: Do macro #4 (Dim room lights to off) once ;Macro #4 (details not shown) dims the lights to level 0. ;This approach is more appealing than abruptly shutting the lights off.
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project