Instructables
loading
loading

RF 315/433 MHz Transmitter-receiver Module and Arduino

Picture of RF 315/433 MHz Transmitter-receiver Module and Arduino
RF_315Mhz_Transmitter_Receiver-500x500.jpg
RF Module 017.JPG
Hi every body , I searched on Instructables about a simple RF Transmitter-receiver module , Which is used in Remote control for cars , or to control simple tasks , like control relay on/off unfortunately I didn't find What I need   , So i decided to write a simple artical about this transceiver and How we can connect it with arduino  and program it .

Materials: 

at first let's take a look for what we need :

1)  2 Arduino Board "I used Uno" 

2) RF 315MHz or 433MHz transmitter-receiver module .

3) jumper wire .

4) BreadBoard .

5)External Power supply (9V Battery *2) "Optional" .

 
Remove these adsRemove these ads by Signing Up

Step 1: Module Specification

Picture of Module Specification
315-MS-3_zpsdd9bdc2a (1).jpg
This module has a specification for :

Transmitter : 

Working voltage: 3V - 12V  fo max. power use 12V
Working current: max  Less than 40mA max , and min 9mA
Resonance mode: (SAW)
Modulation mode: ASK
Working frequency: Eve 315MHz  Or  433MHz 
Transmission power: 25mW (315MHz at 12V)
Frequency error: +150kHz (max)
Velocity :  less than 10Kbps

So this module will transmit up to 90m in open area .

Receiver :

Working voltage: 5.0VDC +0.5V
Working current:≤5.5mA max
Working method: OOK/ASK
Working frequency: 315MHz-433.92MHz
Bandwidth: 2MHz
Sensitivity: excel –100dBm (50Ω)
Transmitting velocity: <9.6Kbps (at 315MHz and -95dBm)

 the use of an optional antenna will increase the effectiveness of your wireless communication. A simple wire will do the trick.

Step 2: Schematics

Picture of schematics
TX.png
the connection for this module is very easy .

for Transmitter :

Vcc >>>>5V
ATAD>>>D12"You can change it as you like from Software" .
Gnd >>> Gnd

Receiver :

Vcc>>>>5V
Data>>>D12
Gnd>>>Gnd
1-40 of 140Next »
MakisB16 days ago

Is there any way to connect multiple transmiters to one receiver ?

WernerM27 days ago

I was wondering if anyone know how to change or manipulate the frequency because their are a very popular gate motor remote control on the market that interacts with this RF sender .....

Doesn't complile.

VirtualWire.h:14:20: fatal error: wiring.h: No such file or directory

Where does this file come from?

better into (and newer versions) of the VirtualWire library are here:

https://www.pjrc.com/teensy/td_libs_VirtualWire.html

Gyalu13 days ago

Hi Mohannad,

Thank you for the instructions, I built my RF project according to the info you shared.

I have an outdoor unit with a DHT22 thermometer and the transmitter unit and an indoor unit with a receiver, a real time clock and an LCD display and I send the measured temperature and humidity values through the RF transmitter to the indoor unit and show them on the LDC. Usually it works properly.

But after a certain time the received string starts to be shorter and I loss first some chars from the humidity value later the whole humidity and some chars from the temperature also. During this I am monitoring the the sent string through the serial monitor and it is correct.

Have you ever detected this issue? Do you have any suggestion / solution to do it?

THX, Gyalu

sitiirani16 days ago

Hi. Can I use RF transmitter and connected to arduino to communicate with smartphone ?

NiyatiK29 days ago

I am using RF module of 434MHz.I am sending small text from transmitter to receiver ,for that i am using virtual wire library.After receiving the text at receiver site I want to play small audio file.I am using PCM library for playing sound file on arduino ,because my audio file is very small and i don't want to use external memory.but the problem is when I import virtual wire and PCM in same code at receiver it is throwing error.I am beginner in arduino so I am not getting why it is not allowing both library together.
I am using arduino leonardo at transmitter site and Uno as receiver.
Is their any solution through which I can play my audio file at receiver without using sd card?

gmt9183 months ago

Hi, this is a good intractable but there is a way easier way to use these modules. Instead of using Virtual Wire library, all you have to do is plug the data pin from the receiver module into the rx (0) pin on your arduino, and plug the data pin from your transceiver module into the tx (1) pin on your other arduino. There is no external library needed for this. Here is the code for the receiver:

//receiving rx code

int incomingByte = 0;

void setup(){

//2400 baud for the 434 model

Serial.begin(2400); }

void loop(){

// read in values, debug to computer

if (Serial.available() > 0) {

incomingByte = Serial.read();

Serial.println(incomingByte, DEC);

}

incomingByte = 0;

}

Note****When uploading lis code to your arduino, you need to disconnect the wire from the rx pin or it won't upload.

Here is the code for the transceiver:

//sending tx code

byte counter;

void setup(){

//2400 baud for the 434 model

Serial.begin(2400);

counter = 5;

}

void loop(){

//send out to transmitter

Serial.write(counter);

delay(10);

}

Note****You need to disconnect the wire from the tx pin and reconnect it later when uploading your code to the arduino.

Note****This is not my code. I got it from another website.

Hope this helps everybody.

code does not work...because after uploading the code in arduino that is connected with transmitter ,the transmitter led glow but after disconnect the arduino from pc and give it external power supply the transmitter led will not glowing ,and i think the transmitter will not send any data...kindly tell me the solution.

Try unplugging both the tx and rx wires when uploading. It should work then. Sorry about that. Plug those wires back in later.

what project to help this code ??

gocreeps14335 months ago

ERROR help!


transmitter.pde: In function 'void setup()':
transmitter:19: error: 'vw_set_ptt_inverted' was not declared in this scope
transmitter:20: error: 'vw_setup' was not declared in this scope
transmitter.pde: In function 'void loop()':
transmitter:28: error: 'vw_send' was not declared in this scope
transmitter:29: error: 'vw_wait_tx' was not declared in this scope

library would be in wrong place. I had the same problem, I deleted the library downloaded it once more and it worked.

Thanks man. It Worked! Sir can i Have your email? i would like to asked some questions regarding programming wireless communicaiton. I hope it's okay, thanks.

how you resolve this problem, because i have face same problem...please help me even i replaced the library with a new one.but same problem

you could send a private message on instructables itself.

Don't know if it helps. But i replaced <WProgram.h> with <Arduino.h> in virtualWire.cpp

spudziuvelis4 months ago

Arduino: 1.5.7 (Windows 8), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from transmitter.pde:6:0:
C:\Program Files (x86)\Arduino\libraries\VirtualWire/VirtualWire.h:14:20: fatal error: wiring.h: No such file or directory
#include
^
compilation terminated.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

i was trying to compile trasmitter example aaaaand this error appeared

You must install the VirtualWire library before compile the code, you can download it from the article where it says: "First Download the library from Here .". Afterwards, uncompress it to your arduino library folder which is in this case: "C:\Program Files (x86)\Arduino\libraries\"
After doing this, close all arduino compiler interfaces and you should see a new set of examples. The code is now able to run. Good luck ;)

.

i install the VirtualWire library but i face a lot of errors.i have paste all the errors below.please give me the solution asap.

In file included from transmitter.cpp:11:

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:54: error: variable or field 'vw_set_tx_pin' declared void

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:54: error: 'uint8_t' was not declared in this scope

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:58: error: variable or field 'vw_set_rx_pin' declared void

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:58: error: 'uint8_t' was not declared in this scope

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:62: error: variable or field 'vw_set_ptt_pin' declared void

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:62: error: 'uint8_t' was not declared in this scope

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:66: error: variable or field 'vw_set_ptt_inverted' declared void

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:66: error: 'uint8_t' was not declared in this scope

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:71: error: variable or field 'vw_setup' declared void

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:71: error: 'uint16_t' was not declared in this scope

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:90: error: 'uint8_t' does not name a type

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:96: error: 'uint8_t' does not name a type

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:99: error: 'uint8_t' does not name a type

C:\Users\decent\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:104: error: 'uint8_t' does not name a type

transmitter.cpp: In function 'void setup()':

transmitter.pde:-1: error: 'vw_set_ptt_inverted' was not declared in this scope

transmitter.pde:-1: error: 'vw_setup' was not declared in this scope

transmitter.cpp: In function 'void loop()':

transmitter.pde:-1: error: 'vw_send' was not declared in this scope

I installed the library but it doesn't matter now cause i fixed it myself by downgrading from 1.5.6. Ide to 1.0.6.ide and it worked

same issue i have faced.Do you have any solution for it

Digital Explorer made it!2 months ago
finished
temp_99993441.jpg

share the code please

ka1821 month ago

Hi there,

I need help.. I'm using 433Mhz transmitter/receivers Module. data is sent from my transmitter to my receiver module without any issue but when using adafruit bmp183 temp sensor, sensor data value is wrong. i did some debugging and notice that issue is with vw_setup() function, when value is greater than 0 values temp value goes wrong. does anyone have the same issue or does anyone know how to fix it? i think that it is something related with clock speed issue. adafruit bmp183 calcs are based on 16Mhz and i think that that function may change clock speed on my arduino. :(

please send me the sample code that is working for you.

uolengineer@gmx.com

AdithyaA21 month ago

can you make a one were if you press an led, it sends the signal to the other one

Awesome tutorial! I was wondering. Does controller have to be integer? or can it be a string ??

Arvix2 months ago

Work great! Thanks!

AndrésM42 months ago

does it work in NLOS conditions??

KilianO3 months ago

Has anyone found a nice Half-Duplex solution for 433MHz modules and VirtualWire on Arduino?

Would appreciate any suggestions. Thanks,

Kilian

take a HC-12 instead...

StatikZ made it!2 months ago

Got it to work, following instructions, of course! Now I'm off to trying to get some wireless communication in order to display information to a LCD display. Shouldn't be too hard if I figure out the LCD commands.

Wireless Arduino TX RX Basic Circuit - 1_22_2015.jpg
azimazwan3 months ago

hi everyone. why i cannot compile this coding? it said that my header is not define. somebody help me please? contact me at azimazwan@gmail.com

tqvm

azimazwan3 months ago

hi everyone. why i cannot compile this coding? it said that my header is not define. somebody help me please? contact me at azimazwan@gmail.com

tqvm

azimazwan3 months ago

hi everyone. why i cannot compile this coding? it said that my header is not define. somebody help me please? contact me at azimazwan@gmail.com

tqvm

TomášV3 months ago

Hi,

can you help me please.. Can I use this for wireless conecting guitar to amp?

Actually can you help me with code or something like this?

Thanks

RobinB13 months ago

NOTHING BUT A BUNCH OF ERRORS !!!!

kalium.pt3 months ago

Hi! Can I use the transmitter module with a VCC of 12 V and connect the data directly to the arduino D12?

Kalium can you help me in a project? Will pay for you...
1-40 of 140Next »