Power-on reset is provided by the combination of resistor R5 and capacitor C6. Switch S20 is used for manual reset. A 12MHz crystal along with two 33pF capacitors provides the basic clock frequency to microcontroller AT89C51.

Address lines of the encoder (IC1) and the decoder (IC4) should be identical for data reception in the receiver. Here addresses are made identical through switches S18 and S19. When any of the keys on the keypad is closed, the corresponding data pin of the decoder goes low. When any data is received, valid transmission pin (VT) goes high as indicated by LED2.

Data outputs D8 through D11 of HT12D are connected to port pins P0.0 through P0.3 of the microcontroller. The microcontroller receives the decoded data and controls the corresponding relay through relay drivers ULN2003 and ULN2803. The device to be controlled is connected to the relay contacts. Unregulated power supply is used for relays.

Power supply

The 230V AC mains is stepped down by transformer X1 to deliver a secondary output of 6V, 500 mA. The transformer output is rectified by a full-wave rectifier comprising diodes D6 through D9, filtered by capacitor C8 and regulated by IC 7805 (IC8). Capacitor C7 bypasses the ripples present in the regulated supply. LED3 acts as the power indicator and R6 limits the current through LED3.


Programs for the microcontrollers are written in BASIC and compiled using BASCOM Basic compiler for 8051 family. These are supported by Windows OS. The microcontrollers of the transmitter and receiver units are programmed with source programs ‘Remote.bas’ and ‘Receiver.bas,’ respectively. The bas codes are converted into hex codes using the above compiler. The hex codes are burnt into the respective microcontrollers using a suitable programmer.

Fig. 8: An actual-size, single-side PCB for relay section
Fig. 8: An actual-size, single-side PCB for relay section
Fig. 9: Component layout for the PCB in Fig.
Fig. 9: Component layout for the PCB in Fig.

Download PCB and Component Layout PDFs: click here

Download Source Code: click here

Construction and testing

An actual-size, single-side PCB for the transmitter circuit (Fig. 2) is shown in Fig. 4 and its component layout in Fig. 5. The PCB for the receiver circuit excluding relay section (Fig. 3) is shown in Fig. 6 and its component layout in Fig. 7. The PCB for relays RL8 through RL15 connected to load 8 through load 15 is shown in Fig. 8 and its component layout in Fig. 9. You can use another PCB for relays RL1 through RL7 to connect load 1 through load 7. Suitable connectors are provided on the PCB. The receiver PCB is interfaced with the relay PCB by connecting CON1 to CON5, and CON2 to CON6.

After assembling the transmitter, receiver and relay sections on the respective PCBs, pull pin 1 of both HT12E and HT12D to ground. LED2 connected to VT pin of the decoder should glow, indicating that a valid signal has been received. 255 sets of transmitter-receiver pairs can be used within the same area, each with a unique address. Alternately, we can also control 255 receivers with a remote control by changing the address. Now your RF-based multiple device control system is ready for use.

The author is a software test automation engineer at Wipro Tecnologies, Sarjapur Road, Bengaluru



  1. we build the circuit on a bread board, but when we are testing the ciruit the LED2 is not glowing. we can’t get the proper output from the decoder. Can i have some help?

  2. How i can make a single device by using it….ex:- only switch on/off by bluetooth…..plz give me the required component list for this project.


Please enter your comment!
Please enter your name here