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

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.

 
1-40 of 168Next »
TonyM241 minute ago

If i put the RF receiver into a completely sealed box, will the receiver still be able to receive data? or should i put an antenna outside the box connecting the rf reciever inside?

Hello Mohanad,

Great instructable, thanks for sharing with us.

I wanted to ask is there a way to send raw bits?
For example if I wanted to send those bits "0010110" and receive them as is, is there a way to do that other than sending the stream as a string using VirtualWire library?

joabe887 days ago

hello, i need help

I am designing a distance meter, but for that I will use (read) the signal strength value (the RSSI technique) sent by TX. I will can do with this RX and TX?

joabe887 days ago

hello, i need help

I am designing a distance meter, but for that I will use (read) the signal strength value (the RSSI technique) sent by TX. I will can do with this RX and TX?

Obriris2 months ago

Hi. I am a lighting designer, trying to wirelessly turn on/off LED lights, wirelessly. I have a 4 channel transmitter/receiver (see images). The first channel would be an all on/off, for the other 3 channels, their loads 1amp, each. Does anyone have an idea of how I would complete this task? Thank you SO much, in advance.

DSC00053.JPGDSC00054.JPG

I am not sure eaxactly what yr TxRx pair does but if you already have 4 channels then let yr arduino react to those 4 channels with the desired action.
Ofcourse you do not need 4 channels as you can just send codes through 1 channel and let your arduino switch the desired outputs for your lights. You can either do that with a relay or a Thyristor or Triac.
Without more info on what u exactly want it is hard to tell u more

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

http://www.instructables.com/id/433-MHz-Coil-loade...

attach to the little hole marked antenna

More on antenna theory, links to calculators for different antennas, and a cool project to try can be found here: http://www.whatisacnc.com/pages/Antenna-Radio.PHP

An index to those calculators here: http://www.whatisacnc.com/pages/antenna

diy_bloke12 days ago

Interesting. I have used the Tx-Rx modules as shown here quite frequently.
You are right, asimple wire antenna (17.3 cm makes a difference, but in my experience 90 m is highly overrated.
With the 17.3 wire antenna maybe i came to 6 meters. The Transmitter module is pretty good, but the receiver is crap.

What does make a difference though is the antenna. I have used the straight wire antenna but found the following simple antenna makes a BIG difference

http://www.instructables.com/id/433-MHz-Coil-loade...

Crtek20 days ago

Is it possible to send and read analog signals? (maybe without the library?)

I've tried plugging 5V into the receiver and grounded it, then tested the data pins with leds connected from them to GND and they shine/flicker. However if I try analogRead it reads a constant value of 15 (even when unplugged).

spudziuvelis8 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

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

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

dowload this library :) it works for me

Hi spudz.

I'm using Arudino 1.6.3, and had the same problem that you dit. This is how I fixed it...

You have to edit some files in VirtualWire library:

- in VirtualWire.h change:

#include <wiring.h> to #include <Arduino.h>

- in VirtualWire.cpp change:

#include "WProgram.h" to #include "Arduino.h"

After that restart Arduino studio and compile the program again.

Hope it helps you to.

Moshe Malia zmale2 months ago

thanks!

it helped, thanks!

I am not sure if the missing library in your listing is an html problem or that you do not have it included in yr program, but that could be yr problem

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
vipins31 month ago
Ned951 month ago

Pls I need help to rectify this errors

Arduino: 1.5.8 (Windows 8), Board: "Arduino Uno"

Build options changed, rebuilding all

Using library VirtualWire in folder: C:\Users\Documents\Arduino\libraries\VirtualWire (legacy)

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=158 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\Documents\Arduino\libraries\VirtualWire C:\Users\AppData\Local\Temp\build8942404980792644047.tmp\Receiver_rx.cpp -o C:\Users\AppData\Local\Temp\build8942404980792644047.tmp\Receiver_rx.cpp.o

Receiver_rx.ino: In function 'void setup()':

Receiver_rx.ino:18:17: error: 'recieve_pin' was not declared in this scope

Receiver_rx.ino: In function 'void loop()':

Receiver_rx.ino:32:3: error: 'unit8_t' was not declared in this scope

Receiver_rx.ino:32:11: error: expected ';' before 'buf'

Receiver_rx.ino:37:22: error: 'buf' was not declared in this scope

Receiver_rx.ino:37:28: error: 'buflen' was not declared in this scope

Error compiling.

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

Great! This new library solve the problem! Awesome! Thanks!

good to know. Mind you though that virtualWire is at the end of its lifespan and is being replaced by 'radiohead' http://www.airspayce.com/mikem/arduino/VirtualWire...
there is ofcourse also 'Manchester code'

It is a very good tutorial.First time rf worked for me!

MeenaB3 months ago

i've got these modules and i was using them with HT12E and HT12D ICs without micro controller and they work, but they don't work without an antenna. any ideas about how to make the best antenna for that module?

ShawnS33 months ago

How would one handle interference with multiple TX/RX?

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

I seem to remember that vw cannot send strings

NiyatiK5 months 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?

diy_bloke NiyatiK3 months ago

Hi NiyatiK
I think your probem could be bacause both libraries use timer1.
Also, the PCM library is very processor intensive and relies heavily on interruupts that can cause problems with other time sensitive software

chrischampion3 months ago

I'm wondering if there's any way to just do a simple "on" for the transmitter. I want to make a small box with just a battery and a button. When you press the button, the TX sends a signal that the RX understands.

Yes that is possible. Just pull the datapin HIGH.
But ofcourse if you want a specific code pattern to be sent at the push of a button you still need a device that makes that code pattern. e.g. an attiny that generates that in its set up. 'ON" is than 'run the setup' which you then feed to the transmitter datapin

particalman4 months ago

Great project for my final communications lab

MakisB14 months ago

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

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

Gyalu4 months 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

1-40 of 168Next »