Peter's electronic projects

DIY remote control based on PIC

v4.2 designed by Peter JAKAB in 2004-2005
old version in December, 1999
NOTE for beginners: PICs are general purpose microcontrollers which have to be programmed before you can use them in the actual circuit! Check out this link to learn more.
transmitter receiver
output ch# type state
K1 L M  
K2 L M  
K3 L M  
K4 L M  
K5 L M  
K6 L M  
K7 L M  
K8 L M  
receiver output types: L=latched output, M=momentary output
Control up to 8 devices by this easy constructable remote control. It can work as a radio or infrared remote control, depending on the components. Each device output can be configured to be momentary (turned on while you press the button) or latched. Latched outputs can be toggled on/off by one button per channel, or turned on and off by two buttons per channel.

Try it out now! Click on the transmitter buttons and see how the receiver outputs change. Change transmitter or receiver version. Alter the receiver output type.

Containing a PIC microcontroller, the circuit is very flexible. You can decide which receiver outputs are latched and which are momentary. The Manchester-coded transmitter output is well suited for the cheapest ASK radio modules or for infrared control. The units are configurable to a unique address, which must match to control the devices.

If you have trouble with programming PIC microcontrollers, you can consider builing other circuits based on Holtek HT-12D, HT-12E and Motorola MC145026, MC145027, MC145028 encoders/decoders.
image gallery

4/8-channel V4.2 radio transmitter

radio remote control transmitter schematic
The difference between the 4-channel and the 8-channel version is only the software inside. The 8-channel transmitter has one button per channel. The 4-channel transmitter has ON/OFF buttons for controlling four (latched output) channels. If you need addresses, connect diodes between CJ and the R1-R4 pins. Higher supply voltage results higher transmit power, but V+ range is 2-5.5VDC for the PIC MCU.

Download the code for

4/8-channel V4.2 infrared transmitter

infrared remote control transmitter schematic
The difference between the 4-channel and the 8-channel version is only the software inside. The 8-channel transmitter has one button per channel. The 4-channel transmitter has ON/OFF buttons for controlling four (latched output) channels. If you need addresses, connect diodes between CJ and the R1-R4 pins. V+ supply voltage should be between 2.5-5.5VDC. It is practical to use two or three AAA batteries.

Download the code for

4/8-channel V4.2 radio receiver

The difference between the 4-channel and the 8-channel version is only the software inside. The 8-channel receiver outputs are individually configurable for latched or momentary output. The 4-channel receiver has two outputs per channel: K1-K4 are latched outputs, K5-K8 are momentary outputs for the four channels. The "valid" LED shows the transmitter activity. Make sure to turn on all address jumpers when the transmitter diodes are absent, or the J1-J4 jumpers are cut. Choose V+ supply voltage between +6-15VDC, based on the relay voltage ratings. For 6V relays, use +6VDC, for 12V relays use +12VDC.

Download the code for
Zoom the picture
radio remote control receiver schematic

4/8-channel V4.2 infrared receiver

The difference between the 4-channel and the 8-channel version is only the software inside. The 8-channel receiver outputs are individually configurable for latched or momentary output. The 4-channel receiver has two outputs per channel: K1-K4 are latched outputs, K5-K8 are momentary outputs for the four channels. The "valid" LED shows the transmitter activity. Make sure to turn on all address jumpers when the transmitter diodes are absent, or the J1-J4 jumpers are cut. Choose V+ supply voltage between +6-15VDC, based on the relay voltage ratings. For 6V relays, use +6VDC, for 12V relays use +12VDC.

Download the code for
Zoom the picture
infrared remote control receiver schematic

software

All the devices use new, FLASH-based microcontrollers, this means that they can be re-programmed many times. You can experiment with the source code settings to fit your needs. The code must be compiled as a linked project under MPLAB. Please check FAQ at the PIC page.
source file
line meaning
enc-042.asm 25 #define MODE_CH4 the device is 4-channel, sending ON/OFF channel codes
enc-042.asm
28 #define MODE_CH8 the device is 8-channel, sending simple codes for channels
irmtxv4.asm 44 pwm_freq EQU d'38000' the IR transmitter frequency is set to 38000 Hz. This should match the receiver module frequency
dec-043.asm 36 LATCH_MASK EQU 0xff
select outputs to be latched. This is a binary mask, one bit per channel. Other channels will be momentary
dec-044.asm 38 LATCH_MASK EQU 0xff
mrxv4.asm 56 #define SKL btfsc
57 #define SKH btfss
normal decoder logic input is used for the RF receivers (most times)
mrxv4.asm 60 #define SKL btfss
61#define SKH btfsc
inverse decoder logic input is used for the IR receivers (most times)

hardware

If you are building the radio version, choose an ISM RF module from the list of modules. The remote control works with the cheapest OOK/ASK modules and with FSK modules, too.

If you are building the infrared version, choose an IR LED matching the wavelength of the receiver module. The receiver center frequency should match the transmitter modulation frequency, which can be set the transmitter source (pwm_freq). If in doubt, just choose a TSOP1738. A list of usable modules: Sharp GP1U52X, IS1U60L, Vishay TSOP17XX, TSOP18XX.

references

Bookmark and Share