Hand Gesture Controlled Robot Using Accelerometer
Hand Gesture Controlled Robot Using Accelerometer
ACCELEROMETER
By
M.JAYAPRAKASH. (RegisterNo.221501098)
D. BAKTHAWATCHALA PERUMAL (RegisterNo.221501092)
S.MOHAN (RegisterNo.221501101)
J.AJEETH KUMAR (RegisterNo.221501091)
MARCH 2018
CERTIFICATE
Place:
1:
2:
3:
4:
ACKNOWLEDGEMENT
M.JAYAPRAKASH
D.BAKTHAWATHALA PERUMAL
S.MOHAN
J.AJEETH KUMAR
ABSTRACT
02
CONTENTS
CHAPTER 1: ACKNOWLEDGEMENT……………………………………….. 1
CHAPTER 2: ABSTRACT……………………………………………………… 2
CHAPTER 3: INTRODUCTION………………………………………………….5
3.1 Robot……………………………………………………………………………5
9 REFERENCES
04
Chapter 3
INTRODUCTION
3.1 Robot
A robot is usually an electro-mechanical machine that can perform
tasks automatically. Some robots require some degree of guidance, which
may be done using a remote control or with a computer interface. Robots
can be autonomous, semi-autonomous or remotely controlled. Robots
have evolved so much and are capable of mimicking humans that they
seem to have a mind of their own.
05
3.2 Human Machine Interaction
3.3 Gesture
Chapter 4
GESTURE CONTROLLED ROBOT
4.2 Application
Through the use of gesture recognition, remote control with the
wave of a hand of various devices is possible.
08
Chapter 5
LITERATURE REVIEW
09
Figure 5.1: Block Diagram of Robot
10
Encoder Decoder Connection
5.1 Transmitter
5.1.1 Arduino
Pin Descriptions:
Port C (PC5): Port C is a 7-bit bi-directional I/O port with internal pull-
up resistors (selected for each bit). The output buffers have symmetrical
drive characteristics with both high sink and source capability. As inputs,
Port C pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port C pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
PC6:PC6 is used as an I/O pin. Note that the electrical characteristics of PC6
differ from those of the other pins of Port C.; PC6 is used as a Reset input.
A low level on this pin for longer than the minimum pulse length will
generate a Reset, even if the clock is not running.
Port D (PD7): Port D is an 8-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port D output buffers have symmetrical
drive characteristics with both high sink and source capability. As inputs,
Port D pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port D pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
A Vcc: A Vcc is the supply voltage pin for the A/D Converter. It should
be externally connected to VCC, even if the ADC is not used. If the ADC is
used, it should be connected to VCC through a low-pass filter. Note that
PC6...4 use digital supply voltage. AREF: AREF is the analog reference pin
for the A/D Converter.
Functions:
Digital I/O There are basically three functions used in digital I/O.
Pin Mode (): Configures the specified pin to behave either as an Input or
an output. Digital Write (): Write a high or a low value to a digital pin.
If the pin is configured as an input, writing a high value with digital Write
() will enable an internal 20K pull-up resistor.
Writing low will disable the pull-up. The pull-up resistor is enough to
light an led dimly, so if LEDs appear to work, but very dimly, this is a likely
cause. The remedy is to set the pin to an output with the pin Mode
() function. 14
Digital Read (): Reads the value from a specified digital pin, either
High or low.
Analog I/O: In analog i/o there are also three functions to take input from
accelerometer which are Analog Reference (): Configures the reference
voltage used for analog input (i.e. the value used as the top of the input
range).
The options are:
Default: The default analog reference of 5 volts (on 5V Arduino boards) or
3.3 volts (on 3.3V Arduino boards)
Internal: A built-in reference, equal to 1.1 volts on the ATmega168
Or ATmega328 and 2.56 volts on theATmega8 (not available on the
Arduino Mega)
Internal 1V1: A built-in 1.1V reference (Arduino Mega only)
Internal 2V56: A built-in 2.56V reference (Arduino Mega only)
External: The voltage applied to the AREF pin (0 to 5V only) is
used as the reference.
ADXL335 Accelerometer:
5.2 Receiver
5.2.3 DC Motors
DC Gear Motor
Wheeled robots are robots that navigate around the ground using
motorized wheels to propel them. This design is simpler than using treads
or legs and by using wheels they are easier to design, build, and program
for movement in at, not-so-rugged terrain. They are also better controlled
than other types of robots. Disadvantages of wheeled robots are that they
cannot navigate well over obstacles, such as rocky terrain, sharp declines,
or areas with low friction. Wheeled robots are most popular among the
consumer market; their differential steering provides low cost and
simplicity. Robots can have any number of wheels, but three wheels are
sufficient for static and dynamic balance. Additional wheels can add to
balance; however, additional mechanisms will be required to keep all the
wheels in the ground, when the terrain is not at. Large diameter wheels
give the robot low torque but high velocity.
Types of wheels:
2 wheeled robot
3 wheeled robot
4 wheeled robot
5 or more wheeled robot
Here in the project, we use 3-Wheeled robot.
3-Wheeled robot:
3-wheeled robots may be of two types: differentially steered (2 powered
wheels with an additional free rotating wheel to keep the body in balance)
or 2 wheels powered by a single source and a powered steering for the
third wheel. In the case of differentially steered wheels, the robot direction
may be changed by varying the relative rate of rotation of the two
separately driven wheels. If both the wheels are driven in the same
direction and speed, the robot will go straight. Otherwise, depending on
the speed of rotation and its direction, the center of rotation may fall
anywhere in the line joining the two wheels?
The center of gravity in this type of robot has to lay inside the triangle
formed by the wheels. If too heavy of a mass is mounted to the side of the
free rotating wheel, the robot will tip over.
5.2.5 Chassis
IMPLEMENTATION
30
The RF modules works on the frequency of 433MHz. It means that the
carrier frequency of the RF module is 433MHz. The RF module enables
the user to control the robot wirelessly and with ease. The schematic of
transmitting end can be seen below:
31
This transmitted signal is received by the RF receiver, demodulated
and then passed onto the decoder IC. The decoder IC decodes the coded
waveform and the original data bits are recovered. The input is a serial
coded modulated waveform while the output is parallel. The pin 17 of the
decoder IC is the Valid Transmission (VT) pin. A led can be connected to
this pin which will indicate the status of the transmission. In the case of a
successful transmission, the led will blink. The parallel data from the
encoder is fed to the port 1of the microcontroller. This data is in the form
of bits. The microcontroller reads these bits and takes decisions on the
basis of these bits. What the microcontroller does is, it compares the input
bits with the coded bits which are burnt into the program memory of the
microcontroller and outputs on the basis of these bits. Port 2 of the
Microcontroller is used as the output port. Output bits from this port are
forwarded to the motor driver IC which drives the motors in a special
configuration based on the hand movements. At a dead stop, a motor
produces no voltage. If a voltage is applied and the motor begins to spin,
it will act as a generator that will produce a voltage that opposes the
external voltage applied to it. This is called Counter Electromotive Force
(CEF) or Back Electromotive Force (Back EMF). If a load stops the motors
from moving then the current may be high enough to burn out the motor
coil windings. To prevent this, fly back diodes are used. They prevent the
back emf from increasing and damaging the motors. The schematic of
receiving end can be seen below:
32
6.1 System Description
The steps stated above are broadly described in this section. The
system consists of the following steps to work as mentioned:
1. Transmission of data:
The input is given by the accelerometer that has been analog in the
nature. It has been digitally coded by the input A/D converter. The A/D
converter is in built in the Arduino board that is of 8 bit and output goes
to the digital pins of the Arduino board.
2. Receiving the data
The receiving data on the digital pins is sent to the L293D.
According to the output the motors it will run in forward, backward,left
and right. The output depends directly on to the accelerometer input that
can be used for the robot controlling and accelerometer input depends
upon the movement of the gestures.
33
Figure 6.1: Transmission of Data
6.2 Simulation
35
Figure 6.3: Gestures for movement of the robot
There are two DC motors used in the design of this robot: one motor
for each wheel. The functions are called from the program burnt in the
Arduino microcontroller. The signal is sent to the motor driver IC that runs
the motors. The wheels are connected to the motors. 2 DC motors are used
Two for left and right wheels. When the signal received in the motor driver
is to move forward, all two wheels of motors rotate forward, this turns all
the two wheels in the forward direction. The robot moves in the forward
direction. When the signal received in the motor driver is to turn the robot
in the forward left direction, the left diagonal motors are rotated backwards
while the right diagonal motors are made rotated forwards. This makes the
robot turn in the forward left direction. When the signal received in the
motor driver is to turn the robot in the forward right direction, the right
diagonal motors are rotated backward while the left diagonal motors are
rotated forwards. This makes the robot turn in the forward right direction.
When the signal in the motor driver is to move backward, both the pairs of
the motors are rotated backwards resulting the robot to move backwards.
When the signal in the motor driver is to stop the robot, all the motors are
made stationary resulting the robot to stop. Similarly, to rotate the robot
in backward directions, similar method- ology is used. To turn the robot in
the backward left direction, the left diagonal motors are rotated forwards
while the right diagonal 37
motors are rotated backwards. This makes the robot turn in the
backward left direction. To turn the robot in the backward right direction,
the right diagonal motors are rotated forwards while the left diagonal
motors are rotated backwards. This makes the robot turn in the backward
right direction.
39
6.4 Used Code for Arduino
* This program lets you to control your robot with gesture made by your
hand
*/
int GNDPin=A1; //Set Analog pin 4 as GND
int VccPin=A5; //Set Analog pin 5 as VCC
int xPin=A4; //X axis input
int yPin=A3; //Y axis input
int zPin=A2; //Z axis input(not used)
int Q1=10,Q2=11,Q3=12,Q4=13; //Output pins to be connected to 10, 11,
12, 13 of Decoder IC
long x; //Variabe for storing X coordinates
long y; //Variabe for storing Y coordinates
long z; //Variabe for storing Z coordinates
void setup()
{
Serial.begin(9600);
pinMode(Q1,OUTPUT);
pinMode(Q2,OUTPUT);
pinMode(Q3,OUTPUT);
pinMode(Q4,OUTPUT);
pinMode(GNDPin, OUTPUT);
pinMode(VccPin, OUTPUT);
digitalWrite(GNDPin, LOW); //Set A4 pin LOW
digitalWrite(VccPin, HIGH); //Set A5 pin HIGH
}
void loop()
{
x = analogRead(xPin); //Reads X coordinates
y = analogRead(yPin); //Reads Y coordinates
z = analogRead(zPin); //Reads Z coordinates (Not Used)
if(x<300) // Change the value for adjusting sensitivity
left();
else if(x>350) // Change the value for adjusting sensitivity
40
right();
else if(y>350) // Change the value for adjusting sensitivity
backward();
else if(y<300) // Change the value for adjusting sensitivity
forward
();
else
stop_();
}
void stop_()
{
Serial.println("");
Serial.println("STOP");
digitalWrite(Q1,LOW);
digitalWrite(Q2,LOW);
digitalWrite(Q3,LOW);
digitalWrite(Q4,LOW);
}
void forward()
{
Serial.println("");
Serial.println("Forward");
digitalWrite(Q1,LOW);
digitalWrite(Q2,HIGH);
digitalWrite(Q3,LOW);
digitalWrite(Q4,HIGH);
}
void backward()
{
Serial.println("");
Serial.println("Backward");
digitalWrite(Q1,HIGH);
digitalWrite(Q2,LOW);
digitalWrite(Q3,HIGH);
digitalWrite(Q4,LOW);
} 41
void left()
{
Serial.println("");
Serial.println("Left");
digitalWrite(Q1,LOW);
digitalWrite(Q2,HIGH);
digitalWrite(Q3,HIGH);
digitalWrite(Q4,LOW);
}
void right()
{
Serial.println("");
Serial.println("Right");
digitalWrite(Q1,HIGH);
digitalWrite(Q2,LOW);
digitalWrite(Q3,LOW);
digitalWrite(Q4,HIGH);
}
42
Chapter 7
CONCLUSION, LIMITATIONS
AND
FUTURE WORK
7.1 Conclusion
We have gone through several hurdles and at the end we are able to
complete the project work. The project finally ran as our expectation
was. It showed all the proper movements.
43
Chapter 8
8.1 Software
8.2 Hardware
44
8.3 Economic
This project is quite cost elective. The components used are easily
available in the market apart from accelerometer, RF modules and the
motors. These components are quite cheap as compared to the motors
which are the only expensive part in our whole project. But these
particular motors are capable of providing support to loads up to 6kgs
which is what we wanted.
45
PROTOTYPE
46
Chapter 9
REFERENCES
1. https://www.slideshare.net/mahkamkhan/wireless-gesture-controlled-
Robot-fyp-report
2. https://www.youtube.com/watch?v=8s116ufjmjk
3. https://create.arduino.cc/projecthub/user206876468/hand-gesture-
Controlled-robot-4d7587
4. https://www.youtube.com/watch?v=eyY5iAKhULw
5. https://www.youtube.com/watch?v=i2U49usFo10
6. https://www.scribd.com/document/98400320/InTech-Real-Time-
Robotic-Hand-Control-Using-Hand-Gesture
7. http://en.wikipedia.org/wiki/DC-motor
8. electronics.stackexchange.com/questions/18447/what-is-back-emf-
Counter electromotive-force
9. http://seminarprojects.com/s/hand-gesture-controlled-robot-ppt