Gone are those days when we had to lay cables and put them through walls etc. Now, we live in an era where everything is wireless. What if I say that you can control home appliances, open garage door and monitor health of patients remotely without the hassle of connecting too many wires. Don’t you find it cool and exciting? Presenting to you the RF module!
Why RF Communication?
Security is critical for many applications - from garage door openers to IoT devices. Trust an RF interface for your application, because it is harder to hack. Unlike other communications, it doesn’t require a line-of-sight operation. Its range of communication is much better around 502 feet and more importantly, it is cost effective.
Several carrier frequencies are commonly used in commercially available RF modules such as 433MHz/434MHz, 915MHz and 2400MHz.
Here we’ll see about RF 433MHz transmitter and receiver.
RF 433 MHz Transmitter
An RF transmitter module is a small PCB sub-assembly capable of transmitting a radio wave and modulating that wave to carry data. Transmitter modules are usually implemented alongside a microcontroller which will provide data to the module which can be transmitted. RF transmitters are usually subject to regulatory requirements which dictate the maximum allowable transmitter power output, harmonics, and band edge requirements.
RF 433 MHz Receiver
An RF receiver module receives the modulated RF signal and demodulates it. There are two types of RF receiver modules: superheterodyne receivers and super-regenerative receivers. Superregenerative modules are usually low cost and low power designs. It uses a series of amplifiers to extract modulated data from a carrier wave. Super-regenerative modules are generally imprecise as their frequency of operation varies considerably with temperature and power supply voltage.
Superheterodyne receivers have a performance advantage over super-regenerative; they offer increased accuracy and stability over a large voltage and temperature range. This stability comes from a fixed crystal design which in the past tended to mean a comparatively more expensive product. However, advances in receiver chip design now mean that currently there is little price difference between superheterodyne and super-regenerative receiver modules.
RF 433 MHz Receiver and Transmitter with Arduino Components Required:
• 2 Arduino boards
• RF 433 MHz receiver transmitter pair
• Jumper wires
• 2 LEDs
• Push button
• Resistor(220 ohm)
The connection for the RF Transmitter Module is very simple. It consists of 4 pins: VCC, GND, Data and Antenna. VCC and GND pins are connected to 5V and ground respectively. The data pin is connected to any of the digital input/output pins of Arduino. Here, it is connected to Pin 12. A switch is connected to Pin 3 and GND and a resistor (220 ohms) is connected to Pin 3 and GND as shown. We are using external LED connected to Pin 13 for demonstration.
int inPin = 3;
int outPin = 13;
int state = HIGH;
int previous = LOW;
long time = 0;
long debounce = 200;
reading = digitalRead(inPin);
if (reading == HIGH && previous == LOW && millis() - time > debounce)
if (state == HIGH)
state = LOW;
vw_send((uint8_t *)data, strlen(data));
state = HIGH;
time = millis();
previous = reading;
The RF Receiver Module also consists of 4 pins: VCC, GND, Data and Antenna. VCC and GND pins are connected to the 5V pin of the Arduino and ground respectively. The data pin is connected to Pin 12 of the Arduino. The relay consists of 3-pins: I/P, VCC and GND. The input is connected to Pin 2, VCC and GND to the 5V pin and ground pin of Arduino, respectively. A buzzer is connected to 5V and GND and is controlled by the relay as shown. LED, connected to pin 13, is used for demonstration as shown.
const int ledPin = 13;
const int datain = 12;
int relayPin1 = 2;
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen))
In this project, a simple demonstration of RF Communication with the help of Arduino UNO boards is given. The aim of the project is to successfully transmit data between the RF Transmitter – Receiver modules using two Arduino UNO microcontroller boards and switching on/off a component on receiver side through transmitted data. The working of the project is explained here.
“VirtualWire.h” is a special library for Arduino created by Mike McCauley. It is a communication library that allows two Arduino’s to communicate with each other using RF Module i.e. transmitter-receiver pair. This library consists of several functions that are used for configuring the modules, transmission of data by the transmitter module and data reception by the receiver module. In this project, the transmitter simply sends two characters i.e. it sends the character “1” and “0” controlled by a push button. Here push button is acting as a switch. The initial state of the switch is high. When we press it, data “0” is transmitted via RF communication and the receiver will
receive the data “0”. Relay here is switched off. When again switch is pressed data “1” is transmitted and same will be received on the receiver side. Whenever “1” is received LED and relay are turned ON. Buzzer connected to relay starts making a sound.
Here, basically, we are transmitting data and controlling component connected to receiver side using a switch.