IR On/Off Switch Using Microcontroller

5,701

IR On/Off Switch Using Microcontroller
IR On/Off Switch Using Microcontroller

Turning electrical devices ON or OFF using a remote control is a well-established concept, with numerous devices available that perform this function effectively. To create such a device, it is necessary to construct a receiver and a transmitter, as well as to comprehend their communication methods. This project focuses solely on the receiver, which will utilize the remote control of a television or video device as the transmitter. This example is referred to as an IR On-Off switch or IR-switch. By selecting a specific key on the remote control, it can be memorized through a straightforward procedure, allowing the user to control any desired electrical device. Each short press of the selected key will toggle the state of the relay in the IR-switch receiver. The memorization process involves pressing a key on the IR-switch, which activates an LED indicator. Once the key is pressed, it can be released, and then the chosen key on the remote control must be pressed. The LED will blink, indicating that the memorization process has been successfully completed. This device can be constructed easily, even by beginners in electronics, as it requires only a few basic components. The schematic includes a PIC12F629 microcontroller, a TSOP1738 IR receiver (or any compatible TSOP or SFH type), and a relay with a 12V coil.

The IR On-Off switch operates by receiving infrared signals from a remote control and using those signals to control an electrical device. The core components include the PIC12F629 microcontroller, which processes the signals received from the TSOP1738 IR receiver. The TSOP1738 is designed to demodulate the infrared signals emitted by standard remote controls, converting them into a format that the microcontroller can interpret.

Upon receiving a signal, the microcontroller executes a simple program that checks for the specific command associated with the memorized key on the remote control. When the designated key is pressed, the microcontroller triggers the relay, which can then switch the connected electrical device ON or OFF. The relay acts as an electromechanical switch, capable of handling higher voltages and currents than the microcontroller can directly manage.

The circuit design should include a power supply that provides the necessary voltage for the relay coil, typically 12V. The microcontroller can be powered with a lower voltage, such as 5V, and a voltage regulator may be used to ensure stable operation. Additionally, a protection diode should be connected in parallel with the relay coil to prevent back EMF from damaging the microcontroller when the relay is de-energized.

For user feedback, an LED can be included to indicate the status of the IR-switch. This LED can be programmed to light up when the relay is activated, providing a visual confirmation that the electrical device is ON. The simplicity of the circuit, combined with the ease of programming the microcontroller, makes this project an excellent introduction to remote control applications in electronics.Turn ON or OFF electrical devices using remote control is not a new idea and you can find so many different devices doing that very well. For realization of this type of device, you must make a receiver, a transmitter and understand their way of communication.

Here you will have a chance to make that device, but you will need to make only the rece iver, because your transmitter will be the remote controller of your tv, or video This is one simple example of this kind of device, and I will call it IR On-Off or IR-switch. Choose one key on your remote controller (from tv, video or similar), memorized it following a simple procedure and with that key you will able to turn ON or OFF any electrical device you wish.

So, with every short press of that key, you change the state of relay in receiver (Ir-switch). Memorizing remote controller key is simple and you can do it following this procedure: press key on Ir-switch and led-diode will turn ON. Now you can release key on Ir-switch, and press key on your remote controller. If you do that, led-diode will blink, and your memorizing process is finished. To make this device will be no problem even for beginners in electronic, because it is a simple device and uses only a few components.

On schematic you can see that you need microcontroller PIC12F629, ir-receiver TSOP1738 (it can be any type of receiver TSOP or SFH) and for relay you can use any type of relay with 12V coil. 🔗 External reference