fbpx

Interface RF With Arduino Uno

Radio frequency module is an electronic device used to transmit and receive radio signal between two device.

  • Wireless communication is accomplished through radio frequency (rf).
  • Several carrier frequencies are commonly used in commercially-available RF module.
  • 433.92 MHz, 315 MHz, 868 MHz, 915 MHz, and 2400 MHz.
  • By increasing the transmitter power, a larger communication distance will be achieved.
  • The performance of the overall system may be improved by using matched antennas at each end of the communication link.
  • RF Module consist of two part
    • Transmitter section.
    • Receiver section.

Transmitter

  • An RF transmitter module is capable of transmitting a radio wave and modulating that wave to carry data.
  • Transmitter modules connected with a microcontroller which will provide data to the module which can be transmitted.

Receiver

  • An RF receiver receives the modulated RF signal, and demodulate it.
  • There are two type of rf receiver module
    • Superheterodyne.
    • Super-regenerative.

Super Heterodyne

  • Super Heterodyne module are generally imprecise as their frequency of operation varies considerably with temperature and power supply voltage.

Super Regenerative

  • Super-regenerative module are usually low cost and low power design using a series of amplifiers to extract modulated data from a carrier wave.

Application

  • Robot remote control.
  • Wireless data transmissions.
  • Alarm systems.
  • Digital home automation.
  • Industrial data acquisition system.

Hardware Required

  • RF Module.
  • Arduino.

RF Pinout

Rf Receiver

  • Vcc=+5v.
  • Data=To Microcontroller pin.
  • Gnd=Gnd.

Rf Transmitter

  • Vcc=+5v.
  • Data1=To Microcontroller pin.
  • Data2=To Microcontroller pin.
  • Gnd=Gnd.

Transmitter Circuit

Receiver Circuit

Virtual Circuit

Rf Receiver

Rf Transmitter

Code

Transmiter

 #define rfTransmitPin 2
 #define ledPin 13
 void setup()
 {
 pinMode(rfTransmitPin, OUTPUT);
 pinMode(ledPin, OUTPUT);
 }
 void loop()
 {
 for(int i=4000; i>5; i=i-(i/3))
 {
 digitalWrite(rfTransmitPin, HIGH);
 digitalWrite(ledPin, HIGH);
 delay(2000);
 digitalWrite(rfTransmitPin,LOW);
 digitalWrite(ledPin, LOW);
 delay(i);
 }
 } 

Receiver

 #include <VirtualWire.h>
 void setup()
 {
 vw_set_ptt_inverted(true);
 vw_set_rx_pin(12);
 vw_setup(4000);
 pinMode(13, OUTPUT);
 vw_rx_start();
 }
 void loop()
 {
 uint8_t buf[VW_MAX_MESSAGE_LEN];
 uint8_t buflen = VW_MAX_MESSAGE_LEN;
 if (vw_get_message(buf, &buflen))
 {
 if(buf[0]=='1')
 {
 digitalWrite(13,1);
 }
 if(buf[0]=='0')
 {
 digitalWrite(13,0);
 }
 }
 } 

1 comment on “Interface RF With Arduino Uno

Leave a Reply

Your email address will not be published. Required fields are marked *