Thursday, July 14, 2011

RF Module Interfacing Circuit Example

Due to repeated requests from the readers I am posting here a circuit example for interfacing RF module using HT12E/D encoder decoder pair. The circuit attached here can be used to transfer data using the RF module. As I have explained earlier RF module mentioned here is having a single channel. So we can use only serial data transfers. This example uses HT12E/D encoder-decoder pair for converting the parallel data to serial and back.



This encoder-decoder pair supports 4 bit parallel data.The circuit has two parts transmitter and receiver. In the transmitter part we are using HT12E for encoding data from parallel to serial. The serial output from the from the encoder is fed to the data IN of the RF transmitter. Four switches namely SW0,SW1,SW2,SW3 are used to input data to the decoder. These switches are pushbutton switches with active low states.(i.e.when you press it, the data input will be '0' and in the released state data input will be '1'. The default state is '1').

At the receiver section we are having RF receiver and HT12D decoder IC. The serial data from the receiver is fed into to serial input of the decoder. The parallel data is displayed with the help of LED's .

Another LED at the pin VT of the decoder shows whether your link is established or not. If it is ON then everything is OK. Instead if it is permanently OFF, then there is a link failure. You may refer the data sheet of the IC to know the  exact function of pin VT. After each successful transmission of a 4-bit data, VT pin goes to a low state for a while and will come back to high state. Thus during the transmission you may see the LED at pin VT blinking.

Troubleshooting:

If your circuit is not working, just remove the RF transmitter and receiver and make a wired connection from the serial data OUT of the HT12E encoder to the serial data IN of the HT12D decoder. Now check whether you could receive the data send from the encoder to decoder. If it is not working, you can conclude that problem is with the encoder/decoder pair. Either there will be some bugs in the circuit or your IC's might be damaged ones.

Note:
You are free to point out the mistakes and ask doubts.

Disclaimer:
Technoburst will not be responsible for any damages both physically or financially occurred due to the use of this circuit.

 

58 comments:

vijay reddy said...

sir i want to interface a microcontroller and lcd to the above circuit ..can i????//

Anil C S said...

ya of course you can. Please do explain your requirements.

Pratik071 said...

can i rf module interfacing with microcontroller?

Anil C S said...

definitely u can. Please mention the name of the micro controller.

Anonymous said...

do u have code for it.......if yes plz post it.

sahil said...

HI SIR,I WANT TO OPERATE MULTIPLE DEVICES WITH ONE RF TRANSMITTER AND ONE TIME SO IS IT POSSIBLE TO DO..

Anil C S said...

Ya, it is possible by using the addressing feature in the encoder IC'S used. You can set unique address for each of the device. Only the device with the correct address can receive this. Transmitter have to switch between these addresses to ensure communication with these multiple devices.

You may refer the data sheets of the encoder IC's to know more about the addressing capabilities.

Jackson said...

Hi sir, I would like to interface ATTiny25 MCU with RF module (Tx).

1) Is it possible and do I really need encoder ?

After ADC the output is from a single port of the MCU (PORTB4) not like the big micro-controllers, so do you thing it is a series output or parallel.
Please Help.. ~!~!

Anonymous said...

Hi sir, I would like to interface ATTiny25 MCU with RF module (Tx).

1) Is it possible and do I really need encoder ?

After ADC the output is from a single port of the MCU (PORTB4) not like the big micro-controllers, so do you thing it is a series output or parallel.
Please Help.. ~!~!

Anonymous said...

I just purchased fs1000 rf modual..with 12E and 12D...Rs. 900/- it does not seem to work. conected chips directly to see if they were ok. but no response from the decoder. need help.

Anil C S said...

Till now i have not fed serial output from any micro controller directly to RF module data_in.

But serial input is also possible if the BAUD rate is below the maximum bit rate supported by the RF module.

I haven't used ATTiny series. So if you could wait two or three days more, sometimes I can come up with a solution.

Anil C S said...

@February 17, 2012 11:37 AM

You just send me the circuit which you used for testing.

Anil C S said...

@February 15, 2012 4:19 AM

Note: PORTB4 is analog input and not output.

With ATTiny25, it is little difficult to use serial transmission through single channel RF module since all the available serial buses in ATTiny25 requires atleast two wires other than GND.

But you could split up the 10-bit ADC output into two five bit segments and this can be transmitted in parallel through rest of the five digital I/O ports in succession. Of course you need Encoder and decoder at transmitter and receiver.

Anil C S said...

@February 15, 2012 4:19 AM

If you need to avoid encoder/decoder, choose a micro controller having UART interface, so that data can be send directly through single Channel RF module.

Anonymous said...

sir can u tell me any other encoder and decoders for rf modules that can transmit more than 4 data..i need to transmit upto 10 data..so plz kindly help me..plz reply as early as possible..right now working on that project..

Anonymous said...

i want to interface the rf module with the 8051 micro controller. the reciever is connected to a module having 8051 and LCD interfacing. and i intend on making another module in which data from the laptop goes in. like through a wired 232 interface. i m using the transmitter on tht other module, so that module will send the data to the reciever and the characters which i type on laptop will be displayed over the LCD. do i need to use encoder decoder ICs ??? 8051 already has UART .

Anil C S said...

Though I haven't experimented it, it should work. Try to keep the baud rate below 4800. 2400 is my suggestion.

Narendra Kumar said...

hello sir, i hv a question..
if encoder/decoder is required just to convert parrelel to serial and vice-versa, then can i use a UART cable in place of en/de...actully i m working on a project which requires to send data wirelessly from my pc keyboard to microcontroller, so that based on the recved data uc can take some required action...plz help me thro' this...thanx

himanshu said...

hi...........
i get output from ht12d's data pin 0.15v only when i set it from x'mitter
but i want 5 voltage what to do?

Anonymous said...

please post a circuit diagram of higher resolution

Anonymous said...

register values are not visible. can you please specify them

Anil C S said...

R = 1M
Rd0,Rd1,Rd2,Rd3 = 10k
Rd6 = 2.2k
R5 = 33k
Rx0,Rx1,Rx2,Rx3 = 1k

Anil C S said...

@Narendra Kumar said...

Ya you can do the same. Be sure that BAUD rate should not exceed the maximum specified by the module. Take care of the signal levels. (i.e uart port at p c is working around +15 / -15 range. If this is applied directly to the data pin of the module it may get damaged. Use max232 if necessary)

abhignans said...

hello sir i want the data sheet of pcr2a and fs1000a for my documnetation please kindly post me the link url as soon as possible

Anonymous said...

Hello,
i'm interfacing a PS2 Keyboard and GLCD with ATMEGA128
and i'm trying to send Chars written by keyboard to another
Atmega128 with a GLCD through SHY-J6122TR (and RF rx-tx module)
but the keyboard char is 8bit and the HT12E/D input is 4Bit
how am I supposed to send chars ??

puneet said...

if i simply give vdd & Gnd to both Rx & Tx pins
&

then
if i give +5 ve to data pin of tx --> then i will get +5ve at data pin of Rx

AND
if i give 0 ve to data pin of tx --> then i will get 0 ve at data pin of Rx

correct me if i am wrong

Anonymous said...

THERE ARE FOUR PINS IN RF RxMODULE....WHICH ONE IS FOR DATA OUT?

Anonymous said...

Sir i have a question. Based from your design using rf. is it possible to send the input data simultanenously? What i mean is that for example i switch sw1, sw2, sw3, sw4 at the same time. Is the reciever after passing the signal to the decoder will display the result at the same time? tnx...

Anonymous said...

i tried to use this product to make a simple wireless switch but it did not work my circuit diagram is in this link http://ankitverma658.my3gb.com/tr_module.JPG please help me

ranchod said...

sir, I want to interface RFID with AT89C51 so how can i connect (which pins)

khanelectronics said...

hii i am khan007..
can you define the encoder and decoder ic no which you have used..

sharryagrawal said...

Sir,I am trying to rotate 4 servo motors wirelessly on receiver side which will also contain arduino attached with decoder circuit.And on transmitter side i will use 4 switches coressponding to each motor such that if i press 1st switch, 1st motor should rotate and so..4switches input will go to encoder..so is this mechanism possible? or their also a need of arduino on transmitter side?

Rajeev Sarawag said...

i hv a problem with ht12e and d; i directly connect the dout of 12e to din . but there is no effect of switch position on leds connected at ht12d output pins as they always remains high

Rajeev Sarawag said...

help me as soon as possible,, as i have to submit my project soon

sreejith said...

i had a prblm that when transit enable switch on, all data out of receiver shows high voltage. But when sw1 pressed data1 out shows no current. Same as sw2 to data2 and sw3 to data3 and sw4 to data4. How can i reverse ie, sw1 pressed data1 should show high voltageand same as sw2, sw3 ,sw4 to data2, data3 and data4. Please help me@@?

Anonymous said...

sir, i need to transmit a data wirelessly through the uart of pic16f877a.. i am using a ask 433mhz rf transceiver... i directly gave the serial data from uart of pic to the rf... but it is not working... should i use any encoders??? can u give the names of some encoders that i can possibly use....

Puneeth Kumar said...

hi sir i am using the RF pair with HT12E&D of 2 set at same place but it is not working, both the VT are in off condition i also used different address,Can you suggest me to over come this problem waiting for your comment

Advance Thanks
Puneeth

Shrikanth said...

Sir
I want to use 3no 433MHz RF Tx & Rx.
But the problem If i connect to 9 Volt supply to the all 3 Tx then the receivers will not receive its signals.If i disconnect supply for 2 Tx then its particular receiver receives the signal. Pl. help me
Thanking You
shrikanth

shivs said...

sir,when I connect ht12d output data pins to port 2 of microcontroller,the voltage is reducing to 0.63 volts.please give me the suggestion for this waiting for ur reply.my mail id:kskumarnaidu@gmail.com

Anonymous said...

http://fantasyelectronisc.blogspot.in/2012/10/how-to-check-rf-module-working-or-not.html

if any one has any problem then reply to above given post i will defiantly help you.

Anonymous said...

capasitor is 0.1uf??

Mr. Sparkle said...

Sir, I want to make a USBAsp programmer...
I have the circuit but i am lacking with the firmware that is to be burnt with the programmer..
Please can u help me to get the firmware for ATMEGA8 USBAsp Programmer....

Anonymous said...

Sir,

Can you please send me all the details for transmitting a ' 2 digit number' from 8051 to another 8051.
Please send me the source code and circuit diagram.

Thanks for your help

Email: virinchikennedy@gmail.com

Anonymous said...

hi sir.. i want to provide remote control feature in my project which will select one to six rows through keypad and send selected row number to PIC controller.. how to do this... if you have any idea plz tell me

Rogers Manuel said...

hi there sir, can i interface this circuit with an Arduino microcontroller and also with a Generic 1 Set Of 433Mhz RF Wireless Transmitter And Receiver Module Green PCB? what diode are you using?

Anil C S said...

@Rogers Manuel

Yes you can interface it with Aurdino. I haven't used any didodes.

Anil C S said...

I have posted a circuit for 8 bit transmission using HT12E/D.

http://www.technoburst.net/2013/10/8-bit-ht12ed-rf-module-interfacing.html

Steve Froggatt said...

I am new to electronics and wonder if you had a diagram, relating to addressing, and how to "pair" HT12E&D. I have 2 TX's and 2 RX's, but I only want one to speak to one and the other to speak to the other one. Hope that makes sense

asad haider said...

SIR HOW CAN WE CONTROL THE RANGE OF RF MODULE.I NEED 5 METER RANGE AND IT SEEM TO BE 12 METER WITHOUT ANTEENA.
FREQ USE=434 MHz

Tinku said...

i want to connect rf receiver with 8051 and using 2 transmitter for my project so how can i detect which Tx is sending Data on Receiver ....plz send Me what change should i do achive this goal ...

Anil C S said...

@Steve Froggatt and @ Tinku
please refer to the following post.
http://www.technoburst.net/2013/10/8-bit-ht12ed-rf-module-interfacing.html
There you can see a detailed description of the address matching procedure of HT12E/D.

Anil C S said...

@asad haider
Idea is to attenuate the signal input to the antenna. This is just my suggestion. I haven't tried it. Yo may google to find attenuater-range calculations.

Prajakta Chavan said...

hello sir,
i request you for the guidance of following requirement of my project
i want to build rf transmitter n reciever so that i can interface transmitter to atmega8 microcontroller and reciever to atmega16 and using these both circuits i want to operate my robot

Anil C S said...

@Prajakta Chavan
It is quite easy. Use the transmitter section with atmega8. Remove switches and resistors at D0,D1,D2,D3 and connect it directly to the output port of atmega8. Similarly use receiver section with atmega16. Remove resistors and LEDs at D0,D1,D2,D3 and connect it directly to input port of atmega16.

santosh said...

how to connect vt pin of ht12d to parallel port of computer??

Anil C S said...

You can connect VT either to any of the data or status lines in a parallel port. It is always preferred to use a buffer (eg: 74LS541 ) with parallel port for protection

IRIAH AIKHOJE said...

PLEASE, i need the source code in either C or Basic programming language for RF wireless serial communication between two PIC18f2520 microcontrollers, this is because i need at least 6 communication channels and the ht12e and ht12d cant provide this. thank you very much

Mani said...

encoder decoder is necessary for RF modules interface with at89s51.
if RF module work without encoder/decoder connect with at89s51.
when directly connect with RX & TX pin of at89s51???
ans me plz in urgent

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes