Arduino Projects

Tongue Controlled Wheelchair using Arduino and Hall effect Sensors

Tongue Controlled Wheelchair Project Description:

 

Tongue Controlled Wheelchair based on the Arduino- In this tutorial, you will learn how to control a wheelchair wirelessly using two transmitter circuits. This wheelchair can be controlled through push buttons and also through Hall Effect magnetic sensors. For the wireless communication 433Mhz, RF transmitters and Receivers will be used.

This Tongue controlled wheelchair can be controlled from two different locations. You can use An RF transmitter circuit provided with Push Buttons, or you can use magnetic hall effect sensors. So this Wheelchair can be controlled wirelessly using Push Buttons and Hall effect magnetic sensors.


Amazon Links:

12v Adaptor:

Arduino Uno

Arduino Nano

Mega 2560:

wheelchair:

12v Battery:

433 MHz Transmitter and Receiver Modules:

Magnetic Hall Effect Sensor:

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!

Tongue Controlled Wheelchair Circuit Diagram:

The implementation of this proposed model mainly involves two steps. The first step is the identification of which the hall effect sensor is activated and then sending the desired command to the wheelchair wirelessly. The Tongue controlled wheelchair when receives the commands, these commands are tested depending on the predefined conditions and then accordingly operate the wheelchair.

433Mhz RF

As you can see in the above circuit, It consists of 4 buttons, one side of all the buttons are connected with ground and the other ends are connected with the desired Arduino pins as defined in programming. The 433Mhz radio transmitter is connected with the Arduino. Its data pin is connected with the pin12 and the other pins are connected with 5v and GND to power up the transmitter.

tongue controlled wheelchair

 

This circuit consists of 4 hall effect sensors, These sensor needs 5v to be powered up. All these sensors are connected with the Arduino Analog pins because it gives different values as per the magnetic field changed due to the presence of the permanent magnet. The VCC “5v” Pins of all the magnetic hall effect sensors are connected together and then connected with the Arduino’s 5 volts. Similarly, the Ground pins of all the magnetic hall effect sensors are connected together and then connected with the Ground of the Arduino. while the signal wires of the magnetic hall effect sensors are connected with the desired analog pins of the Arduino or mega as defined in the programming.

The Transmitter 5v and GND pins are connected with the Arduino’s 5 volts and GND. While the data Pin of the transmitter is connected with Pin number 12 of the Arduino.


433Mhz RF

This is the complete circuit diagram of the Receiver side. As the Tongue controlled wheelchair has two motors, that’s why we need two h-bridges to control each motor. Each motor is controlled with the help of an H-bridge and each H-bridge consists of two relays. H-Bridges are used to control the direction of the dc motors. If you want to learn the designing of H-bridges then you can visit our YouTube channel “Electronic Clinic”. The H-Bridge PCB looks like this and can be downloaded.

tongue controlled wheelchair

Download: H-bridge PCB board

relay hbridge

Programming of the Tongue Controlled Wheelchair:

In this project 3 different programs are used, two programs are written for the two transmitter circuits and one program is written for the Receiver.

Transmitter with buttons:

Before you start the programming first off all make sure that you download the VirtualWire library. This library is available on the GitHub. After you download this library then simply copy and paste it into the Arduino’s library folder, which you can find in the documents folder.

Next, I defined Pins for the transmitter data pin and for the pushbuttons.

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

In the void setup function, I set all the pushbuttons to input.

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

}


Transmitter with Hall effect sensors:

hall effect magnetic sensors connected

#include <VirtualWire.h>

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

const int transmit_en_pin = 3;

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


int sensor1 = A0; // staight
int sensor2 = A1; // right 

int sensor3 = A2; // left 
int sensor4 = A3; // stop

// variable for sensors

int sdata1 = 0;
int sdata2 = 0; 
int sdata3 = 0;
int sdata4 = 0; 




void setup()
{
  Serial.begin(9600);
    // Initialise the IO and ISR
    vw_set_tx_pin(transmit_pin);

    pinMode(sensor1, INPUT);
    pinMode(sensor2, INPUT);
       pinMode(sensor3, INPUT);
    pinMode(sensor4, INPUT);
    vw_setup(2000);       // Bits per sec
    
}

byte count = 1;

void loop()
{

  sdata1 = analogRead(sensor1);
    sdata2 = analogRead(sensor2);
      sdata3 = analogRead(sensor3);
        sdata4 = analogRead(sensor4);
  Serial.println(sdata1);
   Serial.println(sdata2);
    Serial.println(sdata3);
     Serial.println(sdata4);
  
//delay(1000);
//Serial.println("************************************");
 // msg[6] = count;
 if(sdata1 < 500 )
 {
  
  vw_send((uint8_t *)msg, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone
  Serial.println("sensor1: straight:");
  delay(1000);

 }
 
  if( sdata2 < 500 )
 {
  
  vw_send((uint8_t *)msg1, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone
  Serial.println("sensor2: right:");
  delay(1000);

 }   if(sdata3 < 500 )
 {
  
  vw_send((uint8_t *)msg2, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone
  Serial.println("sensor3: left:");
  delay(1000);

 }   if(sdata4 < 500 )
 {
  
  vw_send((uint8_t *)msg8, 1); // change this number according to the sensor values
  vw_wait_tx(); // Wait until the whole message is gone
  Serial.println("sensor4: stop:");
  delay(1000);

 }    
   else 
delay(200);
 

}

Receiver 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:

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

2 Comments

  1. bro the circuits were blur and you dont mention what type of hall effect sensor used…can i have the pdf documets and report of this project soon

Leave a Reply

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

Back to top button