Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

Vocational Training

Project report submitted in partial fulfilment of the requirement for the degree of
Bachelor of Technology in Electronics and Electrical Engineering.

Submitted by:

Under the Supervision of:

Kolkata-
West Bengal
2018

CERTIFICATE
his is to certify that the thesis entitled “GESTURE CONTROL ROBO”, submitted by Prithvish Chakraborty, Anirban Ghosh,
Ankit Pandey and Sabyasachi Mondal, B. Tech (Electronics and Communication Engineering) of Budge Budge Institute of
Technology , is a record of an original research work carried out by them under my supervision and guidance. The thesis has
fulfilled partial requirements as per the regulations of the training institute and in my opinion has reached the standard needed
for submission.

Guided By: Dr. Subhajit Kundu

WebTech Labs
Kolkata
West Bengal

Date:

Acknowledgements
First and foremost, we feel it as a great privilege in expressing our deepest and most sincere
gratitude to our supervisor Dr. , for his excellent guidance throughout our project
work. His kindness, dedication, hard work and attention to detail have been a great inspiration
to us. Our heartfelt thanks to you sir for the unlimited support and patience shown to us. We
would particularly like to thank him for all his help in patiently and carefully correcting all our
manuscripts.

ABSTRACT
Gesture Controlled Car is a robot which can be controlled by simple human
gestures. The user just needs to wear a gesture device in which a sensor is included.
The sensor will record the movement of hand in a specific direction which will
result in the motion of the robot in the respective directions. The robot and the
Gesture instrument are connected wirelessly through radio waves. User can interact
with the robot in a more friendly way due to the wireless communication. We can
control the car using accelerometer sensors connected to a hand glove. The sensors
are intended to replace the remote control that is generally used to run the car. It
will allow user to control the forward, backward, leftward and rightward
movements, while using the same accelerometer sensor to control the throttle of the
car. Movement of car is controlled by the differential mechanism. The mechanism
involves the rotation of both forth & rear wheels of left or right side to move in the
anticlockwise direction and the other pair to rotate in the clockwise direction which
makes the car to rotate about its own axis without any kind of forward or backward
motion. The main advantage of this mechanism is the car with this mechanism can
take sharp turn without any difficulty.

TABLE OF CONTENTS
S.No Content Page No.
1 Chapter 1
2 Introduction 6
3 1.1 Human Machine interaction
4 1.2 Gesture
5 1.3 Objective of Project
6 Chapter 2
7 1.1Gesture Controlled Robot
8 1.2 Application
9 Chapter 3
10 Literature Review
11 3.1 Accelerometer & gyroscope sensor (MPU-6050)
12 3.2 Adruino Uno
13 3.3 Adruino Software
14 3.4 Atmega 328
15 3.5 nRf24L01 Module(Rx/Tx)
16 3.6 Motor Driver IC(L298)
17 3.7 DC Motor
18 Chapter 4
19 Implementation
20 Chapter 5
21 Conclusion, Limitation & Future Work
21 3.1 Conclusion
23 3.2 Limitation & Future work
24 Chapter 6
25 Feasibility Of The Project
26 6.1 Software
27 6.2 Hardware
28 6.3 Arduino Code
29 CONCLUSION
30 REFERENCE

CHAPTER 1
INTRODUCTION
The 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. An important
aspect of a successful robotic system is the Human-Machine interaction. In the early years the only way to communicate with a robot was to
program which required extensive hard work. With the development in science and robotics, gesture based recognition came into life.
Gestures originate from any bodily motion or state but commonly originate from the face or hand. Gesture recognition can be considered as a
way for computer to understand human body language. This has minimized the need for text interfaces and GUIs (Graphical User Interface).
Gesture recognition technologies are much younger in the world of today. At this time there is much active research in the field and little in
the way of publicly available implementations. Several approaches have been developed for sensing gestures and controlling robots. Glove
based technique is a well-known means of recognizing hand gestures. It utilizes a sensor attached to a glove that directly measures hand
movements. A Gesture Controlled robot is a kind of robot which can be controlled by hand gestures and not the old fashioned way by using
buttons. The user just needs to wear a small transmitting device on his hand which includes a sensor which is an accelerometer in our case.
Movement of the hand in a specific direction will transmit a command to the robot which will then move in a specific direction. The
transmitting device includes a Comparator IC for assigning proper levels to the input voltages from the accelerometer and an Encoder IC
which is used to encode the four bit data and then it will be transmitted by an RF Transmitter module. 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.

3.1 Human Machine Interaction


An important aspect of a successful robotic system is the Human-Machine interaction. In the early years the only way to
communicate with a robot was to program which required extensive hard work. With the development in science and robotics,
gesture based recognition came into life. Gestures originate from any bodily motion or state but commonly originate from the face
or hand. Gesture recognition can be considered as a way for computer to understand human body language. This has minimized the
need for text interfaces and GUIs (Graphical User Interface).

3.2 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.

3.3 Objective Of The Project


Our objective is to make this device simple as well as cheap so that it could be mass produced and can be used for a number of purposes

CHAPTER 2
GESTURE CONTROL ROBOT

2.1 Gesture Control Robot


Gesture recognition technologies are much younger in the world of today. At this time there is much active research in the field and
little in the way of publicly available implementations. Several approaches have been developed for sensing gestures and controlling robots.
Glove based technique is a well-known means of recognizing hand gestures. It utilizes a sensor attached to a glove that directly measures
hand movements. A Gesture Controlled robot is a kind of robot which can be controlled by hand gestures and not the old fashioned way by
using buttons. The user just needs to wear a small transmitting device on his hand which includes a sensor which is an accelerometer in our
case. Movement of the hand in a specific direction will transmit a command to the robot which will then move in a specific direction. The
transmitting device includes a Comparator IC for assigning proper levels to the input voltages from the accelerometer and an Encoder IC
which is used to encode the four bit data and then it will be transmitted by an RF Transmitter module. 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 Application
1) Through the use of gesture recognition, remote control with the wave of a hand of various devices is possible.

2) 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
Our gesture controlled Car works on the principle of accelerometer which records hand movements and sends that data to the
comparator which assigns proper voltage levels to the recorded movements. That information is then transferred to encoder which makes it
ready for RF transmission. On the receiving end, the information is received wirelessly via RF, decoded and then passed onto the
microcontroller which takes various decisions based on the received information. These decisions are passed to the motor driver IC which
triggers the motors in different configurations to make the robot move in a specific direction.
3.1 MPU 6050 (Accelerometer & Gyroscope sensor)
An Accelerometer is an electromechanical device that measures acceleration forces. These forces may be static, like the constant force
of gravity pulling at your feet, or they could be dynamic – caused by moving or vibrating the accelerometer. It is a kind of sensor which
record acceleration and gives an analog data while moving in X, Y, Z direction or may be X, Y direction only depending on the type of the
sensor.

3.2 Adruino Uno


Arduino is an open-source computer hardware and software company, project and user community that designs and manufactures kits for
building digital devices and interactive objects that can sense and control the physical world

Pin Diagram
3.3 Adruino Software
The Arduino integrated development environment (IDE) is a cross-platform application written in Java, and derives from the IDE for the
Processing programming language and the Wiring projects. It is designed to introduce programming to artists and other newcomers unfamiliar with
software development. It includes a code editor with features such as syntax highlighting, brace matching, and automatic indentation, and is also
capable of compiling and uploading programs to the board with a single click. A program or code written for Arduino is called a “sketch” Arduino
programs are written in C or C++. The Arduino IDE comes with a software library called "Wiring" from the original Wiring project, which makes
many common input/output operations much easier. Users only need define two functions to make an executable cyclic executive program:

 setup(): a function run once at the start of a program that can initialize settings

 loop(): a function called repeatedly until the board powers off


3.4 ATMEGA 328
ATmega328 ATmega328 is a single-chip micro controller from Atmel and belongs to the mega AVR series. The Atmel 8-bit AVR RISC based
microcontroller combines 32kB ISP flash memory with read while write capabilities, 1kB EEPROM, 2kB SRAM, 23 general-purpose I/O lines, 32
general-purpose working register, three flexible timers/counters with compare modes, internal and external interrupts, serial programmable USART,
a byte oriented 2-wire serial interface, SPI serial port, 10 bit A/D converter, programmable watch-dog timer with an internal oscillator and five
software-selectable power-saving modes.

The device operates between 1.8 and 5.5 volts. It achieves throughputs approaching one MIPS per MHz. An alternative to ATmega328 is
ATmega328p.

3.5 Nrf24L01(Rx/Tx)
nRF24L01 is a single chip radio transceiver for the world wide 2.4 - 2.5 GHz ISM band. The transceiver consists of a fully
integrated frequency synthesizer, a power amplifier, a crystal oscillator, a demodulator, modulator and Enhanced ShockBurst™
protocol engine. Output power, frequency channels, and protocol setup are easily programmable through a SPI interface. Current
consumption is very low, only 9.0mA at an output power of -6dBm and 12.3mA in RX mode. Built-in Power Down and Standby modes
makes power saving easily realizable.

3.6 Motor Driver (L-298 H-Bridge)


It is also known as H-Bridge or Actuator IC. Actuators are those devices which actually gives the movement to do a task like
that of a motor. In the real world there are different types of motors available which work on different voltages. So we need a motor driver for
running them through the controller. 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".
H-Bridge 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.

 When switches A and D are on, motor rotates clockwise.

 When B and C are on, the motor rotates anti-clockwise.

 When A and B are on, the motor will stop.

 Turning off all the switches gives the motor a free wheel drive.

 Turning on A& C at the same time or B & D at the same time shorts the entire circuit. So, never try to do it.

3.6 DC Motor
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.
CHAPTER 3
IMPLEMENTATION

The accelerometer records the hand movement in the X and Y and Z direction only and outputs constant voltage levels. These voltages
are fed to the comparator IC which compares it with the reference voltages. The levels that we have set which are generated by the
accelerometer are compared with these and an analog 1 or 0 signal is given out from the comparator IC. The analog signal is the input
to the encoder IC. The coded data will be passed onto the nRF module.

The nRF modules work on the frequency of 315MHz it means that the carrier frequency of the nRF module is 315MHz.The nRF
modules enables the user to control the robot wirelessly and with the ease.

Transmitter Circuit
In the above figure we can see the transmitter circuit. 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) pinA 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 lot the microcontroller. This data is in the form of bits. The microcontroller reads these
bits and takes decision 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. The receiver
circuit is shown below:
CHAPTER 5

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. Different Hand gestures to make the robot move in specific directions.

5.2 Limitation and Future Work


 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; nearly50- 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.
CHAPTER 6

FEASIBILITY OF THE PROJECT:


During the development of the project we researched the feasibility in different fields, especially software and hardware. The
feasibility study is shown below.

6.1 Software
We targeted to choose a language that is easy to understand and program. So we chose assembly language for our project.
Assembly language is the basic language of microcontrollers. Although its not user friendly in terms of programming but still
one can learn it quickly.

6.2 Hardware
We chose accelerometer as the sensing device because it records even the minute movements. We could also have completed
our project using Arduino but chose microcontroller instead because its cost is low and is easily available everywhere. There are
a number of dc geared motors available but the ones we chose are capable of supporting loads up to 6kgs.

6.2 Arduino Code:


Transmitter Arduino Code-
#include <SPI.h> //SPI library for communicate with the nRF24L01+

#include "RF24.h" //The main library of the nRF24L01+

#include "Wire.h" //For communicate

#include "I2Cdev.h" //For communicate with MPU6050

#include "MPU6050.h" //The main library of the MPU6050

//Define the object to access and cotrol the Gyro and Accelerometer (We don't use the Gyro data)

MPU6050 mpu;

int16_t ax, ay, az;


int16_t gx, gy, gz;

//Define packet for the direction (X axis and Y axis)

int data[2];

//Define object from RF24 library - 9 and 10 are a digital pin numbers to which signals CE and CSN are connected.

RF24 radio(9,10);

const uint64_t pipe = 0xE8E8F0F0E1LL;

void setup(void){

Serial.begin(9600);

Wire.begin();

mpu.initialize();

radio.begin();

radio.openWritingPipe(pipe); //Sets the address of the receiver to which the program will send data.

void loop(void){

//With this function, the acceleration and gyro values of the axes are taken.

//If you want to control the car axis differently, you can change the axis name in the map command.

mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

//In two-way control, the X axis (data [0]) of the MPU6050 allows the robot to move forward and backward.

//Y axis (data [0]) allows the robot to right and left turn.

data[0] = map(ax, -17000, 17000, 300, 400 ); //Send X axis data

data[1] = map(ay, -17000, 17000, 100, 200); //Send Y axis data

radio.write(data, sizeof(data));

Serial.print("X=");

Serial.print(data[0]);

Serial.print(" Y=");

Serial.print(data[1]);

Serial.println();

}
Receiver Arduino Code-
#include <SPI.h> //SPI library for communicate with the nRF24L01+

#include "RF24.h" //The main library of the nRF24L01+

//Define enable pins of the Motors

const int enbA = 3;

const int enbB = 5;

//Define control pins of the Motors

//If the motors rotate in the opposite direction, you can change the positions of the following pin numbers

const int IN1 = 2; //Right Motor (-)

const int IN2 = 4; //Right Motor (+)

const int IN3 = 7; //Left Motor (+)

const int IN4 = 6; //Right Motor (-)

//Define variable for the motors speeds

//I have defined a variable for each of the two motors

//This way you can synchronize the rotation speed difference between the two motors

int RightSpd = 130;

int LeftSpd = 150;

//Define packet for the direction (X axis and Y axis)

int data[2];

//Define object from RF24 library - 9 and 10 are a digital pin numbers to which signals CE and CSN are connected

RF24 radio(9,10);

//Create a pipe addresses for the communicate


const uint64_t pipe = 0xE8E8F0F0E1LL;

void setup(){

//Define the motor pins as OUTPUT

pinMode(enbA, OUTPUT);

pinMode(enbB, OUTPUT);

pinMode(IN1, OUTPUT);

pinMode(IN2, OUTPUT);

pinMode(IN3, OUTPUT);

pinMode(IN4, OUTPUT);

Serial.begin(9600);

radio.begin(); //Start the nRF24 communicate

radio.openReadingPipe(1, pipe); //Sets the address of the transmitter to which the program will receive data.

radio.startListening();

void loop(){

if (radio.available()){

radio.read(data, sizeof(data));

Serial.print("X=");

Serial.print(data[0]);

Serial.print(" Y=");

Serial.print(data[1]);

Serial.println();

if(data[0] > 380){

//forward

analogWrite(enbA, RightSpd);

analogWrite(enbB, LeftSpd);

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);

if(data[0] < 310){

//backward

analogWrite(enbA, RightSpd);

analogWrite(enbB, LeftSpd);

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH);

if(data[1] > 180){

//left

analogWrite(enbA, RightSpd);

analogWrite(enbB, LeftSpd);

digitalWrite(IN1, HIGH);

digitalWrite(IN2, LOW);

digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH);

if(data[1] < 110){

//right

analogWrite(enbA, RightSpd);

analogWrite(enbB, LeftSpd);

digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH);

digitalWrite(IN3, HIGH);

digitalWrite(IN4, LOW);
}

if(data[0] > 330 && data[0] < 360 && data[1] > 130 && data[1] < 160){

//stop car

analogWrite(enbA, 0);

analogWrite(enbB, 0);

You might also like