You are on page 1of 59

HAND GESTURE CONTROLLED ROBOT USING ARDUINO

CHAPTER-1
INTRODUCTION

A Robot is an electro-mechanical system that is operated by a computer program. Robots


can be autonomous or semi-autonomous. An autonomous robot is not controlled by human
and acts on its own decision by sensing its environment.

Majority of the industrial robots are autonomous as they are required to operate at high
speed and with great accuracy. But some applications require semi-autonomous or human
controlled robots.

Some of the most commonly used control systems are voice recognition, tactile or touch
controlled and motion controlled.

One of the frequently implemented motion controlled robot is a Hand Gesture Controlled
Robot. In this project, a hand gesture controlled robot is developed using a 3-axis
Accelerometer and the controller part Arduino Uno.

Instead of using a remote control with buttons or a joystick, the gestures of the hand are
used to control the motion of the robot.

The project is based on wireless communication, where the data from the hand gestures is
transmitted to the robot over RF link (RF Transmitter – Receiver pair).

The project is divided into transmitter and receiver section. The circuit diagram and
components are explained separately for both transmitter and receiver sections.

DEPT OF ECE Page 1


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

CHAPTER-2
METHODOLOGY

2.1 BLOCK DIAGRAM

2.1.1.TRANSMITTER SECTION:

2.1.2 RECEIVER SECTION:

DEPT OF ECE Page 2


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

2.2 CIRCUIT DIAGRAM

2.2.1 TRANSMITTER SECTION:

DEPT OF ECE Page 3


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

2.2.2 RECEIVER SECTION:

2.3 WORKING:

Hand Gesture Controlled Robot is divided into two sections:

1. Transmitter part
2. Receiver part

In transmitter part, an accelerometer and a RF transmitter unit is used. The accelerometer


gives an analog output so here we need to convert this analog data in to digital. For this
purpose we have used 4 channel comparator circuit in place of any ADC. By setting

DEPT OF ECE Page 4


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

reference voltage we gets a digital signal and then apply this signal to HT12E encoder to
encode data or converting it into serial form and then send this data by using RF
transmitter into the environment.

At the receiver end we have used RF receiver to receive data and then applied to HT12D
decoder. This decoder IC converts received serial data to parallel and then read by using
arduino. According to received data we drive robot by using two DC motor in forward,
reverse, left, right and stop direction. Gesture controlled robot moves according to hand
movement as we place transmitter in our hand. When we tilt hand in front side, robot start
to moving forward and continues moving forward until next command is given. 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.

DEPT OF ECE Page 5


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

CHAPTER-3

COMPONENTS DESCRIPTION

3.1 TRANSMITTER SECTION:

3.1.1 AURDUINO NANO:

The Arduino board is designed in such a way that it is very easy for beginners to get
started with microcontrollers. This board especially is breadboard friendly is very easy to
handle the connections. Let’s start with powering the Board.

Powering Arduino Nano:

There are totally three ways by which you can power your Nano.

USB Jack: Connect the mini USB jack to a phone charger or computer through a cable
and it will draw power required for the board to function

Vin Pin: The Vin pin can be supplied with a unregulated 6-12V to power the board. The
on-board voltage regulator regulates it to +5V

+5V Pin: If you have a regulated +5V supply then you can directly provide this o the +5V
pin of the Arduino.

Input/output:

There are totally 14 digital Pins and 8 Analog pins on your Nano board. The digital pins
can be used to interface sensors by using them as input pins or drive loads by using them
as output pins. A simple function like pinMode() and digitalWrite() can be used to control
their operation. The operating voltage is 0V and 5V for digital pins. The analog pins can

DEPT OF ECE Page 6


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

measure analog voltage from 0V to 5V using any of the 8 Analog pins using a simple
function liken analogRead(). These pins apart from serving their purpose can also be used
for special purposes which are discussed below:

 Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL
serial data. They are connected with the corresponding ATmega328P USB to TTL serial
chip.
 External Interrupt Pins 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.
 PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using
analogWrite() function.
 SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI
communication.
 In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is HIGH
– LED is on and when pin 13 is LOW, its off.
 I2C A4 (SDA) and A5 (SCA): Used for IIC communication using Wire library.
 AREF: Used to provide reference voltage for analog inputs with analogReference()
function.
 Reset Pin: Making this pin LOW, resets the microcontroller.

DEPT OF ECE Page 7


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

ARDUINO NANO PIN CONFIGURATION:

Pin Category Pin Name Details

Power Vin, 3.3V, Vin: Input voltage to Arduino when using an external
5V, GND power source (6-12V).
5V: Regulated power supply used to power
microcontroller and other components on the board.
3.3V: 3.3V supply generated by on-board voltage
regulator. Maximum current draw is 50mA.
GND: Ground pins.

Reset Reset Resets the microcontroller.

Analog Pins A0 – A7 Used to measure analog voltage in the range of 0-5V

Input/Output Pins Digital Pins D0 - Can be used as input or output pins. 0V (low) and 5V
D13 (high)

Serial Rx, Tx Used to receive and transmit TTL serial data.

External Interrupts 2, 3 To trigger an interrupt.

PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.

SPI 10 (SS), 11 (MOSI), Used for SPI communication.


12 (MISO) and 13
(SCK)

Inbuilt LED 13 To turn on the inbuilt LED.

IIC A4 (SDA), A5 Used for TWI communication.


(SCA)

AREF AREF To provide reference voltage for input voltage.

DEPT OF ECE Page 8


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

ARDUINO NANO TECHNICAL SPECIFICATIONS:

Microcontroller ATmega328P – 8 bit AVR family microcontroller

Operating Voltage 5V

Recommended Input Voltage 7-12V


for Vin pin

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

Flash Memory 32 KB (2 KB is used for Bootloader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock Speed) 16 MHz

Communication IIC, SPI, USART

DEPT OF ECE Page 9


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.1.2 HT12E :

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.

PIN DIAGRAM:

DEPT OF ECE Page 10


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

PIN DESCRIPTION:

DEPT OF ECE Page 11


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.1.4 MPU6050 ACCELEROMETER:

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 an 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.
Phasesensitive demodulation techniques are then used to determine the magnitude and
direction of the acceleration.

DEPT OF ECE Page 12


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

PIN DESCRIPTION OF ACCELEROMETER:

1. Vcc : 5 volt supply should connect at this pin.

2. X-OUT : This pin gives an Analog output in x direction

3. Y-OUT : This pin gives an Analog Output in y direction

4. Z-OUT : This pin gives an Analog Output in z direction

5. GND : Ground

6. ST : This pin used for set sensitivity of sensor

3.1.4 RF TRANSMITTER:

PIN CONFIGURATION:

No: Pin Name Description

1 Vcc Power supply (+5V only)

2 Data Data to be transmitted is sent to this pin

3 Ground Connected to the ground of the circuit

4 Antenna Solder wire/antenna to improve range (not mandatory)

DEPT OF ECE Page 13


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

CIRCUIT DIAGRAM OF RF TRANSMITTER:

The transmitter section consists of an RF Transmitter, HT12E encoder IC and


four push buttons. The HT12E encoder IC converts the 4-bit data from the 4 data pins that
are connected to buttons into serial data. This serial data is sent to RF transmitter. The RF
transmitter transmits this serial data using radio signals.

433 MHz RF TRANSMITTER MODULE SPECIFICATIONS:

 Transmitter Operating Voltage: +5V only


 Transmitter Operating current: 9mA to 40mA
 Operating frequency: 433 MHz
 Transmission Distance: 3 meters (without antenna) to 100 meters (maximum)
 Modulating Technique: ASK (Amplitude shift keying)
 Data Transmission speed: 10Kbps
 Circuit type: Saw resonator
 Low cost and small package

DEPT OF ECE Page 14


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2 RECEIVER SECTION:

3.2.1 HT-12D DECODER IC:

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.

DEPT OF ECE Page 15


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

PIN DESCRIPTION:

DEPT OF ECE Page 16


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2.3 JUMPER WIRES:

Jumper wires are simply wires that have connector pins at each end, allowing them to
be used to connect two points to each other without soldering. Jumper wires are typically
used with breadboards and other prototyping tools in order to make it easy to change a
circuit as needed.
Jumper wires typically come in three versions: male-to-male, maletofemale and female-
to-female. The difference between each is in the end point of the wire. Male ends have a
pin protruding and can plug into things, while female ends do not and are used to plug
things into. Male-to-male jumper wires are the most common and what you likely will use
most often. When connecting two ports on a breadboard, a male-to- male wire is what
you’ll need.

DEPT OF ECE Page 17


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2.4 MOTOR DRIVER:

WORKING OF MOTOR DRIVER IC – L293D:

Arduino can't supply the current required by DC motor to run. In order to fulfill this
requirement these motor drivers are used.L293D is a typical Motor driver or Motor Driver
IC which allows DC motor to drive on either direction. L293D is a 16-pin IC which can
control a set of two DC motors simultaneously in any direction. It means that you can
control two DC motor with a single L293D IC. It works on the concept of H- Bridge.
H-Bridge is a circuit which allows the voltage to be flown in either direction. As you
know voltage need to change its direction for being able to rotate the motor in clockwise
or anticlockwise direction.
In a single L293D chip there are two h-Bridge circuit inside the IC which can rotate
two dc motors independently. The motors are rotated on the basis of the inputs provided
across the input pins as LOGIC 0 or LOGIC 1.Due to its size it is very much used in
robotic application for controlling DC motors.

DEPT OF ECE Page 18


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

PIN DIAGRAM:

PIN DESCRIPTION:

DEPT OF ECE Page 19


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2.5 BATTERY :

A Battery is a device that converts chemical energy to electrical energy. The first
battery was developed by Alessandro voltain the year of 1800. It is an electrochemical cell
(or enclosed and protected material) that can be charged electrically to provide static
potential for power or released electrical charge when needed. An electronic battery is a
device consisting of one or more electrochemical cells with external connections provided
to power electrical devices such as flash lights, smartphones and electric cars. When a
battery is supplying electric power, its positive terminal is the source of electrons that
when connected to an external circuit will flow and deliver energy to an external device.
When a battery is connected to an external circuit, electrolytes are able to move as ions
within, allowing the chemical reactions to be completed at the separate terminals and so
deliver energy to the external circuit. It is the movement of those ions within the battery
which allows current to flow out of the battery to perform work. In this project we are
using
Battery Voltage = 5 v
Current = 1500 mAh

DEPT OF ECE Page 20


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2.6 BREAD BOARD:

A breadboard is a construction base for prototyping of electronics. Originally the


word referred to a literal bread board, a polished piece of wood used for slicing bread. It is
a widely used tool to design and test circuit. You do not need to solder wires and
components to make a circuit while using a bread board. It is easier to mount components
& reuse them. Since, components are not soldered you can change your circuit design at
any point without any hassle. It consist of an array of conductive metal clips encased in a
box made of white ABS plastic, where each clip is insulated with another clips. There are
a number of holes on the plastic box, arranged in a particular fashion. A typical bread
board layout consists of two types of region also called strips. Bus strips and socket strips.
Bus strips are usually used to provide power supply to the circuit. It consists of two
columns, one for power voltage and other for ground.
Socket strips are used to hold most of the components in a circuit. Generally it consists of
two sections each with 5 rows and 64 columns. Every column is electrically connected
from inside.

DEPT OF ECE Page 21


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2.6 DC MOTORS WITH WHEELS :

There are three different type of motors :

 DC motor
 Servo motor
 Stepper motor

DC MOTOR:
A DC motor (Direct Current motor) is the most common type of motor. DC motors
normally have just two leads, one positive and one negative. If you connect these two
leads directly to a battery, the motor will rotate. If you switch the leads, the motor will
rotate in the opposite direction.

Warning − Do not drive the motor directly from Arduino board pins. This may damage
the board. Use a driver Circuit or an IC. We can’t drive a DC Motor (depends) directly
with a Microcontroller, as DC Motors requires high current and high voltage than a
Microcontroller can handle. Microcontrollers usually operates at +5 or +3.3V supply and it
I/O pin can provide only up to 25mA current. Commonly used DC Motors requires 12V
supply and 300mA current, moreover interfacing DC Motors directly with
Microcontrollers may affect the working of Microcontroller due to the Back EMF of the
DC Motor. Thus it is clear that, it not a good idea to interface DC Motor directly with
DEPT OF ECE Page 22
HAND GESTURE CONTROLLED ROBOT USING ARDUINO

Microcontrollers. The solution to above problems is to use H-bridge circuit. It is a special


circuit, by using the 4 switches we can control the direction of DC Motor. Depending upon
our power requirements we can make our own H-bridge using Transistors/MOSFETs as
switches. It is better to use ready made IC’s, instead of making our own H-bridge.
L293D and L293 are two such ICs. These are dual H-bridge motor drivers, ie
by using one IC we can control two DC Motors in both clock wise and counter clockwise
directions. The L293D can provide bidirectional drive currents of up to 600-mA at
voltages from 4.5 V to 36 V while L293 can provide up to 1A at same voltages. Both ICs
are designed to drive inductive loads such as dc motors, bipolar stepping motors, relays
and solenoids as well as other high-current or high-voltage loads in positive-supply
applications. All inputs of these ICs are TTL compatible and output clamp diodes for
inductive transient suppression are also provided internally. These diodes protect our
circuit from the Back EMF of DC Motor.
In both ICs, drivers are enabled in pairs, with drivers 1 and 2 are enabled
by a high input to 1,2EN and drivers 3 and 4 are enabled by a high input to 3,4EN. When
drivers are enabled, their outputs will be active and in phase with their inputs. When
drivers are disabled, their outputs will be off and will be in the high-impedance state.

INTERFACING L293D MOTOR DRIVER WITH MOTOR:

DEPT OF ECE Page 23


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

3.2.7 RF RECEIVER:

PIN DESCRIPTION:

No: Pin Name Description

1 Vcc Power supply (3V to 12V)

2 Data Data received can be obtained from this pin

3 Data It serves the same purpose (any one can be used)

4 Gnd Connected to the ground of the circuit

5 Antenna Solder wire/antenna to improve range (not mandatory)

DEPT OF ECE Page 24


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

CIRCUIT DIAGRAM OF RF RECEIVER:

WORKING:

The receiver section consists of RF Receiver, HT12D Decoder IC and four LEDs. An
extra LED is connected to VT (Valid Transmission) pin of the decoder IC. This is used to
indicate a successful transmission of data. , the RF receiver receives the serial data. This
serial data is sent to HT12D decoder IC which converts into 4 bit parallel data.The 4 data
pins of decoder are connected to LEDs. According to the buttons pushed, the LEDs can be
turned ON or OFF.

433 z RF RECEIVER Module Specifications:

 Receiver Operating Voltage: 3V to 12V


 Receiver Operating current: 5.5mA

DEPT OF ECE Page 25


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

 Operating frequency: 433 MHz


 Transmission Distance: 3 meters (without antenna) to 100 meters (maximum)
 Modulating Technique: ASK (Amplitude shift keying)
 Data Transmission speed: 10Kbps
 Circuit type: Saw resonator
 Low cost and small package

DEPT OF ECE Page 26


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

CHAPTER-4

SOFTWARE REQUIREMENTS

4.1 ARDUINO SOFTWARE (IDE):

The open-source Arduino Software (IDE) makes it easy to write code and upload
it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in
Java and based on Processing and other open-source software. This software can be used
with any Arduino board. For latest software: - https://www.arduino.cc/en/Main/Software.

 Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students with or without a background in electronics and
programming.
 Arduino is an open-source prototyping platform based on easy-to use hardware and
software.
 Arduino boards can read inputs - light on a sensor, a finger on a button, or a
message - and turn it into an output - activating a motor, turning on an LED,
publishing something online and many more.
 You can tell your board what to do by sending a set of instructions to the
microcontroller on the board.
 To do so you use the Arduino programming language (based on Wiring), and the
Arduino Software (IDE), based on Processing.
 Inexpensive: Arduino boards are relatively inexpensive compared to other
microcontroller platforms.
 Cross-platform: The Arduino Software (IDE) runs on Windows, Macintosh
OSX, and Linux operating systems. Most microcontroller systems are
limited to Windows.
DEPT OF ECE Page 27
HAND GESTURE CONTROLLED ROBOT USING ARDUINO
 Simple, clear programming environment: The Arduino Software (IDE) is
easy-to-use for beginners, yet flexible enough for advanced users to take
advantage of as well.
 Open source and extensible hardware:The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit
designers can make their own version of the module, extending it and
improving it.

 Open source and extensible software: The Arduino software is published as


open source tool and the language can be expanded through C++ libraries.

4.3 STEPS FOR ARDUINO IDE TOOL:

STEP-1:GET AN ARDUINO BOARD AND USB CABLE:


Get an Arduino board and USB cable: In this tutorial, we assume that using an
Arduino Nano also need a standard USB cable (A plug to B plug the kind you would
connect to a USB printer, for example).

STEP2:DOWNLOAD THE ARDUINO ENVIRONMENT:


(https://www.arduino.cc/en/Main/Software) Get the latest version from the download
page. When the download finishes, unzip the downloaded file. Make sure to preserve the
folder structure. Double-click the folder to open it. There should be a few files and sub-
folders inside.

STEP 3: CONNECTION OF BOARD:


The Arduino Uno, Mega, and Arduino Nano automatically draw power from either
the USB connection to the computer or an external power supply. If the system using an

DEPT OF ECE Page 28


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

Arduino Decimal, it will need to make sure that the board is configured to draw power
from the USB connection. The power source is selected with a jumper, a small piece of
plastic that fits onto two of the three pins between the USB and power jacks. Check that
it's on the two pins closest to the USB port. Connect the Arduino board to computer using
the USB cable. The green power LED (labelled PWR) should go on.

STEP-4: INSTALL THE DRIVERS:

Installing drivers for the Arduino Uno or Arduino Mega 2560 withWindows7,
Vista, or XP or Aurduino nano.

DEPT OF ECE Page 29


HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Step 4 : Launch Arduino IDE
After your Arduino IDE software is downloaded, you need to unzip the folder.
Inside the folder, you can find the application icon with an infinity label (application.exe).
Double-click the icon to start the IDE.

Fig 4.1: Launching Arduino

Step 5 : Create a new project to write the code

Fig 4.2: Create a new project


DEPT OF ECE Page 30
HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Some inbuilt example projects also there in the software.

Fig 4.3: Built in examples

Step 6 : Select of Arduino board

Before uploading the code into board it is must to select the Arduino board type.

Fig 4.4: Select the Arduino nano

DEPT OF ECE Page 31


HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Step 7 : Select your serial port
Select the serial device of the Arduino board. Go to Tools → Serial Port menu.
This is likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware
serial ports). To find out, you can disconnect your Arduino board and re-open the menu,
the entry that disappears should be of the Arduino board. Reconnect the board and select
that serial port.

Fig 3.5: Selection of serial port

Step 8 : Upload the program to your board

DEPT OF ECE Page 32


HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Before explaining how we can upload our program to the board, we must

demonstrate the function of each symbol appearing in the Arduino IDE toolbar.

Fig 3.6: Uploading the program

A − Used to check if there is any compilation error.

DEPT OF ECE Page 33


HAND GESTURE CONTROLLED ROBOT USING ARDUINO
B − Used to upload a program to the Arduino board.

C − Shortcut used to create a new sketch.

D − Used to directly open one of the example sketch.

E − Used to save your sketch.

F − Serial monitor used to receive serial data from the board and send the serial data to
the board.

To upload the code into Arduino compile the code the code first, if therte is no
errors click the upload button. Wait a few seconds; if the upload is successful, the
message “Done uploading” will appear in the status bar and the LED on the board will
blink for one second.

DEPT OF ECE Page 34


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

Fig 3.3: Built in examples

Step 6 : Select of Arduino board

Before uploading the code into board it is must to select the Arduino board type.

DEPT OF ECE Page 35


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

TRANSMITTER SECTION:

The transmitter section of the robot consists of Arduino Nano board, MPU6050 Sensor,
HT-12E Encoder IC and an RF Transmitter. The communication between Arduino and
MPU6050 Sensor takes place through I2C Interface. Hence, the SCL and SDA pins of the
MPU6050 Sensor are connected to A5 and A4 pins of the Arduino Nano.

Additionally, we will be using the interrupt pin of the MPU6050 and hence, it is connected
to D2 of Arduino Nano.

HT-12E is an encoder IC that is often associated with RF Transmitter module. It converts


the 12-bit parallel data to serial data. The 12-bit data is divided into address and data bits.
A0 to A7 (Pin 1 to Pin8) are the address bits and they are used for secure transmission of
the data. These pins can be either left open or connected to ground (Vss). In this circuit,
Pin 1 to Pin 9 (A0 – A7 and Vss) of HT-12E are 5connected to ground.

Pins 10 to 13 (AD8, AD9, AD10 and AD11) are the data pins of HT-12E. They receive the
4 word parallel data from external source like a microcontroller (Arduino Nano in this
case). They are connected to the pins D12, D11, D10 and D9 of Arduino Nano
respectively.

TE’ is the transmission enable pin and it is an active low pin. The data is transmitted as
DEPT OF ECE Page 36
HAND GESTURE CONTROLLED ROBOT USING ARDUINO
long as the TE’ is low. Hence, Pin 14 (TE’) is also connected to ground.

The encoder IC has an internal oscillator circuit between the pins 16 and 15 (OSC1 and
OSC2). A 750KΩ resistor is connected between these pins to enable the oscillator. Dout
(Pin 17) is the serial data out pin. It is connected to the data in pin of the RF Transmitter.

Both Arduino Nano and MPU6050 have 3.3V Regulator. Hence, all the VCC pins are
connected to a regulated 5V Supply.

RECEIVER SECTION:

The receiver section of the robot consists of an RF Receiver, HT-12D Decoder IC, L293D
Motor Driver IC and a robot chassis with four motors connected to wheels.

HT-12D is the decoder IC that is often associated with RF Receiver. It converts the serial
data received by the RF link into parallel data. A0 to A7 (Pin 1 to Pin 8) are the address
pins and must be matched with the address pins of the encoder.

Since the address pins of encoder (HT-12E) are grounded, the address pins of decoder
must also be grounded. Hence, pins 1 to 9 (A0 – A7 and Vss) are connected to ground.
The serial data from the RF Receiver is given to Din (Pin 14) of the decoder IC.

HT-12D has an internal oscillator and an external resistor of 33KΩ is connected between
OSC1 and OSC2 (Pins 16 and 15). Pin 17 (VT) indicates a valid transmission of data and
this pin will be high when a valid data is present on the data pins. An LED in series with a
330Ω resistor is connected to this pin to indicate a valid data transmission.

DEPT OF ECE Page 37


HAND GESTURE CONTROLLED ROBOT USING ARDUINO
Pins 10 to 13 (D8, D9, D10 and D11) of HT-12D are the parallel data out pins. They are
connected to the input pins of the L293D motor driver IC (Pins 2, 7, 10 and 15
respectively).

L293D motor driver IC is used to provide the necessary current (for both forward and
reverse directions) to the motors. Pins 1 and 9 are the enable pins and are connected to

VCC (+5v) along with Pin 16 (which is the logic supply). Pins 3 – 6 and 11 – 14 are the
outputs and are connected to the four motors.

Pin 8 is the Motor Supply Pin and is connected to a separate power supply. Hence, you
will need two batteries in the Receiver Section; one for the Circuit and one for the motors.

DEPT OF ECE Page 38


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 39


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 40


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 41


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 42


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 43


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 44


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 45


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 46


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 47


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 48


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 49


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 50


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 51


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 52


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 53


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 54


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 55


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 56


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 57


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 58


HAND GESTURE CONTROLLED ROBOT USING ARDUINO

DEPT OF ECE Page 59

You might also like