You are on page 1of 15

Gesture Hand

Control Car

Designed by:

Hiba BARAKAT
file number: 89955
Hajar SWAIDAN file number: 91248
2

TABLE OF CONTENTS
- Introduction ………………………………………………………………………………………………………………………………………… page 3

- Equipment …………………………………………………….……………………………………………………………………………………..page 3

- Flow chart ……….………………………………………………………………………………………………………………………………… .. page 4

- Code flow chart ………………………………………………………………………………………………………………………………….. page 5

- Transmitter part ………………………………………………………………………………………………………………………………...page 6

- Receiver part ……………………………………………………………………………………………………………………………………….page 8

- Usage of Gesture Hand Controlled car ………………….…………………………………………………………….page 10

- General Conclusion …………………………………………………………………………………………………………………….. page 11

- References …………………………………………………………………………………………………………………………………….. page 12


3

INTRODUCTION
Gesture control robot is totally controlled by the Arduino which gets the
instruction by another Arduino with serial communication. There are two parts in
this project one is known as the transmitter and another is known as the
receiver, here the work of each one is different from the other, we are using
master-slave communication in this project.
Then we will start with the transmitter first and then the receiver.

Equipment
- Arduino Uno boards .. x2

- 9V battery

- Lithium ion battery .. x2 (7.4V)

- DC motor .. x4

- Wireless module NRF24L01

- DC motor driver (2 channels) LM293

- Gyroscope sensor ADXL51

- Connecting wires

- Robot car

- General purpose PCB


4

FLOW CHART

DC power
supply

• detects the
gyroscope angle

Arduino
Uno
(transmitter)

wireless • transfers
module data to
(transmitter) receiver

wireless With DC power

module Supply at the

(receiver) receiver

Arduino
Uno
(receiver)

DC motor
driver

DC motors
moving
wheels
5

CODE FLOW CHART


Receiver
ON

switch ON
car ON

Transmitter • here
five
we
ON cases

level case is tue left case is true


right case is true
=> move
=> no => move clock
counter clock
movement wise
wise

up is true down is true


=> move => move
forward backward
6

TRANSMITTER PART
The transmitter in this project the master circuit which will transfer the data to
another module. The system depends on master-slave communication. One
wireless module will work as a master and the other will work as the slave. Then
the master will give instruction to the slave one and the slave receive the
instruction from the master and send all instruction to the Arduino attached. The
transmitter contains Arduino, wireless module ESP8266, gyroscope, general-
purpose PCB, and a 9V battery.

The gyroscope detects the variation in the x-axis and y-axis, so we put the
gyroscope on our hand which first senses the angular forces from the direction of
the hand and sends them to the Arduino Uno that is attached to the hand. After
receiving the data, Arduino Uno converts it into different angles, between 0–
450°, and sends it to the receiver of the Arduino Uno that is attached to the
robot car through the wireless module.

Figure -1- Transmitter board


7

ADXL51

Figure -2- Transmitter diagram


8

RECEIVER PART
The receiver is the most important part of the Gesture control robot. It will
receive the information through the wireless module.
After receiving the data, the Arduino Uno of the car will detect the received
angles with the predefined set of angles and send a signal to the motor module
to move the wheels of the robot car accordingly to the angles. It can be noticed
that the range of angles are predefined for the wheel movement of the robot car
to move forward, backward, brake, left and right.
In the receiver we have Arduino Uno, robot car, 4 DC motors, LM298 motor
driver, wireless module ESP826, and 2 cell lithium ion batteries.

Figure -3- Receiver


9

Figure -4- Receiver diagram

Overall view of the project

Figure -5- Transmitter – Receiver


10

USAGE OF GESTURE HAND CONTROL


Like it sounds, gesture control allows a driver to perform some kind of task or menu
selection without looking away from the road to aim a finger at a button or touch screen
spot. The modern BMW 530i 2017 offers gesture controls as an option. The system works
with a camera that is mounted in the headliner above the infotainment system. The camera
watches for a limited set of movements the driver can make in that area. Each movement
has an assigned function.
For example, to change the radio station one simply flicks one’s fingers forward. To turn up
the volume the driver makes a circle with one finger clockwise. To turn down the volume the
driver rotates a finger counter-clockwise. We tested the BMW 530i this past week and found
that the system is intuitive and simple to use. Watch how easy it is in the video above. Unlike
voice commands, we found the system worked 100% of the time we used it and that it didn’t
have a learning curve. The car recognized our gestures the first time and every time.

Other gestures that the car comes pre-set to understand are a pointed finger at the screen,
which translates to “accept that incoming call.” A swipe of the driver’s hand from left to right
across the general area of the screen when a call is coming in that one would like to ignore is
all it takes to silence that call and send it to voice mail. The system also allows for some other
limited gestures and one can even assign a gesture to a function.

Figure -6- BMW 530i 2017


11

GENERAL CONCLUSION
Such mini-projects as Gesture Hand Control Car may undergo much
developments and enter the technological race taking place nowadays. It
facilitates many human being activities that may be changed to be remote
controlled.
As BMW did for its cars since in 2017, this technology can enter several life
domains for saving time and energy.
For instance, we can use it for drones that are used for photographing which
helps in taking specific angles for the photo captured, that will surely make it
more professional in a very easy operation controlled by hand.

Figure -7- Drone


12

REFERENCES:
- https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6387148/#:~:text=The%20proposed%20rob
ot%2Dcar%20is,the%20movement%20of%20the%20hand.

- https://techatronic.com/how-to-make-gesture-control-robot-using-arduino/

- https://www.youtube.com/watch?v=svJwmjplm4c&feature=youtu.be

- http://bestride.com/news/technology/tech-what-are-vehicle-gesture-controls-and-how-do-
they-work
13

Appendix

Arduino coding

- Transmitter code:
const int x_out = A0;
const int y_out = A1;
struct data{
int xAxis;
int yAxis;
};
data send_data;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);

void loop() {
// put your main code here, to run repeatedly:
send_data.xAxis = analogRead(x_out);
send_data.yAxis = analogRead(y_out);

Serial.print(send_data.xAxis);

Serial.print(send_data.yAxis);
delay(10);
}
14

- Receiver code:

int ENA = 3;
int ENB = 9;
int MotorA1 = 4;
int MotorA2 = 5;
int MotorB1 = 6;
int MotorB2 = 7;

char dataArray[2];
char index=0;

void setup() {

Serial.begin(9600);

pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(MotorA1, OUTPUT);
pinMode(MotorA2, OUTPUT);
pinMode(MotorB1, OUTPUT);
pinMode(MotorB2, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly
while(Serial.available()) {
switch(index)
{
case 0:
dataArray[index]=Serial.read();
index++;
break;

case 1:
dataArray[index]=Serial.read();
index++;
break;

default:
break;
}
}

if(index==2)
{
if(dataArray[1] > 400) {
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
digitalWrite(MotorB1, HIGH);
digitalWrite(MotorB2, LOW);
analogWrite(ENA, 150);
analogWrite(ENB, 150);

}
else if(dataArray[1] < 320) {
digitalWrite(MotorA1, HIGH);
digitalWrite(MotorA2, LOW);
digitalWrite(MotorB1, LOW);
15

digitalWrite(MotorB2, HIGH);
analogWrite(ENA, 150);
analogWrite(ENB, 150);
}
else if(dataArray[0] < 320){
digitalWrite(MotorA1, HIGH);
digitalWrite(MotorA2, LOW);
digitalWrite(MotorB1, HIGH);
digitalWrite(MotorB2, LOW);
analogWrite(ENA, 150);
analogWrite(ENB, 150);
}
else if(dataArray[0] > 400){
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, HIGH);
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, HIGH);
analogWrite(ENA, 150);
analogWrite(ENB, 150);
}
else {
digitalWrite(MotorA1, LOW);
digitalWrite(MotorA2, LOW);
digitalWrite(MotorB1, LOW);
digitalWrite(MotorB2, LOW);
analogWrite(ENA, 0);
analogWrite(ENB, 0);
}
}
index=0;
}

You might also like