Professional Documents
Culture Documents
Gesture Hand Control Car - Report
Gesture Hand Control Car - Report
Control Car
Designed by:
Hiba BARAKAT
file number: 89955
Hajar SWAIDAN file number: 91248
2
TABLE OF CONTENTS
- Introduction ………………………………………………………………………………………………………………………………………… page 3
- Equipment …………………………………………………….……………………………………………………………………………………..page 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
- DC motor .. x4
- Connecting wires
- Robot car
FLOW CHART
DC power
supply
• detects the
gyroscope angle
Arduino
Uno
(transmitter)
wireless • transfers
module data to
(transmitter) receiver
(receiver) receiver
Arduino
Uno
(receiver)
DC motor
driver
DC motors
moving
wheels
5
switch ON
car ON
Transmitter • here
five
we
ON cases
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.
ADXL51
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.
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.
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.
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;
}