You are on page 1of 4

EXPT:15 REMOTE CONTROL THROUGH FM LINK

AIM:
To establish an FM link between two microcontrollers for data transfer using
Arduino board.

REQUIREMENT:
1. Arduino Board
2. Arduino IDE 1.05
3. RF transmitter
4. RF receiver
5. LED
6. Hook up wire
THEORY:
This is only the 315MHz transmitter. This will work with the RF Links at 315MHz at
either baud rate. Only one 315MHz transmitter will work within the same location.
This wireless data is the easiest to use, lowest cost RF link we have ever seen! Use these
components to transmit position data, temperature data, even current program register values
wirelessly to the receiver. These modules have up to 500 ft range in open space. The transmitter
operates from 2-12V. The higher the Voltage, the greater the range - see range test data in the
documents section.
We have used these modules extensively and have been very impressed with their ease of
use and direct interface to an MCU. The theory of operation is very simple. What the transmitter
'sees' on its data pin is what the receiver outputs on its data pin. If you can configure the UART
module on a PIC, you have an instant wireless data connection. The typical range is 500ft for
open area.This is an ASK transmitter module with an output of up to 8mW depending on power
supply voltage. The transmitter is based on SAW resonator and accepts digital inputs, can
operate from 2 to 12 Volts-DC, and makes building RF enabled products very easy.
CONNECTION DIAGRAM:

RF transmitter:

RF receiver:
PROGRAM:
RF transmitter
#include <VirtualWire.h>
char *controller;
void setup() {
  pinMode(13,OUTPUT);
vw_set_ptt_inverted(true); //
vw_set_tx_pin(12);
vw_setup(4000);// speed of data transfer Kbps
}
void loop(){
controller="1"  ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,1);
delay(2000);
controller="0"  ;
vw_send((uint8_t *)controller, strlen(controller));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13,0);
delay(2000);
}

RF receiver:

#include <VirtualWire.h>
void setup()
{
    vw_set_ptt_inverted(true);
    vw_set_rx_pin(12);
    vw_setup(4000); 
    pinMode(13, OUTPUT);
vw_rx_start();       // Start the receiver PLL running
}
    void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen))
    {
      if(buf[0]=='1'){
digitalWrite(13,1);
      }  
   if(buf[0]=='0')

{
  digitalWrite(13,0);
   }

RESULT:
Thus the FM link between two microcontrollers for data transfer using Arduino board has been
executed and verified.

You might also like