Quantcast
Channel: AVR ATmega Projects Archives - Projects Tutorials Code Library for Atmels Atmega32 AVR
Viewing all articles
Browse latest Browse all 1082

Interfacing RF module with Atmega8: Communication between two AVR Microcontrollers

$
0
0

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.

Interfacing RF module with Atmega8 Communication between two AVR Microcontrollers

In this project we do following things:-

  1. We use Atmega8 for the RF Transmitter and Atmega8 for the RF Receiver section.
  2. We interface an LED and a Pushbutton with Atmega8 microcontrollers.
  3. 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.
  4. We use encoder and decoder IC to transmit 4 bit data.
  5. Reception Frequency is 433Mhz using cheap RF TX-RX module available in the market.

Components Required

  1. Atmega8 AVR Microcontroller (2)
  2. USBASP programmer
  3. 10-pin FRC cable
  4. Bread board (2)
  5. LEDs (2)
  6. Pushbutton (1)
  7. HT12D and HT12E pair
  8. RX-TX RF Module
  9. Resistors (10k,47k,1M)
  10. Jumper Wires
  11. 5V power supply

Software Used

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

SinaProg : http://www.ablab.in/sinaprog-hex-file-downloader-software-to-download-code-to-avr-microcontroller/#inline_content

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.

Interfacing RF module with Atmega8 Communication between two AVR Microcontrollers schematics

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:

Read more: Interfacing RF module with Atmega8: Communication between two AVR Microcontrollers


Viewing all articles
Browse latest Browse all 1082

Trending Articles