Going wireless always starts with a basic RF communication, using serial encoders and decoders. This process and methodology is described here very aptly, doesn’t matter whether you are a newbie or not!
If you want to make an RF controlled robot, you would prefer to read this post first!
Going Wireless
These days, the term wireless is very much hyped! Whenever we hear the term wireless, stuffs like Mobile telecommunication (GSM), Wi-Fi, Bluetooth, RF Communication, Wireless networks, Zigbee, I2C, SPI, DTMF, 802.11b, SimpliciTI etc etc etc. Well, fortunately or unfortunately, all of these protocols can be interfaced with a microcontroller in one way or the other. But what matters is the level of complexity.
To start off, for beginners, RF (Radio Frequency) Communication is the most preferred and low cost solution. All you need is a RF Module (Transmitter-Receiver Pair). Now, that’s not all. RF Communication works on the principle of Serial Communication. Thus, you need something which converts the conventional n-bit (4-bit, 8-bit, 16-bit, etc) data into serial data. For this, we have two choices:
- Use a microcontroller to convert the n-bit data into serial data and vice-versa
- Use serial encoders/decoders to do the same
RF Communication Block Diagram
A general RF communication block diagram is shown above. Since most of the encoders/decoders/microcontrollers are TTL compatible, most of the inputs by the user will be given in TTL logic level. Thus, this TTL input is to be converted into serial data input using an encoder or a microcontroller. This serial data can be directly read using the RF Transmitter, which then performs ASK (in some cases FSK) modulation on it and transmit the data through the antenna.
In the receiver side, the RF Receiver receives the modulated signal through the antenna, performs all kinds of processing, filtering, demodulation, etc and gives out a serial data. This serial data is then converted to a TTL level logic data, which is the same data that the user has input.
So now, let’s look into the hardware that are required.
RF Module
RF Modules are used wireless transfer data. This makes them most suitable for remote control applications, as in where you need to control some machines or robots without getting in touch with them (may be due to various reasons like safety, etc). Now depending upon the type of application, the RF module is chosen. For short range wireless control applications, an ASK RF Transmitter-Receiver Module of frequency 315 MHz or 433 MHz is most suitable. They are quite compact and cheap! You can buy them from the following stores:
A typical 315MHz (or) 433MHz ASK RF Module looks like this (courtesy EngineersGarage)

RF Module
Now, let’s have a look at it’s pinout (courtesy EngineersGarage)

RF Module Pins
Pin Description:
Features:
- Range in open space(Standard Conditions) : 100 Meters
- RX Receiver Frequency : 433 MHz
- RX Typical Sensitivity : 105 Dbm
- RX Supply Current : 3.5 mA
- RX IF Frequency : 1MHz
- Low Power Consumption
- Easy For Application
- RX Operating Voltage : 5V
- TX Frequency Range : 433.92 MHz
- TX Supply Voltage : 3V ~ 6V
- TX Out Put Power : 4 ~ 12 Dbm
This has single channel for data transfer, thus serial data communication is used.
Serial Encoder/Decoder
The most popular serial encoder/decoder used is the HT12D-HT12E pair. Their description is given below. It’s okay if you don’t understand what is written there. Just make sure you go through the pin configurations and the circuit implementation.
The HT12E Encoder ICs are series of CMOS LSIs for Remote Control system applications. They are capable of Encoding 12 bit of information which consists of N address bits and 12-N data bits. Each address/data input is externally trinary programmable if bonded out.
The HT12D Decoder ICs are series of CMOS LSIs for remote control system applications. This ICs are paired with each other. For proper operation a pair of encoder/decoder with the same number of address and data format should be selected. The Decoder receive the serial address and data from its corresponding encoder, transmitted by a carrier using an RF transmission medium and gives output to the output pins after processing the data.
Features - Encoder
- 18 PIN DIP
- Operating Voltage : 2.4V ~ 12V
- Low Power and High Noise Immunity
- CMOS Technology
- Low Standby Current and Minimum Transmission Word
- Built-in Oscillator needs only 5% Resistor
- Easy Interface with and RF or an Infrared transmission medium
- Minimal External Components
Features - Decoder
- 18 PIN DIP
- Operating Voltage : 2.4V ~ 12.0V
- Low Power and High Noise Immunity
- CMOS Technology
- Low Stand by Current
- Ternary address setting
- Capable of Decoding 12 bits of Information
- 8 ~ 12 Address Pins and 0 ~ 4 Data Pins
- Received Data are checked 2 times, Built in Oscillator needs only 5% resistor
- VT goes high during a valid transmission
- Easy Interface with an RF of IR transmission medium
- Minimal External Components
Applications
- Burglar Alarm, Smoke Alarm, Fire Alarm, Car Alarm, Security System
- Garage Door and Car Door Controllers
- Cordless telephone
- Other Remote Control System
Compatibility
- Compatible with RF Modules 433 MHz Link RF Modules (Tx + Rx Pair) 433 Mhz ASK
Circuit Implementation
There isn’t much in circuit implementation. You just need to take a solderless breadboard and make the connections… and snap! You are done!
Transmitter Section
Make the following circuit on a breadboard. You are requested to implement the following circuit at your own risk! We will NOT be responsible for any damages caused due to implementation of the circuit, physically, mentally or financially.
Here, we have used four switches S1, S2, S3 and S4 to give 4-bit parallel data (D0-D3). Since the switches are in active low state (i.e. low signal is sent when the switch is pressed), we need to add external pull-up resistors as shown, so as to provide a high signal by default. A resistance as high as 1Mohm is required in between OSC1 and OSC2 pins. The Transmitter Enable (TE, pin 14) pin is an active low pin. Thus, it is permanently grounded, so as to enable the transistor always. The output serial data DOUT is fed to the RF Transmitter Module directly.
The most important thing lies in the address pins (A0-A7, pin1-8). Suppose you have two wireless devices (A and B) in your house, both have different remote controls (AA and BB) and both implement the same type of RF module (say 433 MHz). AA is the remote control of A and BB is of B. Now, you obviously wouldn’t want AA to control B (which is the most probable case since both the devices use same kind of RF module, having same frequency!). This is where address pins come into play. There are 8 address pins, thus giving you an opportunity to have 8! (8 factorial) different and independent ways to connect to a device, so that there is no interference. The address pins MUST have the same address in both transmitter and receiver, or else the data won’t be transferred. Refer to the receiver circuit for more details.
Receiver Section
Now make the following circuit on a different breadboard. As mentioned earlier, you are requested to implement the following circuit at your own risk! We will NOT be responsible for any damages caused due to implementation of the circuit, physically, mentally or financially.
The circuit of the receiver is also quite simple. Capacitor C1 is used between Vcc and GND for noise filtering. Apart from that, all the address pins (A0-A7, pin 1-8) are grounded, just as in transmitter. This is to ensure that the transmitted data is being received. Both the transmitter and the receiver MUST have the same address pins configuration. Pin 17 (VT) is enabled whenever the receiver receives any data. The serial data received by the RF Receiver module is directly fed to pin 14 (DIN), which is then converted into 4-bit parallel data (D0-D3). A 33 kohm resistor is connected in between OSC1 and OSC2.
Antenna
Okay, so now that all the connections are made, you must choose an antenna for signal transmission. Usually, a 20-30 cm wire serves best. It is sufficient to give a range of 80 meters in open region. To improve the efficiency, you can also use a coiled wire (take a wire and make it into a coil). It increases the signal strength.
Result – What you will get?
Once the circuit is made and powered up, the four LEDs on the receiver end will glow by default. The LED corresponding to VT glows only when some data is received. Now whenever you press any switch (on the transmitter end), that particular LED (on the receiver end) goes off! Interesting, eh?!
Troubleshooting
It’s obvious that you won’t get the result in the first go itself! It’s completely normal, even in my case!
There will be times when you will say to yourself that it’s not gonna happen. In that case, just try out the simple wired communication. Connect the DOUT of the encoder directly to the DIN of the decoder using a wire. Then check and recheck your connections, check whether the address is the same, whether you have missed any Vcc or GND connection, etc. If still then a successful link is not established, change your encoder/decoder ICs. Once your link is established, connect the RF module and do the same. Try adjusting the antenna position, touch the antenna (touching the antenna will make yourself an antenna!), etc. If still not successful, then all I suggest is to google out your problem and see if somebody else has sorted it out or not.
Extending the circuit
This circuit can be easily extended to anything, depending upon your application. If you are using it control a robot, the output data can be directly given to a motor driver. View this article for details. If you are using it to control any external device, this data can be fed there. In other words, whatever data you wanted to send, the same is available at some other location, which can be manipulated very easily.
Making an RF Car
If you want to make a wireless robot and want to use RF technology to achieve that, then you can view this interesting post by Yash on maxEmbedded and learn how he made it.
So folks, this is all about RF module interfacing without using microcontrollers. We will discuss the same topic once again after learning Serial Communication. So till then, you can stay updated by grabbing RSS Feeds or subscribing to my blog!
Thank You
Mayank Prasad
VIT University








Thanks a lot for your reply.
Hi Mayank,
I want to eliminate the encoder and decoder ic in my circuit.I am using a pic microcontroller, do you have any bit banking C source code for drive the rf modules. Can i use the USART module for the communication. Please let me know if you have any idea for eliminating the driver IC’s.
regards & thanks
Aswin
Hi Aswin,
I am sorry that I missed this comment. Did you clear this from somewhere or should I give it a try?
hi mayank,
I have written a bit bank code. It is working but not that good,it is affected by the noise,need more software filters. Once it done i will let you know.
regards,
aswin.
i wanna make a wireless remote controlled robocar. i have used your given tips (encoder/decoder,motordriver). in my there only three pin so i m confused plz send me a circuit for this plzzzz……….
Hi Manish
If your RF module has only three pins, which means that the fourth one is the antenna, which should be located in some other corner of the module. Just check it out. The circuit remains the same.
Hello Mayank,
I just find this site searching for some rf modules. I bought some rx-tx pairs that I want to use for some transmission. I want to put you some questions about this transmission:
1) If I have multiple sensors on a board with the tx module I will be able to send the data via some protocol?
2) I want to make my project a little bigger . That’s means multiple tx stations to a single rx station and as I have read and also I deduced the rf transmission will not work anymore. What kind of circuit/protocol should I use instead?
Hi Manu,
Actually it might work! You see, using the circuit above, you can send 4 bit parallel data to the receiver. Assuming all the sensors giving digital output, you could feed the single tx with data of up to four sensors! In the receiver’s end, you can get each of these signals separately.
And as far as multiple tx and single rx is concerned, well, I don’t have much idea about, I don’t have much idea about Wireless Sensor Networks (WSN). Maybe Google could help you out. I know about a few protocols, but I dunno whether they will work in this regard or not.
I’m making a wireless robocar using RF module 433
& the LED of receiver corresponding to VT is glowing when RF is connected for data transmission
Which confirms that data is being transmitted but i’m facing a problem that the output of D0,D1,D2,D3 does not go low when remote buttons of transmitter are pressed….please help me out…:(
Hi Karan,
I didn’t get you. You mean to say that once pressed, it sends a high, but doesn’t reset when it goes low (or may be vice-versa)?
If this is the problem, then I would ask you “Did you implement Pull Down (or) Pull Up network in your switches?”
Could you send me the circuit diagram of your switches?
Hi Mayank,
For the data transmission how long i have to hold the TE pin to ground. Is their any minimum time for that. I am always keeping the TE pin to VDD, so that device will be in standby mode.I am concern about the current consumption because my circuit is battery operated.
Hi Aswin,
Maybe perhaps you need to view the datasheet of HT12E for this. They must have specified about this there.
Pingback: Making an RF Car | maxEmbedded·
Update: New post on making an RF car is posted. Readers can view that post as well. It has supporting photos and video as well.
hi mayankji
i m fresher………i want to make robotic car base on rf concept……….so can u provide me any datasheet OR any link OR any video………..so i cn come to aboutre take place btwn tx and rx???
Hi Kushal,
Have you checked out this post?
Thanks for this guide, it was really helpful. I added a DIP switch to my circuit for easy address pin switching.
Hi Dan,
I am glad you did it. And yes, using DIP switch is a good idea.
Helo mayank.. im using rf transmitter that have 4 pin(anttena,data,ground and vcc). For the rf receiver that also have 4pin(vcc,data,data,and ground). But here got some trouble the rf transmitter and receiver won’t send any data and receive data…how can check that the transmitter and receiver are working.?please help me..
Hello Ilrlvinxce Adams,
Did you try out the circuit with encoder/decoder? Did you use a proper antenna?
Where is the antenna pin on your Rx/Tx module? Could you tell me exactly which module are you using?
Yes..im using the ht12encoder/decoder..im using this module http://tutorial.cytron.com.my/wp-content/uploads/2012/08/RF-3151.jpg…. RF-TX-315 & RF-RX-315Mhz…may i know how to connection for the EN pin on the encoder and the how about the VT pin on decoder?…im using 1Mohm on the encoder and 39kohm on decoder for the oscilator pin..are these may effect the send or receiving data?
hi bro,i’m from vit chennai. i wold like to controll 3 motors and one servo by this 4 bit output from ht12d ic..i knw how to control those 3 motors but i dont knw how to control servos as it needs pwm input..i want to do this with out microcontroller…can u please suggest me.by using any pwm generators at output of ht12d like 555 ic
hello!! mayank i m making a project on touch screens do u have any idea about touch screen interfacing with microcontroller and its cost
Hello Bhanu,
Yes, I have some experience working with resistive touchscreens. You can get resistive touchscreens at your nearest radio shack, or maybe a mobile store. All resistive touchscreens have four pins (X+, X-, Y+, Y-) representing the two axes. Depending upon where you press on the touchscreen, you will get analog voltages for these two axes. Working principle is similar to a potentiometer. Once you get the analog voltage, you need to feed it to the ADC of the microcontroller and decode it accordingly.
You can also search for some libraries for interfacing your touchscreen with microcontroller, you just need to search for it. Cost of touchscreen varies greatly upon its quality. Resistive ones can be available anywhere in between INR 40 to 250.
And apart from that, you would also require a GLCD (Graphic LCD) to synchorize your display with your touchscreen!
Hi,I am facing problem regarding the RF module. I am using RXB6-433 mhz module,I connected my circuit exactly like the schematics given here. At first it didn’t work,then i connected the encoder and decoder ics without the RF module and it worked. But whenever I connect the RF module,it does not work. So this is obvious that the problem lies in RF module, but I am also pretty sure that all my connections are as shown in the diagram(and all the connections are ok,I checked them with multimeter),but I still can’t figure the problem:(
Any help will be highly appreciated.
Hello Borhan,
Well, what kind of antenna did you use? Try using a coiled wire of around 15cm length as antenna. Do revert back to me once you tried it.
can you tell me how to use address pins of encoder and decoder?
Hi Rishabh,
Well, its clearly mentioned in the tutorial. Please read between the lines to know about them. You simply need to tie them up to Vcc or Gnd to assign proper addresses.
dear vhaiya…
do you please explain about the resistance used in the oscillator pins 33k and 1.1M. what exact equation you used to calculate them?
Hi Mayank,
i am using two pairs of rf module for a two way communication. I have two base circuitry and one remote circuitry. While transmitting data from the remote circuit, the base circuit is receiving the wrong value. This is not happening frequently. i have checked the (remote circuit) encoder ic data pins for the input and was correct. I have replaced the encoder IC and RF transmitter still issue is there. So i think the serial data on the DOUT pin of the encoder IC is getting corrupted some times? Please let me know if you have any idea to solve this issue.
CKT information
Base circuitry RF module (RFrx & RFtx), Decoder/Encoder IC pair and MCU.
Remote circuitry RF module (RFrx & RFtx), Decoder/Encoder IC pair and MCU.
Regards,
Aswin
hello. I need to model a project where one receiver needs to receive information from multiple transmitter then transmit back the response to them after analysis. And the transmitter and receivers this duplex system are at two end of the city. It would be helpful if you could give some hint about how to interface the transmitter and receiver through wireless internet or mobile phone network.