Arduino Projects

Arduino 433Mhz rf transmitter and receiver

Description:

 

Arduino 433Mhz RF Rx Tx- In this Tutorial, you will learn, how to make your own wireless remote control system using Arduino and 433MHz RF Radiofrequency transmitter and receiver modules. 433Mhz RF Rx Tx modules are quite famous for short-range uni-directional communication. These 433Mhz RF modules can be used for monitoring and controlling.  This tutorial covers all the basics steps by step.

  • H-Bridge explanation
  • Transmitter and Receiver Circuit Diagrams explanation.
  • Transmitter and receiver module Pinout.
  • Transmitter and receiver program explanation.

H-Bridge:

H-bridges are very commonly used in robotics for controlling the direction of DC Motors. Each DC motor can have one H-bridge. If two H-bridges are used with two motors in a Robot, the Robot forward, left and right movements can be controlled. This remote controller can be used to control almost anything. By increasing the number of buttons many electrical loads can be controlled.

In this Project, two H-Bridges will be controlled wirelessly. Basically we have two types of H-bridges.

  • Relays based H-bridge.
  • Mosfets based H-bridge.

The relays based H-bridges are used in low speed switching circuits, where we need to Turn on or Turn off an electrical load at low switching speeds greater than 500 milliseconds. While the MOSFETs based H-Bridges are used in high speed switching circuits where we need to control the motor using the Pulse Width Modulation. As in the project under discussion, we are not using the Pulse width modulation, so in this project, Relays will work just fine.

In relays based H-Bridge, two relays are used to change the polarity of the DC Motor. The working of the H-Bridge will be explained in the receiver circuit diagram.


Amazon Links:

12v Adaptor:

Arduino Uno

Arduino Nano

Mega 2560:

Pushbutton:

433 MHz Transmitter and Receiver Modules:

12V SPDT Relay:

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

 433Mhz RF and Arduino Circuit Diagrams:

1 433Mhz RF Transmitter and Arduino Circuit Diagram:

433Mhz RF

The transmitter circuit is really simple as it consists of only 4 push buttons and a transmitter module. As you can see one leg of all the push buttons is connected with the ground. while the other legs are connected with pin numbers 2, 4, 7 and 8 of the Arduino.

While the VCC of the transmitter module is connected with Arduino’s 5v, GND is connected with the Arduino’s ground and data pin is connected with pin number 12 of the Arduino. To increase the range a wire can be soldered with the antenna.

433Mhz RF

This is a 433Mhz RF transmitter module, as you can see it has three male headers labeled with data, Vcc and ground. Its connection with the Arduino is already explained in the circuit diagram.

433Mhz RF

This is the 433Mhz RF receiver module, it has 4 male headers. the rightmost pin is the VCC and the leftmost pin is the ground. while the middle two pins are interconnected and these are the data pins. Connect any of these two pins with pin number 11 of the Arduino.


433Mhz RF Receiver and Arduino Circuit Diagram:

433Mhz RF

This is the circuit diagram of the receiver. As you can see the 433Mhz RF receiver module VCC pin is connected with the Arduino’s 5v, the ground is connected with the Arduino’s ground and the data pin is connected with Pin number 11 of the Arduino.

On the right side, we have two H-bridges, each H-bridge is used to control one motor, with the help of these H-bridges the direction of rotation of the motors can be controlled. The DC motor two wires are connected with the relay common contacts. While the relay normally close and normally open contacts are connected with the External Power Supply. By turning ON and Turn Off the relays we can control the direction of the dc motor.


Download: “H-bridge PCB board”

relay hbridge

Programming:

This Project is based on two programs, one program is written for the transmitter, while another program is written for the Receiver side.

Arduino 433Mhz Rf Transmitter side Programming:

// transmitter.pde
#include <VirtualWire.h>

const int led_pin = 11;
const int transmit_pin = 12;

const int transmit_en_pin = 3;

int button = 7;
int button1 = 8;

int button2 = 2;
int button4 = 4;

void setup()
{
    // Initialise the IO and ISR
    vw_set_tx_pin(transmit_pin);

    pinMode(button, INPUT);
    pinMode(button1, INPUT);
       pinMode(button2, INPUT);
    pinMode(button4, INPUT);
    vw_setup(2000);       // Bits per sec
    
}

byte count = 1;

void loop()
{

  char msg[7] = {'h'};
char msg1[7] = {'j'};
char msg2[7] = {'l'};
char msg3[7] = {'m'};
char msg8[7] = {'z'};

 // msg[6] = count;
 if(digitalRead(button) == 0 )
 {
  
  vw_send((uint8_t *)msg, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 }
 
  if(digitalRead(button1) == 0 )
 {
  
  vw_send((uint8_t *)msg1, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 }   if(digitalRead(button2) == 0 )
 {
  
  vw_send((uint8_t *)msg2, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 }   if(digitalRead(button4) == 0 )
 {
  
  vw_send((uint8_t *)msg8, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 }    
   else 
 digitalWrite(button, HIGH);
 digitalWrite(button1,HIGH);
 digitalWrite(button2,HIGH);
 digitalWrite(button4,HIGH);
 

}

Arduino 433Mhz Rf Receiver side Programming:

#include <VirtualWire.h>

const int led_pin = 13;
int rightmotor1 = 2; // right side motor
int rightmotor2 = 3; // left side motor

int leftmotor1 = 7;
int leftmotor2 = 8;

const int receive_pin = 11;


void setup()
{
    delay(1000);
    Serial.begin(9600); // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR

    vw_set_rx_pin(receive_pin);

    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);  // Bits per sec

    vw_rx_start();       // Start the receiver PLL running

    pinMode(led_pin, OUTPUT);
    digitalWrite(led_pin, LOW);
    

    pinMode(rightmotor1, OUTPUT);
    pinMode(rightmotor2, OUTPUT);
    pinMode(leftmotor1, OUTPUT);
    pinMode(leftmotor2, OUTPUT);
    
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
    int i;

     
    // Message with a good checksum received, dump it.
    Serial.print("Got: ");
    
    for (i = 0; i < buflen; i++)
    {
        char c = (buf[i]);
    if( c == 'z')
    {
    digitalWrite(led_pin , LOW);
    digitalWrite(rightmotor1 , LOW);
    digitalWrite(rightmotor2 , LOW);
    digitalWrite(leftmotor1 , LOW);
    digitalWrite(leftmotor2 , LOW);
            Serial.print(c);
        Serial.print(' ');
           
    } 
        if( c == 'j') // for right side
    {
       digitalWrite(rightmotor1 , LOW);
                digitalWrite(rightmotor2 , LOW);
            digitalWrite(led_pin, LOW);
                digitalWrite(leftmotor1 , HIGH);
                digitalWrite(leftmotor2 , LOW);
                             delay(200);
                digitalWrite(leftmotor1 , LOW);
                digitalWrite(leftmotor2 , LOW);
                delay(200);
              //  digitalWrite(leftmotor1 , HIGH);
              //  digitalWrite(leftmotor2 , LOW);
            Serial.print(c);
        Serial.print(' ');
           
    }

 if( c == 'h') // for straight
    {
      
            digitalWrite(led_pin, HIGH);
    digitalWrite(rightmotor1 , HIGH);
    digitalWrite(rightmotor2 , LOW);
       
    digitalWrite(leftmotor1 , HIGH);
    digitalWrite(leftmotor2 , LOW);
            Serial.print(c);
        Serial.print(' ');
           
    }  
     if( c == 'l') // for left
    {
                  digitalWrite(leftmotor1 , LOW);
                digitalWrite(leftmotor2 , LOW);
                 digitalWrite(rightmotor1 , HIGH);
                digitalWrite(rightmotor2 , LOW);
                delay(200);
                digitalWrite(rightmotor1 , LOW);
                digitalWrite(rightmotor2 , LOW);
                delay(200);
//                digitalWrite(leftmotor1 , LOW);
//                digitalWrite(leftmotor2 , HIGH);
            Serial.print(c);
        Serial.print(' ');
           
    }     
    if( c == 'm')
    {

            Serial.print(c);
        Serial.print(' ');
           
    } 

    }

    }
}

Watch Video Tutorial:

Other Projects based on the 433Mhz RF Tx and Rx:

Wireless Joystick controlled Robot Car using Arduino, 433Mhz RF and L298N Motor Driver

Wireless Hand gesture controlled Robot with Flex Sensor using Arduino

Load balancing of a 3 Phase Transformer, Arduino 3 Phase Load Balancer

Wireless Joystick controlled Robot Car using Arduino, 433Mhz RF and L298N Motor Driver

Tongue Controlled Wheelchair using Arduino and Hall effect Sensors

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button