Introduction: Wireless Communication Arduino RF
433Mhz RF Transmitter + Receiver Module Link Kit will allow us to connect two Arduinos and that can communicate. Data you send on computer Transmitter show on Arduino Receiver screen.
Final result video --- http://youtu.be/g-GxWBakV-8
Specifications:
Receiver module parameters
Product Model MX-05V
Operating voltage: DC5V
Quiescent current: 4mA
Receiving frequency: 433MHZ
Receiver sensitivity:-105DB
Size: 30 * 14 * 7mm
An extra antenna is needed, please use spiral 50Ω a quarter wavelength antenna
Technical parameters of the transmitter head
Product Model: MX-FS-03V
Launch distance :20-200 meters (different voltage, different results)
Operating voltage :3.5-12V
Dimensions: 19 * 19mm
Operating mode: AM
Transfer rate: 4KB/s
Transmitting power: 10mW
Transmitting frequency: 433M
Pinout from left to right: (DATA; VCC; GND)
Step 1:
You will need for this project:
Arduino Uno
Arduino Pro MINI (you can use Uno instead of Pro MINI if you want)
WH1602 or HD44780 16x2 Character LCD Display
433Mhz or 315Mhz RF Transmitter + Receiver Module Link
male-to-male cables
male-to-feemale cable
10k potentiometer
3.7V battery
Step 2:
How to upload sketches on Arduino Pro MINI.
Remove Atmega328 from Arduino UNO
Using male-to-female cables connect Pro MINI to UNO RX-RX; TX-TX; RST-RST; GND-GND; VCC-+5V
Change in Tools-Board-Arduino Pro or Pro MINI
Upload sketch
Step 3: Receiver Code
#include
#include
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
char cad[100];
int pos = 0;
void setup()
{
lcd.begin(16, 2);
lcd.setCursor(1, 0);
vw_setup(2000);
vw_rx_start();
}
void loop()
{
byte buf[VW_MAX_MESSAGE_LEN];
byte buflen = VW_MAX_MESSAGE_LEN;
int i;
if( vw_get_message(buf, &buflen) )
{
if(pos < 2)
lcd.setCursor(0, pos);
else
{
pos=0;
lcd.clear();
}
for (i = 1; i < buflen; i++)
{
lcd.print((char)buf[i]);
pos++;
}
}
}
Step 4: Transmitter Code
#include
char cad[100];
int i=0;
void setup()
{
Serial.begin(9600);
vw_setup(2000);
Serial.print("End with \".\" each data");
}
void loop()
{
if( Serial.available() > 0)
{
cad[i] = Serial.read();
i++;
}
if( cad[i-1] == '.')
{
cad[i] = '\0';
i=0;
vw_send((byte *)cad, strlen(cad));
delay(400);
}
}
Step 5: Receiver Scheme
Step 6: Transmitter Scheme
Step 7:
Press Enter.
THATS ALL!!!
Thats my video with final result: (too long I think and on Russian, youtube subtitles are not so good but you can on it)
http://youtu.be/g-GxWBakV-8
If you have questions please write in comments.

Participated in the
Full Spectrum Laser Contest
62 Comments
Question 2 years ago
// TX
#include <VirtualWire.h>
const int ledPin = 13;
const int pk1 = 4;
const int pk2 = 5;
const int pk3 = 6;
const int pk4 = 7;
char *controller;
int parking1 = 0;
int parking2 = 0;
int parking3 = 0;
int parking4 = 0;
char mss1[20] = "Hello everybody 0";
char mss2[20] = "- - message - - 0";
void setup()
{
Serial.begin(9600);
pinMode(pk1, INPUT);
pinMode(pk2, INPUT);
pinMode(pk3, INPUT);
pinMode(pk4, INPUT);
pinMode(ledPin,OUTPUT);
vw_set_ptt_inverted(true); //
vw_set_tx_pin(12);
vw_setup(4000);// speed of data transfer Kbps
delay(100);
}
void loop()
{
parking1 = digitalRead(pk1);
Serial.println(controller);
if (parking1 == LOW)
{
controller="1" ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,LOW);
}
else
{
controller="0" ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13, HIGH);
}
}
// RX
#include <VirtualWire.h>
#include <LiquidCrystal.h>
const int rs = 10, en = 9, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
const int ledPin = 7;
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2);
vw_set_ptt_inverted(true); // Required for DR3100
vw_set_rx_pin(12);
pinMode(ledPin, OUTPUT);
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver PLL running
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" HELLO TO THE ");
lcd.setCursor (0,1);
lcd.print(" PARKING SYSTEM ");
delay (200);
lcd.clear();
}
void loop()
{
byte buf[VW_MAX_MESSAGE_LEN];
byte buflen = VW_MAX_MESSAGE_LEN;
Serial.println();
if (vw_get_message(buf, &buflen)) // Non-blocking
{
if(buf[4]=='1')
{
digitalWrite(ledPin,HIGH);
lcd.setCursor(0, 0);
lcd.print("S1:N");
Serial.println("Slot1");
}
delay(100);
if(buf[4]=='0')
{
digitalWrite(ledPin,LOW);
lcd.setCursor(0, 0);
lcd.print("S1:A");
Serial.println("Slot2");
}
delay(100);
}
}
###################################################
I have a problem with the message not appearing on the LCD
##################################################
Question 4 years ago
i made this ...transmitter is sending the message but i guess receiver is not receving and not displaying the message on lcd what should i do?
Question 5 years ago
Can you please share the rf receiver circuit along LCD display circuit diagram
5 years ago
Hello, Thanks for sharing your project, it was very helpfull to me, I used your code to make a transmitter wich send mutiple messages automaticly and shows this on a serial lcd., wirelessly i think its usefull for a lot of poeple
5 years ago
i can't understand 'vw_setup'was not declared
i get error when i compile it. anyone can help ?
6 years ago
how u connect rx to rx and tx to tx
6 years ago
HI!.. WHAT WOULD BE THE DIFFERENCE IN CODING OR CONNECTION IF I USED AN LCD 128x64 AT THE RECEIVER SIDE?
6 years ago
how the hell does that window appear on your computer .. the one which sends the message to aurdino.
Reply 6 years ago
Hi Ziadm9, go to Tools -> Serial Monitor or press Ctrl+Shift+M
6 years ago
i have a question. can many of this transmitter receiver "partner" operate at the same place? without interfering with each other?
6 years ago
How do send data from receiver to transmitter in this itself
7 years ago
Hey can someone plese help with the RF transmission and Reception between an Arduino and a Promini
7 years ago
Helo sir
Im makeing a rc airplane and i am useing xy-mk-5v/xy.../raspberry pi transmitter and receivers for arduino 445mhz. I got on amazon the 6pack. Can this code be used to link a transmitter and receiver? And how do i send a code for turning things on and off with a remote can u explain to me please if i can understand how to make an rc plane i will be able to understand how to make future projects please help me.
Also if you can can u send me to a page on instructables on how to extend the range of my transmitter and reaceiver thanks if you can help it will mean alot to me.
Reply 7 years ago
for extending the range, you need an antenna. For a plane, you're going to need a big one. Calculate the wavelength of the signal (wavelength = velocity/frequency) then make an antenna that's either 1/8, 1/4, 1/2, or 1 times the wavelength. you need the same length of antenna on each side, and you have to hold the antennae more or less parallel while in flight.
7 years ago
Is it possible to send multiple sensor readings via this module?..Meaning, assume that I have a three passive infrared sensors on the transmitter side and a red, a blue and a green led on the receiver side. Assuming the initial state of the leds is off:
*If PIR 1 is high:Turn on red led.
*If PIR 2 is high: turn on the blue led.
*If PIR3 is high: turn on the green led..
Please let me know if this is possible..
Reply 7 years ago
sure that's possible. Use the Radiohead or Virtualwire library, and simply send 1,2 or 3 for whichever infrared sensor goes off, then have a if block on the receiving end to afigure out which LED to turn on.
7 years ago
What version is your arduino 1.0.6 or 1.6.7???
7 years ago
I want to use two arduino boards with ultrasonic sensor one arduino will read distance and send its value to other arduino in a robot, give me an advice on how to do that please :)
Reply 7 years ago
It should work the same way except instead of sending the data and displaying it, it should send the data and the other arduino will accept it as a value for distance or something.
7 years ago
I have one question that didnt figure it out ,in the receiver circuit how are we gonna connect lcd to Pro mini?? in the circuit schematic you have connected lcd to arduino uno but in the video you have connected lcd to pro mini.