Hand Gesture Controlled Robot
Hand Gesture Controlled Robot
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 accelero-
meter. 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.
1.2 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.
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.
CHAPTER 2
GESTURE CONTROLLED ROBOT
At the receiving end an RF Receiver module will receive the encoded data and
decode it by using a decoder IC. This data is then processed by a microcontroller and
passed onto a motor driver to rotate the motors in a special configuration to make the
robot move in the same direction as that of the hand.
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.
Traditional interfaces, keyboards and mice present a bottleneck in application
that rely on heavy interaction of the user with the machine due to the
unnaturalness of the interaction.
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.
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:
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.
This tilt corresponded to the analog voltage.
Using this voltage, control signals are generated for four directions of the robot
car.
3.3 FEATURES
The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal
conditioned voltage outputs. The product measures acceleration with a minimum
full-scale range of ±3 g. It can measure the static acceleration of gravity in tilt-
sensing applications, as well as dynamic acceleration resulting from motion, shock,
or vibration. The user selects the bandwidth of the accelerometer using the CX, CY,
and CZ capacitors at the XOUT, YOUT, and ZOUT pins. Bandwidths can be
selected to suit the application, with a range of 0.5 Hz to 1600 Hz for the X and Y
axes, and a range of 0.5 Hz to 550 Hz for the Z axis. The ADXL335 is available in a
small, low profile, 4 mm × 4 mm × 1.45 mm, 16-lead, plastic lead frame chip scale
package (LFCSP_LQ).
THEORY OF OPERATION
The ADXL335 is a complete 3-axis acceleration measurement system. The
ADXL335 has a measurement range of ±3 g minimum. It contains a polysilicon
surface-micro-machined sensor and signal conditioning circuitry to implement an
open-loop acceleration measurement architecture. The output signals are analog
voltages that are proportional to acceleration. The accelerometer can measure the
static acceleration of gravity in tilt-sensing applications as well as dynamic
acceleration resulting from motion, shock, or vibration. The sensor is a polysilicon
surface-micro-machined structure built on top of a 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 that consists of 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.
The demodulator output is amplified and brought off-chip through a 32 kΩ resistor.
The user then sets the signal bandwidth of the device by adding a capacitor. This
filtering improves measurement resolution and helps prevent aliasing.
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
APPLICATIONS INFORMATION
POWER SUPPLY DECOUPLING
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 anti-
aliasing and noise reduction. The equation for the 3 dB bandwidth
or more simply
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
FIGURE 3-5
The figure shown below is comparator IC. The pins 1, 7, 8 and 14 are output pins. A
reference voltage is connected to the negative terminal for high output when input is
high or positive terminal for high output when input is low from the LM324 IC.
HT12E is an encoder integrated circuit of 212 series of encoders. They are paired with
212 series of decoders for use in remote control system applications. It is mainly used
in interfacing RF and infrared circuits. The chosen pair of encoder/decoder should
have same number of addresses and data format. Simply put, HT12E converts the
parallel inputs into serial output. It encodes the 12 bit parallel data into serial for
transmission through an RF transmitter. These 12 bits are divided into 8 address bits
and 4 data bits.
HT12E has a transmission enable pin which is active low. When a trigger signal is
received on TE pin, the programmed addresses/data are transmitted together with the
header bits via an RF or an infrared transmission medium. HT12E begins a 4-word
transmission cycle upon receipt of a transmission enable. This cycle is repeated as
long as TE is kept low. As soon as TE returns to high, the encoder output completes
its final cycle and then stops.
Although radio frequency is a rate of oscillation, the term "radio frequency" or its
abbreviation "RF" are also used as a synonym for radio – i.e. to describe the use of
wireless communication, as opposed to communication via electric wires
The RF module is working on the frequency of 434 MHz and has a range of 50-80
meters.
PIN FUNCTION
VCC 5V supply
PIN FUNCTION
VCC 5V supply
HT12D is a decoder integrated circuit that belongs to 212 series of decoders. This
series of decoders are mainly used for remote control system applications, like
burglar alarm, car door controller, security system etc. It is mainly provided to
interface RF and infrared circuits. They are paired with 212 series of encoders. The
chosen pair of encoder/decoder should have same number of addresses and data
format.
In simple terms, HT12D converts the serial input into parallel outputs. It decodes the
serial addresses and data received by, say, an RF receiver, into parallel data and
sends them to output data pins. The serial input data is compared with the local
addresses three times continuously. The input data code is decoded when no error or
unmatched codes are found. A valid transmission in indicated by a high signal at VT
pin.
HT12D is capable of decoding 12 bits, of which 8 are address bits and 4 are data bits.
The data on 4 bit latch type output pins remain unchanged until new is received.
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by
bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Table 4-3 Arduino Specifications
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).
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-to-TTL
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 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.
FIGURE 3-12
FIGURE 3-13
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.
Note: The project can be implemented with or without the help
of a special library called “VirtualWire.h”. The project
implemented here 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 communication, the receiver will
receive the data “1”.
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.
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.
3.6.1 INTERFACING WITH ARDUINO MOTOR DRIVER
The output from the microcontroller is a low current signal. The motor driver
amplifies that current which can control and drive a motor. In most cases, a transistor
can act as a switch and perform this task which drives the motor in a single direction.
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.8 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.
Reducing the speed put out by the motor while increasing the quantity of applied
torque is a important feature of the reduction gear trains found in a gear motor. The
decrease in speed is inversely relative to the increase in torque. This association
means that, in this sort of device, if the torque were to double, the speed would
decrease by one half. Small electric motors, such as the gear motor, are able to move
and stand very heavy loads because of these reduction gear trains. While the speed
and ability of larger motors is greater, small electric motors are sufficient to bear
these loads.
CHAPTER 4
IMPLEMENTATION
Different Hand gestures to make the robot move in specific directions are as follow:
The robot only moves when the accelerometer is moved in a specific direction. The
valid movements are as follows:
ACCELEROMETER
DIRECTION ORIENTATION
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:
Side D3 D2 D1 D0 Direction
Stable 0 0 0 0 Stop
This 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 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.
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:
#define FD 16
#define BD 17
#define LD 18
#define RD 19
#define m11 3
#define m12 4
#define m21 5
#define m22 6
void forward()
{
digitalWrite(m11, HIGH);
digitalWrite(m12, LOW);
digitalWrite(m21, HIGH);
digitalWrite(m22, LOW);
}
void backward()
{
digitalWrite(m11, LOW);
digitalWrite(m12, HIGH);
digitalWrite(m21, LOW);
digitalWrite(m22, HIGH);
}
void left()
{
digitalWrite(m11, HIGH);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
}
void right()
{
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, HIGH);
digitalWrite(m22, LOW);
}
void Stop()
{
digitalWrite(m11, LOW);
digitalWrite(m12, LOW);
digitalWrite(m21, LOW);
digitalWrite(m22, LOW);
}
void setup()
{
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);
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 pulse-
width 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.
Figure5-6 Robot-2
Touch-less
The on-board batteries occupy a lot of space and are also quite
heavy. We can either use some alternate power source for the
batteries or replace the current DC Motors with ones which
require less power.
Secondly, as we are using RF for wireless transmission, the
range is quite limited; nearly 50-80m. This problem can be
solved by utilizing a GSM module for wireless transmission.
The GSM infrastructure is installed almost all over the world.
GSM will not only provide wireless connectivity but also quite
a large range.
Thirdly, an on-board camera can be installed for monitoring the
robot from faraway places. All we need is a wireless camera
which will broadcast and a receiver module which will provide
live streaming.
REFERENCES