The idea behind this project was, I must admit it, to be lazy!
My current TV setup is a bit cheap, but you know, it works just fine:
- A LCD TV
- A 2.1 computer sound system (with wired power and volume command)
So each time I want to watch the TV, I need to go to the TV, use the wired command (that I put just next to the TV) to switch the audio on, then go back to my couch and use the TV remote to switch the TV on...
As there is few meters between the TV and the couch, it's OK, but you know sometimes I just would like to be able to power on both TV and sound system just using the TV remote.
Components- Infrared receiver module (include an IR receiver, signal reception led)
- Relay module (5v-230V) (include NPN transistor and diode for relay control + led indicator while relay coil is powered). Can be replaced by the following schematic.
- Arduino Nano + Arduino IDE
Well it's simple: use the TV remote control to switch on the audio system. To make it easier, I want that the power button of the remote turn on both TV and audio system at the same time.
For that I need an IR receiver module to be able to decode the signal sent while pressing the remote power button.
I also need to be able to switch on/off the sound system. Looking in the sound system wired command, I saw it has an on/off button. By soldering a wire on each terminals of this switch I can open/close the circuit using a relay module.
What I noticed is that the sound system was OFF when the switch was opened and was ON when the switch was closed. Hopefully, SRD-05VDC-SL-C relay wiring allows to have the circuit opened or closed when relay is not powered. That's the second solution that I want to use: if the Arduino is not powered, the sound system is off by default (just use an ohmmeter on the relay outputs to chose the right ones).
Finally I need an Arduino to read the IR code sent by the TV remote and drive the relay to turn on/off the audio. At first I did a dummy program that just prints the power button code from the IR receiver module to the serial output, and then did the final one to open/close the relay if this specific code is received.
Once done, each time I push the power button of the TV remote control, both TV and audio system are ON (I've located the IR receiver close to the one of the TV, so they should both receive the same remote signal.). If I push the button again they are both turned off.
One issue I faced, is that sometime, one of the IR receiver does not catch properly the remote signal and so you have the TV ON with no sound, or the sound ON but the TV switched off.
To fix de-synchronization issues, I've allowed a second button from the remote to control the relay of the sound system so I can control it independently to synchronize back the two equipments.
And... that's it ! It's simple, and it works fine.
Comments