Making our projects Wireless always makes it to look cool and also extends the range in which it can be controlled. Starting from using a normal IR LED for short distance wireless control till an ESP8266 for worldwide HTTP control, there are lots of ways to control something wirelessly. In this project we learn how to build wireless projects using a 433 MHz RF module and AVR microcontroller.
In this project we do following things:-
- We use Atmega8 for the RF Transmitter and Atmega8 for the RF Receiver section.
- We interface an LED and a Pushbutton with Atmega8 microcontrollers.
- On the transmitter side, we Interface Pushbutton with Atmega and transmit the data. On the receiver side, we will receive the data wirelessly and show the output on LED.
- We use encoder and decoder IC to transmit 4 bit data.
- Reception Frequency is 433Mhz using cheap RF TX-RX module available in the market.
- Atmega8 AVR Microcontroller (2)
- USBASP programmer
- 10-pin FRC cable
- Bread board (2)
- LEDs (2)
- Pushbutton (1)
- HT12D and HT12E pair
- RX-TX RF Module
- Resistors (10k,47k,1M)
- Jumper Wires
- 5V power supply
We use CodeVisionAVR software for writing our code and SinaProg software for uploading our code to Atmega8 using USBASP programmer.
You can download these softwares from the given links:
CodeVisionAVR : http://www.hpinfotech.ro/cvavr_download.html
Before going into the schematics and codes, let’s understand the working of RF module with Encoder-Decoder ICs.
433MHz RF Transmitter and Receiver Module
Those are the transmitter and receiver modules we are using in the project. It is the cheapest module available for 433 MHz These modules accepts serial data in one channel.
If we see the specifications of the modules, the transmitter is rated for 3.5-12V operation as input voltage and the transmit distance is 20-200 meters. It does transmit in AM (Audio Modulation) protocol at 433 MHz frequency. We can transfer data at a speed of 4KB/S with 10mW power.
In the upper image we can see the pin-out of the Transmitter module. From the left to right the pins are VCC, DATA and GND. We can also add the antenna and solder it on the point denoted in the above image.
For the Receiver specification, the Receiver has a rating of 5V dc and 4MA Quiescent current as input. The receiving frequency is 433.92 MHz with a -105DB sensitivity.
In the above image we can see the pin-out of the receiver module. The four pins are from Left to right, VCC, DATA, DATA and GND. Those middle two pins are internally connected. We can use any one or both. But it is a good practice to use both for lowering the noise coupling.
Also, one thing is not mentioned in the datasheet, the variable inductor or POT at the middle of the module is used for frequency calibration. If we couldn’t receive the transmitted data, there are possibilities that the transmitting and receiving frequencies are not matched. This is a RF circuit and we need to tune the transmitter at the perfect transmitted frequency point. Also, same as the transmitter, this module also has an Antenna port; we can solder wire in coiled form for longer reception.
The transmission range is dependable on the voltage supplied to the Transmitter and the length of the antennas in both side. For this specific project we did not used external antenna and used 5V at the transmitter side. We checked with 5 meters distance and it worked perfectly.
Learn more about RF pair in the RF Transmitter and Receiver Circuit. You can understand more about the working of RF by checking following projects that uses RF pair: