Arduino Projects

Hybrid Robot Powered by Solar & Wind energy with Wireless control

Hybrid Robot Description:

 

Hybrid Robot Powered by Solar & Wind energy with Wireless control system- In this project you will learn how to make a Hybrid Robot that can be powered up using the Solar and Wind energy with complete wireless remote control system using 433Mhz Radio Frequency Transmitter and Receiver module. The control system is entirely based on the Arduino Uno.

The Forward, Reverse, Left, and Right movement of the Hybrid Robot is controlled using the Transmitter circuit consisting of the Pushbuttons. The 12 volt Battery charging can also be controlled using the transmitter circuit. We can activate the battery charging from the Solar Panel or from the Wind Turbine. We can disconnect the charging and we can also connect both the voltage sources “Solar & Wind”.

Relay based H-bridges are used to control the Forward and Reverse movements of the DC gear motors. The transmitter side will be powered up using the 9 volt battery. While, the receiver side is powered up using a 12 volt battery, which will be charged using the Solar and Wind energy. This is an ideal project for Engineering and B-tech students. This project can be further modified, some sensors can be installed for obstacle detection, etc. You can find more related projects in the related projects section given at the end.

For the practical demonstration watch video given at the end of this article.

Without any further delay, let’s get started!!!


Amazon Purchase Links:

12v Adaptor:

Arduino Uno

Arduino Nano

12v Battery:

433 MHz Transmitter and Receiver Modules:

Car Wiper 12V gear Motor

Solar panel:

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!


About the DC Gear Motors used in this Project:

Makermotor 3/8″ D Shaft 12V DC Reversible Electric Gear Motor 50 RPM

Hybrid Robot

  • Rated Voltage: 13.5 VDC
  • 3/8″ shaft with 1 flat (“D” shaft) where flat to OD is 0.322″ and the length of the shaft is 0.886″ long
  • Rated Speed: 50 RPM
  • Mounting: M6 screw holes
  • Rated Torque: 6 N-m (4.4 ft-lb)


About the 433Mhz Radio Frequency TX and RX modules:

I have a very detailed tutorial on how to use the 433Mhz Radio Frequency transmitter and receiver modules.

Solar Panel Used in this Project:

Hybrid Robot

ECO-WORTHY 10W Solar Panel 10 Watt 12 Volt Pv Solar Module, Solar Cell Panel

Click on the link below if you want to check out 5 watts, 25 watts kit, and 25 watts.

https://amzn.to/332c3nh


Hybrid Robot Transmitter Circuit Diagram:

Hybrid Robot

The Hybrid Robot transmitter side circuit is very simple as you can see in the circuit diagram above. The Arduino Uno is powered up using a 9 volt battery. 8 Pushbuttons are connected with the Arduino Uno. As you can see one side of all the Pushbuttons are connected with the ground, while the other sides of all the Pushbuttons are connected with the Arduino Uno I/O pins.

The Pushbutton S1 which is connected with the Arduino’s pin number 2 is used to control the Forward movement of the Hybrid Robot. The Pushbuttons S2 and S3 which are connected with the Arduino’s pin number 4 and pin number 3 are used to control the Right and Left movement of the Hybrid Robot. The S4 switch which is connected with the Arduino’s pin number 5 is used to control the Reverse movement of the Hybrid Robot; you can also use this Pushbutton for stopping the Hybrid Robot.

The Pushbuttons S5 and S6 which are connected with the Arduino’s pin number 6 and pin number 7 are used to start and stop charging from the Solar Panel. The Pushbuttons S7 and S8 which are connected with the Arduino’s pin number 8 and pin number 9 are used to start and stop charging from the Wind Turbine.

The VCC pin of the 433Mhz RF transmitter module is connected with the Arduino’s 5v, ground of the transmitter module is connected with the Arduino’s ground while the Data pin of the 433Mhz RF transmitter module is connected with the Arduino’s pin number 12.

Note: you can increase the range a bit by soldering a wire with the Antenna pin of the Transmitter module.


Hybrid Robot Receiver Circuit Diagram:

Hybrid Robot

The Hybrid Robot receiver circuit looks a bit confusing or complex, but trust me it’s very simple and you will understand everything if you read the things I am going to explain.

The Arduino Uno and all the electronic components are powered up using the 12 volt Battery. All the ground are interconnected. Let’s start with the 433Mhz Radio Frequency receiver module. The VCC pin of the 433Mhz RF receiver module is connected with the Arduino’s 5v, ground of the receiver module is connected with the Arduino’s ground while the Data pin of the 433Mhz RF receiver module is connected with the Arduino’s pin number 11.

As you can see in the circuit diagram, each Motor is controlled using two relays. These relays are of the type SPDT “Single Pole Double Throw”. The connections of both the H-bridges are exactly the same except the Arduino pins. Let me explain what is an H-bridge and how it works.

An H-bridge is used to control the Forward and Reverse rotation/direction of the DC motor. The two relays in an H-bridge are used to change the polarity of the voltage supplied to the motor. As you can see in the circuit diagram, Normally Closed contacts of the relays are connected with the battery ground while the Normally Opened contacts of the relays are connected with the Battery 12 volts. While, the common contact of the relays are connected with the Motor terminals.

If you turn On one relay and keep the other relay OFF the motor rotates in one direction, and vice versa. The motor remains Off if both the relays are Turned OFF or Turned ON. If there is no change in the polarity the motor will remain OFF.

The two H-bridges are controlled using the Arduino’s pins 2, 3, 7, and 8. 5v from the Arduino turns on the relay, while the 0 “gnd” turns off the relay.

The two relays on the right side are used to control the charging of battery from the Solar Panel and Wind Turbine. You might have noticed one thing, I am using the same 2n2222 NPN transistors and 10k ohm resistors for controlling all the relays. The 2n2222 NPN transistor and 10k ohm resistor makes the relay driver circuit. Read my previous tutorial on the relay driver circuit designing and calculation.

Hybrid Robot

Download H-Bridge Proteus Simulation: robot

I checked the H-bridge connections using the Proteus simulation. I successfully controlled both the motors.

Hybrid Robot

Download the H-bridge PCB board layout: relay hbridge

After, I was satisfied with the testing and all the connections, then finally, I designed a PCB board for the H-bridge. In an overload situation the copper wires can damage, I recommend apply solder to the wires this will increase the current ratings of the PCB wires.


Hybrid Robot Programming:

The Hybrid Robot project is based on two Arduino programs. One program is written for the Transmitter side Arduino, while the other Program is written for the Receiver side Arduino. Each program is well commented. If you still find anything confusing, you can let me know in a comment.

Hybrid Robot Transmitter Arduino Programming:

#include <VirtualWire.h>

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

const int transmit_en_pin = 3;

int button = 2; // for straight
int button1 = 3; // right 

int button2 = 4; // left
int button4 = 5; // stop

int button5 = 6; // to start charging from solar
int button6 = 7; // to stop charging from solar

int button7 = 8; // to start charging from wind turbine
int button8 = 9; // to stop charging from wind turbine.





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); 
    pinMode(button5, INPUT); 
    pinMode(button6, INPUT); 
    pinMode(button7, INPUT); 
    pinMode(button8, INPUT); 
    vw_setup(2000);       // Bits per sec
    
}

byte count = 1;

void loop()
{

 
  char msg[7] = {'h'}; // straight
char msg1[7] = {'j'}; // right
char msg2[7] = {'l'}; // left
char msg3[7] = {'m'}; // garbage value
char msg8[7] = {'z'}; // stop

// solar planel charge controlling
char msg9[7] = {'s'}; // start charging from solar
char msg10[7] = {'t'}; // stop charging from solar

// wind turbine charge controlling 
char msg11[7] = {'w'}; // start charging from wind
char msg12[7] = {'x'}; // stop charging from wind

 // 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);

 }   

// solar charging 

 if(digitalRead(button5) == 0 )
 {
  
  vw_send((uint8_t *)msg9, 1); // sends s to the receiver
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 } 
  if(digitalRead(button6) == 0 )
 {
  
  vw_send((uint8_t *)msg10, 1); // sends t to the receiver
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 } 
 
 // wind charging 

 if(digitalRead(button7) == 0 )
 {
  
  vw_send((uint8_t *)msg11, 1); // sends w to the receiver
  vw_wait_tx(); // Wait until the whole message is gone

  delay(1000);

 } 
  if(digitalRead(button8) == 0 )
 {
  
  vw_send((uint8_t *)msg12, 1); // sends x to the receiver
  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);
 digitalWrite(button5,HIGH);
 digitalWrite(button6,HIGH);
 digitalWrite(button7,HIGH);
 digitalWrite(button8,HIGH);
 

}


Hybrid Robot Receiver Arduino 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;

int solar = 5; // relay connected for charging from solar
int wind = 6; // relay connected fro charging from wind

// we are using flags to stop the unnecessary repetition of code

int sflag = 0; // solar flag 
int wflag = 0; // wind flag 

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);
    
    pinMode(solar, OUTPUT); 
    pinMode(wind, OUTPUT); 
    
// keep all the motors low    
    digitalWrite(rightmotor1, LOW); 
    digitalWrite(rightmotor2, LOW); 
    digitalWrite(leftmotor1, LOW); 
    digitalWrite(leftmotor2, LOW); 
    
 // keep charging low by default.    
    digitalWrite(solar, LOW); 
    digitalWrite(wind, LOW); 
    
}

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(led_pin, HIGH);
    digitalWrite(rightmotor1 , LOW);
    digitalWrite(rightmotor2 , HIGH);
       
    digitalWrite(leftmotor1 , LOW);
    digitalWrite(leftmotor2 , HIGH);
            Serial.print(c);
        Serial.print(' ');
           
    } 
        if( c == 'j') // for right side
    {
       digitalWrite(rightmotor1 , LOW);
                digitalWrite(rightmotor2 , LOW);
            digitalWrite(led_pin, LOW);
                digitalWrite(leftmotor1 , LOW);
                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 , LOW);
                digitalWrite(rightmotor2 , LOW);
                delay(200);
                digitalWrite(rightmotor1 , LOW);
                digitalWrite(rightmotor2 , LOW);
                delay(200);
//                digitalWrite(leftmotor1 , LOW);
//                digitalWrite(leftmotor2 , HIGH);
            Serial.print(c);
        Serial.print(' ');
           
    }   
  
  // for solar panel
    if(( c == 's') && (sflag == 0) )// On relay to start charging
    {
      digitalWrite(solar, HIGH); 
      sflag = 1;   
  Serial.println("charging from solar started");    
           
    }  
    
    if(( c == 't') && (sflag == 1) )// STOP CHARGING
    {
      digitalWrite(solar, LOW); 
      sflag = 0;   
  Serial.println("charging from solar stoped");    
           
    } 
    
      // for wind turbine
    if(( c == 'w') && (wflag == 0) )// On relay to start charging
    {
      digitalWrite(wind, HIGH); 
      wflag = 1;  
 Serial.println("Charging from wind turbine started");     
           
    }  

    if(( c == 'x') && (wflag == 1) )// STOP CHARGING
    {
      digitalWrite(wind, LOW); 
      wflag = 0;       
        Serial.println("Charging from wind turbine Stopped");   
    } 

// garbage value    
    if( c == 'm')
    {

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

    }

    }
}


Watch Video Tutorial:

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