The emitter usually has 3 pins (VCC->5V, GND, DATA), with a few variants that expose the fourth pin for connecting an external antenna to increase the range. The input voltage interval is 3.5-12V (the higher the voltage, the longer the range, usually between 20-200m).Size 19x19mm, operating mode AM, transfer rate 2400bps.
The receiver also has three pins (VCC, GND, DATA) and it operates at 5V. It uses only 4mA. The sensitivity is -105DB, and the module size 30 * 14 * 7mm.
This shows that all we have to do is to hook the emitter to the AVR’s UART TX port, and the receiver to another AVR’s UART RX Port. We write some code to initialize the UART ports using the same baud rate, and we’re ready to exchange data. Here is a sample setup , with receiver connected to an Atmega8 board, showing data on a 2×16 LCD, and the emitter’s board with an Atmega128 and a Nokia 5110 LCD. The numbers on the two LCD’s match, as what this setup does is to increment an integer every second, and send it over the radio. So what we see on the 5110 LCD, we also see as V: number on the receiver’s screen.
This works fine, but from time to time, the receiver picks up random bits, leading to wrong data. There’s also the problem of multiple module pairs working in close proximity causing interference, or the problem of missing some of the data (the receiver doesn’t get all the bytes transmitted over the RF link).
Like in similar serial data communications, we can assign an address to differentiate between multiple devices, and compute a checksum value to rule out some of the errors (building data packets). This is a good solution, but we still have the problem of loosing some of the packets, and because the communication is unidirectional we can’t inform the emitter to retransmit. Unfortunately this is as good as it gets, so keep this in mind when using these modules, as they are not intended for precise data transmissions.
The algorithm works much better than the first, as now we won't get those random bytes picked up by the receiver. And because of the RADDR identifier, we can use several such modules in close proximity, as we now know which packet is intended for which receiver.
Is it possible to use two emitter+receiver modules pair in each side to make bidirectional communication and solve the problem of transmitters errors?
– so I put the datapin to high and the datapin on the receiver go high but only short time – then it go low again even the transmitter datapin is high – when I set it low and high again the same happen in the receiver !???
Have I miss understand you ? I thought that while the datapin on the transmitter then the receiver pin also will be high all the time !
Can you please clear this for me ?
Hello Erik,you can see the idea on the oscillogram included. The idea is to send sequences of 0’s and 1’s. You define the baudrate. You define how long to wait to register a 1 or a 0. As you can see, it works pretty well, since I was able to use existing UART code. Hope this helps.