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

Prototype BreadBoard 830 tie points

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:

Print any message to the Serial Monitor window. End with point ".'

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.

Comments

author
summa kuppai (author)2017-07-20

how u connect rx to rx and tx to tx

author
stannickel made it! (author)2015-01-22

I'm so excited! I got this to work with only a couple of code fixes. The library includes were mentioned earlier: Receiver code needs: #include <VirtualWire.h> and #include <LiquidCrystal.h> and Transmitter code needs #include <VirtualWire.h>. The other fix is in the Receiver code near the bottom where it should read "for (i = 0; i < buflen; i++){" instead of for (i = 1)... The for i = 1 chops off the first letter.

20150122_firstRFcomm2.jpg
author
AchielV (author)stannickel2017-05-31

the initial for loop is correct, if you set i=0 then it places a "new line" before the string! the other changes where helpfull ;)

author
KristinD3 (author)stannickel2016-11-04

Anything else needed to be changed from the tutorial. I am looking to try this out! Thank you in advance

author
stannickel (author)KristinD32016-11-04

Should be OK with the fixes. Good luck!

author
OladipoT (author)2017-03-28

HI!.. WHAT WOULD BE THE DIFFERENCE IN CODING OR CONNECTION IF I USED AN LCD 128x64 AT THE RECEIVER SIDE?

author
ZiadM9 (author)2016-10-11

how the hell does that window appear on your computer .. the one which sends the message to aurdino.

author
vthenga muchi (author)ZiadM92017-02-23

Hi Ziadm9, go to Tools -> Serial Monitor or press Ctrl+Shift+M

author
JoziwilT (author)2017-02-20

i have a question. can many of this transmitter receiver "partner" operate at the same place? without interfering with each other?

author
Kishan Gondalia (author)2017-01-16

How do send data from receiver to transmitter in this itself

author
Kiran Pai (author)2016-09-25

Hey can someone plese help with the RF transmission and Reception between an Arduino and a Promini

author
lord awesome (author)2016-07-26

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.

author
MitchellB30 (author)lord awesome2016-08-30

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.

author
Ganesh Hosur (author)2016-07-28

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..

author
MitchellB30 (author)Ganesh Hosur2016-08-30

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.

author
athikah_sani (author)2016-08-17

What version is your arduino 1.0.6 or 1.6.7???

author
MarwaA9 (author)2016-06-10

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 :)

author
MalikE2 (author)MarwaA92016-06-25

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.

author
FurkanK15 (author)2016-05-12

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.

author
Shumayal (author)2016-04-27

Can I use this

Nordic NRF24L01 Plus 2.4GHz RF with SMA Antenna for Arduino, AVR, PIC

to communicate data from my Arduino Uno to Laptop? I'm new to this, I have seen a video of a person getting live telemetry readings (which can also be stored if programmed) but that was using some 3DR wireless.

Please direct me to somewhere I can easily understand this and identify the alternative to said 3DR models?

author
laith mohamed (author)2016-04-16

Good work

author
REX_9123 (author)laith mohamed2016-04-19

sir can you send ma a complete coding both Tx and Rx, it is giving an error.

author
MichaelN116 (author)2016-02-08

Works great. Just make sure to include both the LCD lib and the WIRELESS lib in the code.

// include the library code:
#include <LiquidCrystal.h>
#include <VirtualWire.h>

author
REX_9123 (author)MichaelN1162016-04-19

is it necessary to include the lib because it is giving an error.

author
TabbyM (author)2016-02-21

Assalam-oalikum sir.
i'm working with nrf modules for wireless communication and this is my first time dealing with them.
the libraries available for them are complex and i cant understand them well.
i want to write a simple code that could just transmit a value read from current sensor wirelessly.
please help me out.
Jazakallahu kher in advance. :)

author
RapolasL (author)2016-02-20

Hello, could anyone explain why in this code when I write the word need to press dot in the end... How to clear it out, I would like to just press enter and send a message. And when I'm writting a message, long message, the message is not moving to the second LC line, I would like to do it. Can anyone help me please ?

author
NabeelA13 (author)2016-01-01

Is any one know sketch codes to make the addition and display of second line on LCD (1602)......?

author
tuxj (author)2014-12-20

Thank you for the article, but in my case, the lcd display shows incomprehensible symbols, for examples this what shows the display when I send "hello." Is there a solution?

IMG_20141220_091737.jpg
author
FelipeS41 (author)tuxj2015-12-21

modify the speed of sending the charcaters to the lcd

author
headslant (author)tuxj2015-11-20

Did you check your wiring? when i hooked mine up I mixxed up some wires, and It showed weird stuff...

author
ΓιώργοςΚ9 (author)2015-11-23

Nice project !
I want to send instead of letters on numbers written on serial i want to send values of analog pins or a defined number without a pc needed!
Thaks in advance!

author
nodoubtman (author)2014-08-12

Nice instructables! My plan is to make a wireless doorbell, can you help me out a little bit?

thanks!
marC:)

author
headslant made it! (author)nodoubtman2015-11-20

I know this is a little late, but here is some code...

I didn't test it, but it should work

Doorbelltransmitter.inoRFreceiver1.ino
author
headslant (author)nodoubtman2015-11-20

I know this is a little late, but here is some code...

I didn't test it, but it should work

Doorbelltransmitter.inoRFreceiver1.ino
author
headslant (author)nodoubtman2015-11-20

I know this is a little late, but here is some code...

I didn't test it, but it should work

Doorbelltransmitter.inoRFreceiver1.ino
author
nodoubtman (author)nodoubtman2014-11-15

for the receiver :

#include <VirtualWire.h>
#include <LiquidCrystal.h>

for the transmitter:

#include <VirtualWire.h>

Thanks! :)

have a good night! :)

marC:)

author
flint.defrenne (author)2015-08-07

How do I Make the antenna, and where do I attach?

author
headslant (author)flint.defrenne2015-11-20

on the transmitter there should be a hole marked ANT, solder the antenna (15-25cm) there..

author
headslant made it! (author)2015-11-20

Cool. I needed a similar project, and I built my own, it is a little different, but it works...

https://www.instructables.com/id/WEDThe-Wireless-Electronic-LCD-Display/

F5IF109IH2DV5FF.MEDIUM.jpg
author
robmawe91 (author)2015-11-17

I'm getting the error compilling...

uint8_t prescalers[] PROGMEM = {0, 0, 3, 6, 8, 10, 12}; /* Must be outside the function */

author
DaleW6 (author)2015-11-14

Yeah Not so cool.

So where s the library and a code with no errors?????????????

Another incomplete instructable YAY!!

Glad people are here to fix your project for you.

author
cveng (author)DaleW62015-11-16

What did you contribute here except complaints?

author
DaleW6 (author)cveng2015-11-17

Yes my fault I made an instructable for the world wide web that does not even work.
Awesome.

author
cveng (author)DaleW62015-11-17

Question remains. What did YOU do except whining?

Site is free of charge, and nobody forces you to do the projects or even read about them.

author
ThànhN23 (author)2015-11-03

Hi

I want to control many Relay by using RF , Point to multi Point

So , What i mush do to config RF module , how does it know Address or ID each Recever module ?

author
RishikeshC (author)2015-10-12

also I would like to know which library do we have to upload

author
RishikeshC (author)2015-10-12

hey guys I'm I'm new to this wireless communication thing so I need a little help

I don't want to start by doing stuff on a lcd screen I want to start by simple thing as switching on one led can anyone help me with the code for both transmitter and receiver ?

author
DanR40 (author)2015-10-12

what would the potential range be with a larger aerial? I'm looking at something that can span about 1km open country (clear line of sight)

author
anandhs1996 (author)2015-09-21

i have error 'vw_setup'was not declared in this scope

help me

author
kefilwe52 (author)2015-09-14

thanks