Summary of Ir On-Off using PIC12F629 microcontroller
This project builds an IR-controlled relay receiver (IrOn-Off) that uses a TV/video remote as the transmitter. A PIC12F629 microcontroller with an IR receiver (TSOP1738 or similar) learns one remote key; each short press toggles the relay state, turning any 12V-coil relay-controlled device ON or OFF. Learning is done by pressing a button on the Ir-switch, then the remote key; LED feedback indicates success. The project reuses an IR memorizing/recognition subroutine from IrLightDimmer and is suitable for beginners using few common components.
Parts used in the IrOn-Off:
- PIC12F629 microcontroller
- IR receiver TSOP1738 (or any TSOP/SFH equivalent)
- 12V coil relay (any suitable relay with 12V coil)
- LED indicator diode
- Pushbutton for memorizing/learning
- Supporting passive components (resistors, capacitors)
- Power supply providing 12V for relay and appropriate Vcc for PIC
- Printed circuit board or prototyping board
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 receiver, 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 IrOn-Off or Ir-switch.
How it works
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).

components
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.
Instructions
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.
Program code for this device is used from IrLightDimmer and it’s only a subroutine, which is used for memorize and recognize ir-protocol.
Source : Ir On-Off using PIC12F629 microcontroller
- What does the IrOn-Off project do?
It uses a PIC12F629 and an IR receiver to learn one remote key and toggle a relay each time that key is short pressed, turning a device ON or OFF. - Which microcontroller is used in the project?
The project uses a PIC12F629 microcontroller. - What IR receiver can be used?
A TSOP1738 is recommended, but any TSOP or SFH type IR receiver can be used. - What relay is required?
Any relay with a 12V coil can be used for the relay in this project. - How do you memorize the remote controller key?
Press the Ir-switch button so the LED turns on, release it, then press the chosen key on your remote; the LED will blink to indicate memorizing is finished. - Can this project be built by beginners?
Yes, the article states it is simple and suitable for beginners with only a few components required. - Where does the IR decoding code come from?
The program code uses a subroutine taken from IrLightDimmer for memorizing and recognizing the IR protocol. - Is the remote transmitter included in the project?
No, the transmitter is a standard remote controller from a TV, video, or similar device that you already have.


