Gesture Based Robot Final
Gesture Based Robot Final
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Recently, strong efforts have been carried out to develop intelligent and natural
interfaces between users and computer based systems based on human gestures.
Gestures provide an intuitive interface to both human and computer. Thus, such
gesture-based interfaces can not only substitute the common interface devices,
but can also be exploited to extend their functionality.
Robots are playing an important role in automation across all the sectors like
construction, military, medical, manufacturing, etc. After making some basic
robots like line follower robot, computer controlled robot, etc. we have developed
this accelerometer based gesture controlled robot by using Arduino Uno. In this
project we have used hand motion to drive the robot. For this purpose, we have
used accelerometer which works on acceleration.
A gesture controlled robot is controlled by using hand in place of any other
method like buttons or joystick. Here one only needs to move hand to control the
robot. A transmitting device is used in your hand which contains RF Transmitter
and accelerometer. This will transmit command to robot so that it can do the
required task like moving forward, reverse, turning left, turning right and stop.
All these tasks will be performed by using hand gesture.
Here the most important component is accelerometer. Accelerometer is a 3-axis
acceleration measurement device with ±3g range. This device is made by using
polysilicon surface sensor and signal conditioning circuit to measure acceleration.
The output of this device is Analog in nature and proportional to the acceleration.
This device measures the static acceleration of gravity when we tilt it and gives a
result in form of motion or vibration.
According to the datasheet of adxl335 polysilicon surface-micromachined
structure placed on top of silicon wafer. Polysilicon springs suspend the structure
over the surface of the wafer and provide a resistance against acceleration forces.
Deflection of the structure is measured using a differential capacitor which
incorporate independent fixed plates and plates attached to the moving mass. The
fixed plates are driven by 180° out-of-phase square waves. Acceleration deflects
the moving mass and unbalances the differential capacitor resulting in a sensor
output whose amplitude is proportional to acceleration. Phase-sensitive
demodulation techniques are then used to determine the magnitude and direction
of the acceleration.
1.2ROBOT
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,
AIET/ECE/PR/1
GESTURE BASED ROBOT
• When we tilt hand in backward side, robot change its state and start
moving in backwards direction until other command is given.
• When we tilt it in left side Robot get turn left till next command.
• When we tilt hand in right side robot turned to right.
• And for stopping robot we keeps hand in stable..
1.4 GESTURE
A gesture is an action that has to be seen by someone else and has to convey some
piece of information. Gesture is usually considered as a movement of part of the
body, esp. a hand or the head, to express an idea or meaning.
AIET/ECE/PR/2
GESTURE BASED ROBOT
CHAPTER 2
GESTURE CONTROLLED ROBOT
AIET/ECE/PR/3
GESTURE BASED ROBOT
2.2 APPLICATIONS
• Through the use of gesture recognition, remote control with the wave of a
hand of various devices is possible.
• Gesture controlling is very helpful for handicapped and physically disabled
people to achieve certain tasks, such as driving a vehicle.
• Gestures can be used to control interactions for entertainment purposes
such as gaming to make the game player's experience more interactive or
immersive.
• From reading lots of related articles, we have learnt that recent efforts have
attempted to eliminate this bottleneck by developing different ways of
interacting with computers, for example: speech, handwriting.
• Through the use of gesture recognition, remote control with the wave of a
hand of various devices is possible.
AIET/ECE/PR/4
GESTURE BASED ROBOT
CHAPTER 3
LITERATURE REVIEW
We divided our task into two parts to make the task easy and simple and to avoid
complexity and make it error free. The first is the transmitting section which includes
the following components:
AIET/ECE/PR/5
GESTURE BASED ROBOT
• Accelerometer
• Comparator IC
• Encoder IC
• RF Transmitter Module
The second is the receiving end which comprises of following main components:
• RF Receiver Module
• Decoder IC
• Arduino
• Motor Driver IC
• DC Geared Motors
• Accelerometer placed on the hand sensed the tilt made by the hand.
• Accelerometer capable of measuring how fast the speed of object is
changing.
3.3 FEATURES
• From reading lots of related articles, we have learnt that recent efforts have
attempted to eliminate this bottleneck by developing different ways of
interacting with computers, for example: speech, handwriting.
• Through the use of gesture recognition, remote control with the wave of a
hand of various devices is possible.
• Gesture controlling is very helpful for handicapped and physically disabled
people to achieve certain tasks, such as driving a vehicle.
• Gestures can be used to control interactions for entertainment purposes such
as gaming to make the game player's experience more interactive or
immersive.
AIET/ECE/PR/6
GESTURE BASED ROBOT
AIET/ECE/PR/7
GESTURE BASED ROBOT
• MECHANICAL SENSOR
The ADXL335 uses a single structure for sensing the X, Y, and Z axes. As a result,
the three axes’ sense directions are highly orthogonal and have little cross-axis
sensitivity. Mechanical misalignment of the sensor die to the package is the chief
source of cross-axis sensitivity. Mechanical misalignment can, of course, be
calibrated out at the system level.
• PERFORMANCE
Rather than using additional temperature compensation circuitry, innovative design
techniques ensure that high performance is built in to the ADXL335. As a result,
there is no quantization error or non-monotonic behavior, and temperature
hysteresis is very low (typically less than 3 mg over the −25°C to +70°C
temperature range).
• APPLICATIONS INFORMATION
For most applications, a single 0.1 μF capacitor, CDC, placed close to the ADXL335
supply pins adequately decouples the accelerometer from noise on the power
supply. However, in applications where noise is present at the 50 kHz internal clock
frequency (or any harmonic thereof), additional care in power supply bypassing is
required because this noise can cause errors in acceleration measurement. If
additional decoupling is needed, a 100 Ω (or smaller) resistor or ferrite bead can be
inserted in the supply line. Additionally, a larger bulk bypass capacitor (1 μF or
greater) can be added in parallel to CDC. Ensure that the connection from the
ADXL335 ground to the power supply ground is low impedance because noise
transmitted through ground has a similar effect to noise transmitted through VS.
The ADXL335 has provisions for band limiting the XOUT, YOUT, and ZOUT pins.
Capacitors must be added at these pins to implement low-pass filtering for
antialiasing and noise reduction. The equation for the 3 dB bandwidth
or more simply
AIET/ECE/PR/8
GESTURE BASED ROBOT
The tolerance of the internal resistor (RFILT) typically varies as much as ±15% of
its nominal value (32 kΩ), and the bandwidth varies accordingly. A minimum
capacitance. The tolerance of the internal resistor (RFILT) typically varies as much
as ±15% of its nominal value (32 kΩ), and the bandwidth varies accordingly. A
minimum capacitance of 0.0047 μF for CX, CY, and CZ is recommended in all
cases.
FIGURE 3-3
AIET/ECE/PR/9
GESTURE BASED ROBOT
AIET/ECE/PR/10
GESTURE BASED ROBOT
AIET/ECE/PR/11
GESTURE BASED ROBOT
AIET/ECE/PR/12
GESTURE BASED ROBOT
AIET/ECE/PR/13
GESTURE BASED ROBOT
PIN FUNCTION
VCC 5V supply
AIET/ECE/PR/14
GESTURE BASED ROBOT
PIN FUNCTION
VCC 5V supply
AIET/ECE/PR/15
GESTURE BASED ROBOT
AIET/ECE/PR/16
GESTURE BASED ROBOT
3.9.1 Power
• The Arduino Uno board can be powered via the USB connection or with an
external power supply. The power source is selected automatically.
• External (non-USB) power can come either from an AC-to-DC adapter
(wall wart) or battery. The adapter can be connected by plugging a 2.1mm
center positive plug into the board's power jack. Leads from a battery can
be inserted in the GND and Vin pin headers of the POWER connector.
• The board can operate on an external supply from 6 to 20 volts. If supplied
with less than 7V, however, the 5V pin may supply less than five volts and
the board may become unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is
7 to 12 volts.
The power pins are as follows:
Vin: The input voltage to the Arduino/Genuino board when it's using an external
power source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying voltage via
the power jack, access it through this pin.
VT: This pin outputs a regulated 5V from the regulator on the board. The board can
be supplied with power either from the DC power jack (7 - 12V), the USB connector
AIET/ECE/PR/17
GESTURE BASED ROBOT
(5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V
pins bypasses the regulator, and can damage your board. We don't advise it. 3V3.
A 3.3 volt supply generated by the on-board regulator. Maximum current draw is
50 mA. GND. Ground pins.
IOREF. This pin on the Arduino/Genuino board provides the voltage reference
with which the microcontroller operates. A properly configured shield can read the
IOREF pin voltage and select the appropriate power source or enable voltage
translators on the outputs to work with the 5V or 3.3V.
Microcontroller ATmega328P
Operating Voltage 5V
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
AIET/ECE/PR/18
GESTURE BASED ROBOT
3.9.2 Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has
2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the
EEPROM library).
Each of the 14 digital pins on the Uno can be used as an input or output, using
pinMode(), digitalWrite() and digitalRead() functions. They operate at 5 volts. Each
pin can provide or receive 20 mA as recommended operating condition and has an
internal pull-up resistor (disconnected by default) of 20-50k ohm. A maximum of
40mA is the value that must not be exceeded on any I/O pin to avoid permanent
damage to the microcontroller.
In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-toTTL
Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value. See the
attachInterrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits
of resolution (i.e. 1024 different values). By default they measure from ground to 5
volts, though is it possible to change the upper end of their range using the AREF
AIET/ECE/PR/19
GESTURE BASED ROBOT
pin and the analogReference() function. There are a couple of other pins on the
board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a
reset button to shields which block the one on the board.
AIET/ECE/PR/20
GESTURE BASED ROBOT
Receiver Part
The receiver part consists of Arduino UNO and the 434 MHz Receiver module. An
external LED can be used along with a current limiting resistor but on board LED
would be sufficient. The design of the Receiver part is as follows.
The RF Receiver Module consists of 4 – pins: VCC, GND, Data and Antenna. VCC
and GND pins are connected to 3.3V pin of the Arduino and ground respectively.
The data pin is connected to Pin 12 of the Arduino.
An antenna similar to the transmitter module is connected to the antenna pin of the 434
MHz Receiver module. The on board LED which is connected to the 13th pin of
Arduino is used in the project although an external LED can always be used.
Working Process
In this project, a simple demonstration of RF Communication with the help of
Arduino UNO boards is given. The aim of the project is to successfully transmit
data between the RF Transmitter – Receiver modules using two Arduino UNO
microcontroller boards. The working of the project is explained here.
AIET/ECE/PR/21
GESTURE BASED ROBOT
uses the library. If we want to implement the project without the library,
then we need to change the receiver part of the circuit.
• VirtualWire.h is a special library for Arduino created by Mike
McCauley. It is a communication library that allows two Arduino’s to
communicate with each other using RF Module i.e. transmitter –
receiver pair. This library consists of several functions that are used for
configuring the modules, transmission of data by the transmitter
module and data reception by the receiver module.
• In this project, the transmitter simply sends two characters i.e. It sends
the character “1” and with a delay of few seconds, it sends the
character “0”. Whenever the “1” is sent, the LED on the transmitting
side of the project will be turned ON. As this “1” is transmitted via RF
• When the receiver receives “1”, the Arduino on the receiver side of the
project will turn ON the LED on its side.
• Similarly, when the data “0” is transmitted by the RF transmitter, the
LED on the transmitter side is turned OFF. As a result, the receiver
now receives “0” and the LED on the receiver side is also turned OFF.
• Hence, the receiver is imitating the actions of the transmitter.
3.9.4 INTERFACING WITH ARDUINO ADXL 335
The accelerometer module has 5 pins, namely
NOTE:
We don't need to power the module from 3.3v because it already has a 5v to 3.3v
converter. Use 2-pin relegate for connecting VCC and GND. Use a 3-pin relegate
for connecting X, Y & Z outputs. Also connect AREF pin to the 3.3v. This is
done to set the reference voltage to 3.3v because the output of ADXL335 is 3.3v
compatible.
AIET/ECE/PR/22
GESTURE BASED ROBOT
AIET/ECE/PR/23
GESTURE BASED ROBOT
Turning a motor ON and OFF requires only one switch to control a single motor in
a single direction. We can reverse the direction of the motor by simply reversing its
polarity. This can be achieved by using four switches that are arranged in an
intelligent manner such that the circuit not only drives the motor, but also controls
its direction. Out of many, one of the most common and clever design is a H-bridge
circuit where transistors are arranged in a shape that resembles the English alphabet
"H".
As seen in the image, the circuit has four switches A, B, C and D. Turning these
switches ON and OFF can drive a motor in different ways.
3.11 DC MOTORS
A machine that converts DC power into mechanical power is known as a DC motor.
Its operation is based on the principle that when a current carrying conductor is
placed in a magnetic field, the conductor experiences a mechanical force.
DC motors have a revolving armature winding but non-revolving armature
magnetic field and a stationary field winding or permanent magnet. Different
connections of the field and armature winding provide different speed/torque
regulation features. The speed of a DC motor can be controlled by changing the
voltage applied to the armature or by changing the field current.
AIET/ECE/PR/24
GESTURE BASED ROBOT
AIET/ECE/PR/25
GESTURE BASED ROBOT
CHAPTER 4
IMPLEMENTATION
4.1 INPUT TO ACCELEROMETER (ADXL 335)
Different Hand gestures to make the robot move in specific directions are as follow:
AIET/ECE/PR/26
GESTURE BASED ROBOT
ACCELEROMETER
ORIENTATION
DIRECTION
Forward +y
Backward -y
Right +x
Left -x
Stop Rest
The accelerometer records the hand movements in the X and Y directions only and
outputs constant analog voltage levels. These voltages are fed to the comparator
IC which compares it with the references voltages that we have set via variable
resistors attached to the IC. The levels that we have set are 1.7V and 1.4V. Every
voltage generated by the accelerometer is compared with these and an analog 1 or
0 signal is given out by the comparator IC.
There are total five conditions for this Gesture controlled Robot which are
giving below:
AIET/ECE/PR/27
GESTURE BASED ROBOT
Movement of
This hand Input for Arduino from
gesture
Side Direction
D3 D2 D1 D0
Stable 0 Stop
0 0 0
0 Turn Right
Tilt right
0 0 1
0
Tilt left Turn Left
0 1 0
analog signal is the input to the encoder IC. The input to the encoder is parallel while the
output is a serial coded waveform which is suitable for RF transmission. A push button is
attached to pin 14 of this IC which is the Transmission Enable (TE) pin.
The coded data will be passed onto the RF module only when the button is pressed.
This button makes sure no data is transmitted unless we want to. The RF transmitter
modulates the input signal using Amplitude Shift Keying (ASK) modulation. It is
the form of modulation that represents digital data as variations in the amplitude of a
carrier wave.
The following figure shows the modulated output of the RF module:
AIET/ECE/PR/28
GESTURE BASED ROBOT
The RF modules works on the frequency of 315MHz. It means that the carrier
frequency of the RF module is 315MHz. The RF module enables the user to
control the robot wirelessly and with ease.
The schematic of transmitting end can be seen below:
AIET/ECE/PR/29
GESTURE BASED ROBOT
AIET/ECE/PR/30
GESTURE BASED ROBOT
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:
AIET/ECE/PR/31
GESTURE BASED ROBOT
4.2 SIMULATION
We performed a simulation of our project in PROTEUS and the code was written
in C language using KEIL MICROVISION. We wrote a code for the
microcontroller to run DC motors using the H-Bridge IC (L293D). In the
simulation we sent the relevant data to the Microcontroller (AT89C51) through
switches. The Microcontroller processed the data and sent the information to the
Actuator IC (L293D). The Actuator IC upon receiving information showed
response by driving the DC motors. The simulation schematic is as follow:
AIET/ECE/PR/32
GESTURE BASED ROBOT
AIET/ECE/PR/33
GESTURE BASED ROBOT
pinMode(FD, INPUT);
pinMode(BD, INPUT);
pinMode(LD, INPUT);
pinMode(RD, INPUT);
pinMode(m11, OUTPUT);
pinMode(m12, OUTPUT);
pinMode(m21, OUTPUT);
pinMode(m22, OUTPUT);
}
void loop()
{
int temp1=digitalRead(FD); int
temp2=digitalRead(BD); int
temp3=digitalRead(LD);
int temp4=digitalRead(RD);
AIET/ECE/PR/34
GESTURE BASED ROBOT
CHAPTER 5
CONCLUSION, LIMITATIONS AND FUTURE WORK
5.1 CONCLUSION
We achieved our objective without any hurdles i.e. the control of a robot using gestures.
The robot is showing proper responses whenever we move our hand.
For controlling the robot remotely, Holteks’ encoder-decoder pair (HT12E and HT12D)
together with a 433MHz transmitter-receiver pair is used.
HT12E and HT12D are CMOS ICs with working voltage ranging from 2.4V to
12V. Encoder HT12E has eight address and another four address/data lines. The
data set on these twelve lines (address and address/data lines) is serially
transmitted when transmit-enable pin TE is taken low. The data output appears
serially on DOUT pin. The data is transmitted four times in succession. It consists
of differing lengths of positive-going pulses for ‘1’ and ‘0,’ the pulsewidth for
‘0’ being twice the pulse-width for ‘1.’ The frequency of these pulses may lie
between 1.5 and 7 kHz depending on the resistor value between OSC1 and OSC2
PINS.
Our finished product can be seen in the images below:
AIET/ECE/PR/35
GESTURE BASED ROBOT
Figure5-2 Robot-2
Figure5-3 Robot-3
AIET/ECE/PR/36
GESTURE BASED ROBOT
AIET/ECE/PR/37
GESTURE BASED ROBOT
AIET/ECE/PR/38
GESTURE BASED ROBOT
AIET/ECE/PR/39
GESTURE BASED ROBOT
REFERENCES
controlledtanktoytransmitter>
[4] “Robotic Gesture Recognition (1997)” by Jochen Triesch and Christoph Von
Der Malsburg
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.5427> [5]
“Real-Time Robotic Hand Control Using Hand Gestures” by Jagdish Lal Raheja,
Radhey Shyam, G. Arun Rajsekhar and P. Bhanu Prasad
[8]< http://en.wikipedia.org/wiki/Gesture_interface>
[9]< http://www.wisegeek.com/what-is-a-gear-motor.htm>
[10]<http://www.scribd.com/doc/98400320/InTech-Real-Time-Robotic-
Hand-Control-Using-Hand-Gestures>
[11]< http://en.wikipedia.org/wiki/DC_motor>
[12]<http://electronics.stackexchange.com/questions/18447/what-isbackemfcounter-
electromotive-force>
AIET/ECE/PR/40