Arduino Interface with RF 433Mhz and 315MHz Transmitter Receiver Module

In this tutorial we learn how communicate between two Arduino using low cost 433MHz wireless modules. These modules are also available in long range in kilo meters. It uses ASK (Amplitude Shift Keying).

Arduino 433MHz RF Interface

What is 433MHz RF receiver and transmitter ?

433MHz RF Receiver

433MHz RF Receiver
433MHz RF Receiver

The RX – ASK is an ASK Hybrid receiver module. It is a effective low cost solution for using 433 MHz. Receiver module is a bigger than RF transmitter. Most 433MHz or 315MHz RF receiver modules have eight pins, but only four pins are used VCC, GND, DATA and Antenna.

433MHz RF Transmitter

433MHz RF Transmitter
433MHz RF Transmitter

The TX-ASK is an ASK hybrid transmitter module. TX-ASK is designed by the saw resonator, with an very  small size and easy to use for interfacing. It has only four pins VCC, GND, DATA and Antenna.

Note: These devices will not support direct UART communication when connected to PC or Arduino as there is a lot of noise always available on these frequencies. For remote control applications use Encoder and Decoder ICs.

What is 433 Mhz band used for?

LPD433 (low power device 433 MHz) is a UHF band in which license free communication devices are allowed to operate in some regions. The frequencies correspond with the ITU region 1 ISM band of 433.050 MHz to 434.790 MHz, and operation is limited to CEPT countries.

What is the range of 433MHz?

433MHz RF modules comes in different type, Most common module range in open space is 100 Meters. Long range modules are also available up to range of 2km to 15km (open air).

Features

  • RX Receiver Frequency : 433 MHz
  • RX Typical Sensitivity : 105 Dbm
  • RX Supply Current : 3.5 mA
  • RX IF Frequency : 1MHz
  • Low Power Consumption
  • Easy For Application
  • RX Operating Voltage : 5V
  • TX Frequency Range : 433.92 MHz
  • TX Supply Voltage : 3V ~ 6V
  • TX Out Put Power : 4 ~ 12 Dbm

RadioHead Packet Radio library for 433Mhz RF

Down Load Library from Here:
http://www.airspayce.com/mikem/arduino/RadioHead/RadioHead-1.89.zip

RadioHead consists of 2 main sets of classes: Drivers and Managers.

  • Drivers provide low level access to a range of different packet radios and other packetized message transports.
  • Managers provide high level message sending and receiving facilities for a range of different requirements.

Every RadioHead program will have an instance of a Driver to provide access to the data radio or transport, and usually a Manager that uses that driver to send and receive messages for the application. The programmer is required to instantiate a Driver and a Manager, and to initialize the Manager. Thereafter the facilities of the Manager can be used to send and receive messages.

It is also possible to use a Driver on its own, without a Manager, although this only allows unaddressed, unreliable transport via the Driver’s facilities.

In some specialised use cases, it is possible to instantiate more than one Driver and more than one Manager.

A range of different common embedded microprocessor platforms are supported, allowing your project to run on your choice of processor.

433MHz RF Transmitter Interface with Arduino

 

433MHz Transmitter Arduino Circuit
433MHz Transmitter Arduino Circuit

Arduino RF 433MHz Transmitter Code

Maximum Message length is 64 Bytes.

/*
433MHz Transmitter Code
Zero to Hero : ESP8266
Transmitter is connected on PIN 12 Arduino Transmitter GND--------------------------GND D12--------------------------Data 5V---------------------------VCC */ #include <RH_ASK.h> #include <SPI.h> // Not actually used but needed to compile RH_ASK driver; // RH_ASK driver(2000, 2, 4, 5); // ESP8266: do not use pin 11 void setup() { Serial.begin(9600); // Debugging only if (!driver.init()) Serial.println("init failed"); } void loop() { const char *msg = "hello"; driver.send((uint8_t *)msg, strlen(msg)); driver.waitPacketSent(); delay(200); }

 

433MHz RF Receiver Interface with Arduino

433MHz Receiver Arduino Circuit
433MHz Receiver Arduino Circuit

Arduino RF 433MHz Receiver Code

/*
 RF433Mhz Receiver Code
 
Zero to Hero : ESP8266
Receiver is connected on PIN 11 Arduino Receiver GND--------------------------GND D11--------------------------Data 5V---------------------------VCC */ #include <RH_ASK.h> #include <SPI.h> // Not actualy used but needed to compile RH_ASK driver; // RH_ASK driver(2000, 2, 4, 5); // ESP8266: do not use pin 11 void setup() { Serial.begin(9600); // Debugging only if (!driver.init()) Serial.println("init failed"); } void loop() { uint8_t buf[RH_ASK_MAX_MESSAGE_LEN]; uint8_t buflen = sizeof(buf); if (driver.recv(buf, &buflen)) // Non-blocking { int i; // Message with a good checksum received, dump it. driver.printBuffer("Got:", buf, buflen); /* Use this in case hex values are displayed Serial.print("Received:"); for (i = 0; i < buflen; i++) Serial.print(buf[i]); Serial.println(""); */ } }

Results

After Uploading open serial monitor of receiver and check the incoming data, in case of error open transmitter side serial monitor to see any errors.

 

 

 

Leave a Reply