You are on page 1of 54

A PROJECT REPORT ON

GESTURE CONTROLLED WIRELESS CONTROL

Submitted in partial fulfillment of the requirements

For the award of the degree

Bachelor of Engineering

In

Electronics & Communication

SUBMITTED BY

-------------------- (--------------)

--------------------- (---------------)

--------------------- (---------------)

DEPARTMENT OF ELECTRONICS AFFILIATED TO ___________ UNIVERSITY

1
CERTIFICATE

This is to certify that the projet work entitled GESTURE CONTROLLED

WIRELESSCONTROL

is done by ______________________________________________submitted in partial

fulfillment for the award of Bachelor of Electronics Engineering from______________ College

of Engineering affiliated to _________ University, Hyderabad .

________________ ____________

(Head of the department, Electronics) (Assistant Professor)

EXTERNAL EXAMINER

2
ACKNOWLEDGEMENT

The satisfaction that accompany the successful completion of any task would be incomplete
without the mentioning of the people whose constant guidance and encouragement made it
possible. We take pleasure in presenting before you, our project, which is result of studied blend
of both research and knowledge.

We express our earnest gratitude to our internal guide, Assistant Professor ______________,
Department of ECE, our project guide, for his constant support, encouragement and guidance.
We are grateful for his cooperation and his valuable suggestions.

Finally, we express our gratitude to all other members who are involved either directly or
indirectly for the completion of this project.

3
DECLARATION

We, the undersigned, declare that the project entitled “GESTURE CONTROLLED

WIRELESS CONTROL” being submitted in partial fulfillment for the award of Bachelor of

Electronics Engineering affiliated to _________ University is the work carried out by us.

__________ _________ _________

__________ _________ _________

4
GESTURE CONTROLLED WIRELESS CONTROL

INDEX

Contents Page No.

Abstract…………………………………

Hardware Description………………….

Coding…………………………………..

Software Description……………………………

Conclusion……………………………………………

References……………………………….

5
Hand Gesture Controlled Wireless Robot

The transmitter section of the consists of accelerometer sensor ADXL335 which is


interfaced with analog channels of Arduino UNO based on Atmega328 microcontroller, HT-12E
Encoder and RF Transmitter. The sensor gives data output when hand is tilted in horizontal or
vetical orientation. The microcontroller processes this data and sends commands for robot
movements through RF transmitter.

RF Receiver receives command data and gives it to HT-12D Decoder. The data output
from decoder is processed using microcontroller and motors are controlled through L293d motor
driver. Regulated Power supply is generated using 12V rechargeable battery and 7805 regulator
IC.

Hardware Components:

 ATMEGA328 Microcontroller (Arduino UNO)

 RF TX & RF RX Module

 HT12E Encoder

 HT12D Decoder

 L293 MOTOR DRIVER IC

 GEAR DC MOTORS

 RECHARGEABLE BATTERY 12V

Software:

 ARDUINO IDE

 EMBDDED CPP CODE

 PROTEUS SIMULATOR

6
Transmitter:

ATMEGA328
ADXL 335 RF
MCU
MEMS HT12E Transmitter
Encoder
Sensor Module

Receiver :

RF Receiver HT12D L293D


ATMEGA328
Module Decoder Motor Gear DC
MCU
Driver Motors

Regulated Power Supply :

+5V
12V Regulated
Rechargeable Power Supply
Battery

7
VOLTAGE REGULATOR

This is most common voltage regulator that is still used in embedded designs.
LM7805 voltage regulator is a linear regulator. With proper heat sink these LM78xx types can
handle even more than 1A current. They also have Thermal overload protection, Short circuit
protection. This will connect at the output of rectifier to get constant Dc supply instead of ripple
voltages. It mainly consists of 3 pins :

1. Input voltage 2. Output voltage 3. Ground

8
MICROCONTROLLER

Basically, a microcontroller is a device which integrates a number of the components of a


microprocessor system onto a single microchip. So a microcontroller combines onto the same
microchip. The following components:

 CPU Core
 Memory (Both RAM and ROM)
 Some Parallel Digital I/Os
The microprocessor is the integration of a number of useful functions into a single IC
package. Has the ability to execute a stored set of instructions to carry out user defined tasks;
also has ability to access external memory chips to both read and write data from and to the
memory.

Essentially, a microcontroller is obtained by integrating the key components of


microprocessor, RAM, ROM, and Digital I/O onto the same chip die. Modern microcontrollers
also contain a wealth of other modules such as Serial I/O, Timers, and Analogue to Digital
Converters. There are a large number of specialized devices with additional modules for specific
needs. E.g. CAN controllers.

9
Arduino

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use


hardware and software. It is a single board microcontroller, descendant of the open-source
wiring platform designed to make the process of using electronics in multidisciplinary projects.
Arduino Uno, a microcontroller board based on the ATmega328 is used in this project. The
hardware consists of a simple open hardware design for the Arduino board with an on-board
input/output support. The software consists of a standard programming language compiler and
the boot loader that runs on the board. Arduino hardware is programmed using a Wiring-based
language (syntax and libraries), similar to C++ with some slight simplifications and
modifications, and a Processing-based integrated development environment.

Arduino can sense the environment by receiving input from a variety of sensors and can
affect its surroundings by controlling lights, motors, and other actuators. The microcontroller on
the board is programmed using the Arduino programming language (based on Wiring) and the
Arduino development environment (based on Processing). Arduino projects can be stand-alone
or they can communicate with software running on a computer (e.g. Flash, Processing, MaxMSP
and Megunolink). The hardware reference designs (CAD files) are available under an open-
source license; you are free to adapt them to your needs. The open-source Arduino environment
makes it easy to write code and upload it to the i/o board. It runs on Windows, Mac OS X, and
Linux. In addition to all the features of the previous board, the Uno now uses an ATmega8U2
instead of the FTDI chip. This allows for faster transfer rates, no drivers needed for Linux or
Mac (in file for Windows is needed), and the ability to have the Uno show up as a keyboard,
mouse, joystick, etc.

10
Arduino Hardware:

An Arduino board consists of an 8-bit Atmel AVR microcontroller with complementary


components to facilitate programming and incorporation into other circuits. An important aspect
of the Arduino is the standard way that connectors are exposed, allowing the CPU board to be
connected to a variety of interchangeable add-on modules known as shields. Some shields
communicate with the Arduino board directly over various pins, but many shields are
individually addressable via an I²C serial bus, allowing many shields to be stacked and used in
parallel. Official Arduino’s have used the mega AVR series of chips, specifically the ATmega8,
ATmega168, ATmega328, ATmega1280, and ATmega2560. A handful of other processors have
been used by Arduino compatibles. Most boards include a 5 volt linear regulator and a 16 MHz
crystal oscillator (or ceramic resonator in some variants), although some designs such as the Lily
Pad run at 8 MHz and dispense with the onboard voltage regulator due to specific form-factor
restrictions. An Arduino's microcontroller is also pre-programmed with a boot loader that
simplifies uploading of programs to the on-chip flash memory, compared with other devices that
typically need an external programmer.

At a conceptual level, when using the Arduino software stack, all boards are
programmed over an RS-232 serial connection, but the way this is implemented varies by
hardware version. Serial Arduino boards contain a simple inverter circuit to convert between
RS-232-level and TTL-level signals. Current Arduino boards are programmed via USB,
implemented using USB-to-serial adapter chips such as the FTDI FT232. Some variants, such as
the Arduino Mini and the unofficial Board uno, use a detachable USB-to-serial adapter board or
cable, Bluetooth or other methods. (When used with traditional microcontroller tools instead of
the Arduino IDE, standard AVR ISP programming is used.)

The Arduino board exposes most of the microcontroller's I/O pins for use by other
circuits. The Diecimila, Duemilanove, and current Uno provide 14 digital I/O pins, six of which
can produce pulse-width modulated signals, and six analog inputs. These pins are on the top of
the board, via female 0.1 inch headers. Several plug-in application shields are also
commercially available.

11
Features

• ATmega328 microcontroller

• Input voltage - 7-12V

• 14 Digital I/O Pins (6 PWM outputs)

• 6 Analog Inputs

• 32k Flash Memory

• 16Mhz Clock Speed

The maximum values that Arduino can handle:

• Max frequency: 16MHz

• Max Voltage: 5V

• Max Current: 50mA

12
Pin Description

• Arduino can be powered using power jack, USB port. Apart from this it can also be powered
by using a external battery or AC to DC adaptor through pin Vin.

• 5V, 3.3V: there is a inbuilt regulator on the board. Through this regulator a constant DC supply
of 5V, 3.3V is provided.

• Reset: This pin enables to reset the micro controller.

• IOREF: This pin acts as reference to the inputs given to the arduino board.

• There are 6 pins A0 – A5 through which analog input can be given to the arduino board.

• There are 14 digital pins 0-13. Among these (3,5,6,9,10,11) are PWM pins(pulse
width modulation) from which analog output can be taken from the arduino board.

• There is a inbuilt LED on pin 13.

• AREF- This pin acts as reference to the analog inputs.

• Rx,Tx are used for receiving and transmitting serial data.

• ICSP- (In circuit serial programming)- These pins enable the user to programme the chips on
the circuit.

13
Arduino Software:

The Arduino IDE is a cross-platform application written in Java, and is derived from the
IDE for the Processing programming language and the Wiring project. 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. There is typically no need to edit make files or run programs on a command-line interface.
Although building on command-line is possible if required with some third-party tools such as
Ino.

The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of the same
name), which makes many common input/output operations much easier.Arduino programs
are written in C/C++, although users only need define two functions to make a runnable
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

It is a feature of most Arduino boards that they have an LED and load resistor
connected between pin 13 and ground, a convenient feature for many simple tests. The above
code would not be seen by a standard C++ compiler as a valid program, so when the user clicks
the "Upload to I/O board" button in the IDE, a copy of the code is written to a temporary file
with an extra include header at the top and a very simple main() functionat the bottom, to make
it a valid C++ program. The Arduino IDE uses the GNU tool chain and AVR Libc to compile
programs, and uses avr to upload programs to the board. As the Arduino platform uses Atmel
microcontrollers

14
Atmel’s development environment, AVR Studioor the newer Atmel Studio, may also be
used to develop software for the Arduino. The Arduino hardware reference designs are
distributed under a Creative Commons Attribution Share-Alike 2.5 license and are available on
the Arduino Web site. Layout and production files for some versions of the Arduino hardware
are also available. The source code for the IDE and the on-board library are available and
released under the GPLv2 license.

Arduino and Arduino-compatible boards uses of shields, which are printed circuit boards
that sit atop an Arduino, and plug into the normally supplied pin-headers. These are expansions
to the base Arduino. There are many functions of shields, from motor controls, to breadboarding
(prototyping).

ACCELEROMETER (MEMS)

MEMS (Micro Electro Mechanical Systems) or accelerometer is a device that


measures proper acceleration, the acceleration experienced relative to freefall.
Single- and multi-axis models are available to detect magnitude and direction of the
acceleration as a vector quantity, and can be used to sense orientation, vibration and
shock. Micro machined accelerometers are increasingly present in portable electronic devices
and video game controllers, to detect the orientation of the device or provide for game input.

A depiction of an accelerometer designed at Sandia National Laboratories.

15
Physical principles:

An accelerometer measures proper acceleration which is the acceleration it experiences


relative to freefall, and is the acceleration that is felt by people and objects. Put another way, at
any point in space time the equivalence principle guarantees the existence of a local inertial
frame, and an accelerometer measures the acceleration relative to that frame.

As a consequence an accelerometer at rest relative to the Earth's surface will indicate


approximately 1 g upwards, because any point on the earth's surface is accelerating upwards
relative to a local inertial frame. To obtain the acceleration due to motion with respect to the
earth, this "gravity offset" should be subtracted.

The reason for the appearance of a gravitational offset is Einstein's equivalence principle,
which states that the effects of gravity on an object are indistinguishable from acceleration of the
reference frame. When held fixed in a gravitational field by, for example, applying a ground
reaction force or an equivalent upward thrust, the reference frame for an accelerometer (its own
casing) accelerates upwards with respect to a free-falling reference frame. The effect of this
reference frame acceleration is indistinguishable from any other acceleration experienced by the
instrument.

An accelerometer will read zero during free fall. This includes use in a spaceship orbiting
earth, but not a (non-free) fall with air resistance where drag forces reduce the acceleration until
terminal velocity is reached, at which point the device would once again indicate 1 g acceleration
upwards.

Acceleration is quantified in the SI unit metres per second per second (m/s2), in the cgs
unit gal (Gal), or popularly in terms of g-force (g).

For the practical purpose of finding the acceleration of objects with respect to the Earth,
such as for use in an inertial navigation system, a knowledge of local gravity is required. This
can be obtained either by calibrating the device at rest, or from a known model of gravity at the
approximate current position.

Structure

16
Conceptually, an accelerometer behaves as a damped mass on a spring. When the
accelerometer experiences an acceleration, the mass is displaced to the point that the spring is
able to accelerate the mass at the same rate as the casing. The displacement is then measured to
give the acceleration.

Modern accelerometers are often small micro electro-mechanical systems (MEMS), and
are indeed the simplest MEMS devices possible, consisting of little more than a cantilever beam
with a proof mass (also known as seismic mass). Damping results from the residual gas sealed in
the device. As long as the Q-factor is not too low, damping does not result in a lower sensitivity.

Under the influence of external accelerations the proof mass deflects from its neutral
position. This deflection is measured in an analog or digital manner. Most commonly, the
capacitance between a set of fixed beams and a set of beams attached to the proof mass is
measured. This method is simple, reliable, and inexpensive. Integrating piezo-resistors in the
springs to detect spring deformation, and thus deflection, is a good alternative, although a few
more process steps are needed during the fabrication sequence. For very high sensitivities
quantum tunneling is also used; this requires a dedicated process making it very expensive.
Optical measurement has been demonstrated on laboratory scale.

Another, far less common, type of MEMS-based accelerometer contains a small heater at
the bottom of a very small dome, which heats the air inside the dome to cause it to rise. A
thermocouple on the dome determines where the heated air reaches the dome and the deflection
off the center is a measure of the acceleration applied to the sensor.

Most micromechanical accelerometers operate in-plane, that is, they are designed to be
sensitive only to a direction in the plane of the die. By integrating two devices perpendicularly
on a single die a two-axis accelerometer can be made. By adding an additional out-of-plane
device three axes can be measured. Such a combination always has a much lower misalignment
error than three discrete models combined after packaging.

Micromechanical accelerometers are available in a wide variety of measuring ranges,


reaching up to thousands of g's. The designer must make a compromise between sensitivity and
the maximum acceleration that can be measured.

17
Applications:

Accelerometers can be used to measure vehicle acceleration. They allow for performance
evaluation of both the engine/drive train and the braking systems. Useful numbers like 0-60mph,
60-0mph and 1/4 mile times can all be found using accelerometers.

Accelerometers can be used to measure vibration on cars, machines, buildings, process


control systems and safety installations. They can also be used to measure seismic activity,
inclination, machine vibration, dynamic distance and speed with or without the influence of
gravity. Applications for accelerometers that measure gravity, wherein an accelerometer is
specifically configured for use in gravimetry, are called gravimeters.

Types of accelerometer:

 Piezo-film or piezoelectric sensor.


 Shear Mode Accelerometer
 Surface Micromachined Capacitive (MEMS)
 Thermal (submicrometre CMOS process)
 Bulk Micromachined Capacitive
 Bulk Micromachined Piezo Resistive
 Capacitive Spring Mass Base
 Electromechanical Servo (Servo Force Balance)
 Null-balance
 Strain gauge
 Resonance
 Magnetic induction
 Optical
 Surface acoustic wave (SAW)
 Laser accelerometer
 DC Response
 High Temperature
 Low Frequency

18
 High Gravity
 Triaxial
 Modally Tuned Impact Hammers
 Seat Pad Accelerometers
 PIGA accelerometer (Pendulating Integrating Gyroscopic Accelerometer)
By interface type

 4-20 mA loop power


 Integrated Electronic Piezoelectric (IEPE) accelerometer
 Direct piezoelectric 'charge mode' output, for connection to an instrument with a charge
amplifier input

ADXL335 MEMS ACCELEROMETER

This Accelerometer module is based on the popular ADXL335 three-axis analog


accelerometer IC, which reads off the X, Y and Z acceleration as analog voltages. By measuring
the amount of acceleration due to gravity, an accelerometer can figure out the angle it is tilted at
with respect to the earth. By sensing the amount of dynamic acceleration, the accelerometer can
find out how fast and in what direction the device is moving. Using these two properties, you can
make all sorts of cool projects, from musical instruments (imagine playing and having the tilt
connected to the distortion level or the pitch-bend) to a velocity monitor on your car (or your
children’s car). The accelerometer is very easy interface to an Arduino Micro-controller using 3
analog input pins, and can be used with most other micro controllers, such as the PIC or AVR.

For most accelerometers, the basic connections required for operation are power and the
communication lines. Accelerometers with an analog interface show accelerations through
varying voltage levels. These values generally fluctuate between ground and the supply voltage
level. An ADC on a microcontroller can then be used to read this value. These are generally less
expensive than digital accelerometers. ADXL335 is 3 axis accelerometer with on board voltage
regulator IC and signal conditioned Analog voltage output. The module is made up of ADXL335
from Analog Devices. The product measures acceleration with a minimum full-scale range of ±3

19
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. Accelerometers are generally low-power devices. The
required current typically falls in the micro (µ) or milli-amp range The ADXL335 is a triple axis
accelerometer with extremely low noise and power consumption – only 320uA! The sensor has a
full sensing range of +/-3g.

Features
 3V-6V DC Supply Voltage
 Onboard LDO Voltage regulator
 Can be interface with 3V3 or 5V Microcontroller.
 All necessary Components are populated.
 Ultra Low Power: 40uA in measurement mode, 0.1uA in standby@ 2.5V
 Tap/Double Tap Detection
 Free-Fall Detection
 Analog output

Pin Details

20
ADXL335 is a 3 axis accelerometer with analog output from Analog Devices.

This is how sensing axis are orientated to ADXL335.

21
RF TRANSMITTER

The function of a radio frequency (RF) transmitter is to modulate, up convert, and


amplify signals for transmission into free space. An RF transmitter generally includes a
modulator that modulates an input signal and a radio frequency power amplifier that is coupled
to the modulator to amplify the modulated input signal. The radio frequency power amplifier is
coupled to an antenna that transmits the amplified modulated input signal.

The RF transmitter used in our project is TWS-434A. This RF transmitter transmits data
in the frequency range of 433.92 MHz with a range of approximately 400 foot (open area)
outdoors. Indoors, the range is approximately 200 foot, and will go through most walls. TWS-
434A has features which includes small in size, low power consumption i.e. 8mW and operate
from 1.5 to 12 Volts-DC, excellent for applications requiring short-range RF signal. Data to be
send is Amplitude modulation with the carrier RF signal.

Pin Description of Transmitter

PIN 1: GROUND (-5V)

PIN2: INPUT PIN FOR DATA FROM ENCODER

PIN3: SUPPLY (+5V)

PIN 4: PIN FOR EXTERNAL RF ANTENNA

22
RF RECEIVER

The RF receiver receives an RF signal, converts the RF signal to an IF signal, and then
converts the IF signal to a base band signal, which it then provides to the base band processor.
As is also known, RF transceivers typically include sensitive components susceptible to noise
and interference with one another and with external sources. The RF receiver is coupled to the
antenna and includes a low noise amplifier, one or more intermediate frequency stages, a
filtering stage, and a data recovery stage. The low noise amplifier receives an inbound RF signal
via the antenna and amplifies it.

The RF receiver used is RWS-434. This RF receiver receives RF signal which is in the
frequency of 434.92 MHz and has a sensitivity of 3uV. The RWS-434 receiver operates from
4.5 to 5.5 volts-DC, and has both linear and digital outputs and its tunable to match the frequency
of the transmitter unit.

RF Receiver

23
Pin Description of Receiver

PIN1: GROUND (-5V)


PIN2 : OUTPUT PIN FOR DIGITAL DATA RECIEVED
PIN 3: OUTPUT PIN FOR ANALOG DATA RECIEVED
PIN4: SUPPLY (+5V)
PIN5: SUPPLY (+5V)
PIN6: GROUND (-5V)
PIN7: GROUND (-5V)
PIN 8: PIN FOR EXTERNAL RF ANTENNA

HT12E AND HT 12D IC INTERFACING WITH RF MODULE

24
HT12E 212 Series Encoder

The HT12E encoder is a CMOS IC built especially for remote control system
applications. It is capable of encoding 8 bits of address (A0-A7) and 4 bits of data (AD8-AD11)
information. Each address/data input can be set to one of the two logic states, 0 or 1. Grounding
the pins is taken as a 0 while a high can be given by giving +5V or leaving the pins open (no
connection). Upon reception of transmit enable (TE-active low), the programmed address/data
are transmitted together with the header bits via an RF medium.

HT12D 212 Series Decoder

General Description:

The HT12D is a decoder IC made especially to pair with the HT12E encoder. It is a CMOS IC made
for remote control system applications. The decoder is capable of decoding 8 bits of address (A0-A7) and 4
bits of data (AD8-AD11) information. Like the encoder, this decoder’s address pins can be set to logic low
by grounding and set to logic high by either connecting the pins to +5V or leaving them open (no
connection). The decoder receives serial addresses and data from a programmed encoder transmitted by a
carrier using RF or an IR transmission medium.

25
L293D Motor Driver

The L293D is a quadruple half H-bridge bidirectional motor driver IC that can drive current of
up to 600mA with voltage range of 4.5 to 36 volts. It is suitable to drive small DC-Geared
motors, bipolar stepper motor etc.

Specifications

 Supply Voltage Range 4.5V to 36V

 600-mA Output current capability per driver

 Separate Input-logic supply

 It can drive small DC-geared motors, bipolar stepper motor.

 Pulsed Current 1.2-A Per Driver

 Thermal Shutdown

 Internal ESD Protection

 High-Noise-Immunity Inputs

( Circuit Diagram )

26
As it can be seen in circuit diagram that there are two enable pins viz. en1 & en2 for two
different DC motors enable operation. There are four different control signals to be given to pins
A, B, C, D . The DC motors M1 & M2 are to be connected between pins 3 & 6 and 11 & 14
pins respectively.

We can interface en1, en2, A, B, C, D pins with microcontroller which performs necessary
actions in order to move robot in proper desired direction.

There are two separate power supply 5V and 12V for the IC and DC motors respectively.

27
BATTERY

Batteries are an excellent emergency power source, but require some basic information to
use properly. They are electrochemical devices. They have plates, usually metallic, and either a
solution or a moist compound between the plates. A chemical reaction takes place in the battery
when it is discharged that produces a flow of electrons out one plate on the negative side and into
another plate on the positive side.

Here we are using dry lead/acid battery. It has plates of lead in sulphuric acid solution in
water. One of the sets of lead plates is coated with lead dioxide. As such a battery discharges it
creates two chemical reactions, one at the anode that ends up with an excess of electrons, and
one at the cathode that ends up short electrons. If a wire is connected between the two, the excess
electrons from the anode will travel through the wire as a current to the cathode where they are
needed to complete the electron deficient reaction there.

Dry lead acid battery of 12V/1.3A is used as source of power for the whole robot unit.
For digital circuitry 5 volts needed is derived from 12v battery using regulator IC7805.

28
Arduino IDE :
IDE stands for Integrated Development Environment. The IDE is a text editor-like program that
allows you to write ,compile and upload code in the microcontroller. The code file is called as
sketch. The coding language that Arduino uses is very much like C++ (“see plus plus”), which is
a common language in the world of computing. The toolbar buttons allow you to verify and
upload programs, create, open, and save sketches, and open the serial monitor.

File

 New
Creates a new instance of the editor, with the bare minimum structure of a sketch already in
place.
 Open
Allows to load a sketch file browsing through the computer drives and folders.
 Open Recent
Provides a short list of the most recent sketches, ready to be opened.
 Sketchbook
Shows the current sketches within the sketchbook folder structure; clicking on any name opens
the corresponding sketch in a new editor instance.
 Examples
Any example provided by the Arduino Software (IDE) or library shows up in this menu item. All
the examples are structured in a tree that allows easy access by topic or library.
 Close
Closes the instance of the Arduino Software from which it is clicked.
 Save
Saves the sketch with the current name. If the file hasn't been named before, a name will be
provided in a "Save as.." window.
 Save as...
Allows to save the current sketch with a different name.
 Page Setup
It shows the Page Setup window for printing.

29
 Print
Sends the current sketch to the printer according to the settings defined in Page Setup.
 Preferences
Opens the Preferences window where some settings of the IDE may be customized, as the
language of the IDE interface.
 Quit
Closes all IDE windows. The same sketches open when Quit was chosen will be automatically
reopened the next time you start the IDE.

Edit

 Undo/Redo
Goes back of one or more steps you did while editing; when you go back, you may go forward
with Redo.
 Cut
Removes the selected text from the editor and places it into the clipboard.
 Copy
Duplicates the selected text in the editor and places it into the clipboard.
 Copy for Forum
Copies the code of your sketch to the clipboard in a form suitable for posting to the forum,
complete with syntax coloring.
 Copy as HTML
Copies the code of your sketch to the clipboard as HTML, suitable for embedding in web pages.
 Paste
Puts the contents of the clipboard at the cursor position, in the editor.
 Select All
Selects and highlights the whole content of the editor.
 Comment/Uncomment
Puts or removes the // comment marker at the beginning of each selected line.
 Increase/Decrease Indent
Adds or subtracts a space at the beginning of each selected line, moving the text one space on the
right or eliminating a space at the beginning.

30
 Find
Opens the Find and Replace window where you can specify text to search inside the current
sketch according to several options.
 Find Next
Highlights the next occurrence - if any - of the string specified as the search item in the Find
window, relative to the cursor position.
 Find Previous
Highlights the previous occurrence - if any - of the string specified as the search item in the Find
window relative to the cursor position.

Sketch

 Verify/Compile
Checks your sketch for errors compiling it; it will report memory usage for code and variables in
the console area.
 Upload
Compiles and loads the binary file onto the configured board through the configured Port.
 Upload Using Programmer
This will overwrite the bootloader on the board; you will need to use Tools > Burn Bootloader to
restore it and be able to Upload to USB serial port again. However, it allows you to use the full
capacity of the Flash memory for your sketch. Please note that this command will NOT burn the
fuses. To do so a Tools -> Burn Bootloader command must be executed.
 Export Compiled Binary
Saves a .hex file that may be kept as archive or sent to the board using other tools.
 Show Sketch Folder
Opens the current sketch folder.
 Include Library
Adds a library to your sketch by inserting #include statements at the start of your code. For more
details, see libraries below. Additionally, from this menu item you can access the Library
Manager and import new libraries from .zip files.
 Add File...
Adds a source file to the sketch (it will be copied from its current location). The new file appears

31
in a new tab in the sketch window. Files can be removed from the sketch using the tab menu
accessible clicking on the small triangle icon below the serial monitor one on the right side o the
toolbar.

Tools

 Auto Format
This formats your code nicely: i.e. indents it so that opening and closing curly braces line up, and
that the statements inside curly braces are indented more.
 Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is placed in the same directory
as the sketch.
 Fix Encoding & Reload
Fixes possible discrepancies between the editor char map encoding and other operating systems
char maps.
 Serial Monitor
Opens the serial monitor window and initiates the exchange of data with any connected board on
the currently selected Port. This usually resets the board, if the board supports Reset over serial
port opening.
 Board
Select the board that you're using. See below for descriptions of the various boards.
 Port
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
 Programmer
For selecting a harware programmer when programming a board or chip and not using the
onboard USB-serial connection. Normally you won't need this, but if you're burning a
bootloader to a new microcontroller, you will use this.
 Burn Bootloader
The items in this menu allow you to burn a bootloader onto the microcontroller on an Arduino
board. This is not required for normal use of an Arduino or Genuino board but is useful if you
purchase a new ATmega microcontroller (which normally come without a bootloader). Ensure

32
that you've selected the correct board from the Boards menu before burning the bootloader on
the target board. This command also set the right fuses.

Help

Here you find easy access to a number of documents that come with the Arduino Software
(IDE). You have access to Getting Started, Reference, this guide to the IDE and other documents
locally, without an internet connection. The documents are a local copy of the online ones and
may link back to our online website.

 Find in Reference
This is the only interactive function of the Help menu: it directly selects the relevant page in the
local copy of the Reference for the function or command under the cursor.

Sketchbook
The Arduino Software (IDE) uses the concept of a sketchbook: a standard place to store your
programs (or sketches). The sketches in your sketchbook can be opened from the File >
Sketchbook menu or from the Open button on the toolbar. The first time you run the Arduino
software, it will automatically create a directory for your sketchbook. You can view or change
the location of the sketchbook location from with the Preferences dialog.

Important command options for arduino based programming :

Verify
Checks your code for errors compiling it.

Upload
Compiles your code and uploads it to the configured board. See uploading below for
details.

New

33
Creates a new sketch.

Open
Presents a menu of all the sketches in your sketchbook. Clicking one will open it within
the current window overwriting its content.

Save
Saves your sketch.

Serial Monitor
Opens the serial monitor.

Arduino Sketch
Basically Arduino sketch consists of two main functions namely

1. Void setup()

2. Void loop()

1. VOID SETUP(): Setup () is called when a sketch starts. It is used to initialize variables,
pin modes, start using libraries etc. The setup () will only run once, after each power up or
reset of the Arduino board.

Syntax:

Void setup ()

Statements;

34
2.Void loop():

After creating a setup () function which initializes and sets the initial values, the loop () function
does precisely what its name suggests, and loops consecutively, allowing your program to
change and respond. It is used to actively control the Arduino board.

Syntax:

Void loop ()

Statements;

35
Arduino IDE (Integrated Development Environment) Software Steps

1. Start the Arduino editor and from the File menu select Preferences to display the screen
shown below. Find and select the option to 'Show verbose output during;' and tick the
'compilation' check box. With this option selected, the Editor will show a trace of each
step of the compilation process.

2. Open your source code file and select your Board from Tools Menu

36
3. Select available Port from Tools Menu

4. Click Verify /Compile from Sketch Menu. If there are no errors in the code, it shows
Done Compiling at bottom side.

37
5. Now click Upload from Sketch Menu. After uploading the code , it shows Done
Uploading at bottom side. Now board is ready to use in hardware application.

6. You have successfuly compiled and uploaded program code to microcontroller.

38
Proteus ISIS Schematic Simulation Software :

Step 1: Open ISIS software and select New design in File menu

Proteus File Menu

Step 2: A dialogue box appears to save the current design. However, we are creating a new
design file so you can click Yes or No depending on the content of the present file. Then a Pop-
Up appears asking to select the template. It is similar to selecting the paper size while printing.
For now select default or according to the layout size of the circuit.

39
Proteus Default Template Select

Step 3:An untitled design sheet will be opened, save it according to your wish,it is better to
create a new folder for every layout as it generates other files supporting your design. However,it
is not mandatory.

Proteus Design Sheet

40
Step 4:To Select components, Click on the component mode button.

Component Mode

Step 5:Click On Pick from Libraries. It shows the categories of components available and a
search option to enter the part name.

41
Pick from Libraries

Step 6: Select the components from categories or type the part name in Keywords text box.

Keywords Textbox

You can now enter any hardware component required and select OK to place those components
on sheet.

42
Circuit Diagram : (Transmitter Side)

ADXL335 MEMS sensor gives analog voltage output Xout and Yout which is given to A5 & A4
of ADC channels of microcontroller. The microcontroller Atmega328 processes voltage input
and gives 4-bit data to HT12E Encoder IC which converts it to serial data and gives it to RF
transmitter which further sends same to remote end wirelessly. 4-bit data is placed over 6,7,8,9
Pins of Arduino.

43
Circuit Diagram : (Receiver Side)

ARD1

VCC

AREF
13
PB5/SCK
12
PB4/MISO
RESET 11
~PB3/MOSI/OC2A U1
10 16 8
~ PB2/SS/OC1B
9
~ PB1/OC1A
8 2 3
PB0/ICP1/CLKO IN1 VSS VS OUT1
7 6
ATMEGA328P-PU
1121

DIGITAL (~PWM)

IN2 OUT2
7 1
ANALOG IN

PD7/AIN1 EN1
6
A0 ~ PD6/AIN0
PC0/ADC0 5
A1 ~ PD5/T1
PC1/ADC1 4 9
A2 PD4/T0/XCK EN2
PC2/ADC2 3 10 11
A3 ~ PD3/INT1 IN3 OUT3
PC3/ADC3 2 15 14
A4 PD2/INT0 IN4 GND GND OUT4
PC4/ADC4/SDA 1
A5 TX PD1/TXD
PC5/ADC5/SCL 0
RX PD0/RXD
L293D

ARDUINO UNO R3
D0

4-BIT
D1
DATA

FROM HT12D
D2

D3

RF Receiver receives data wirelessly and gives serial data to HT12D which then converts
it to 4-bit data and it is given to microcontroller. Data is given to 2,3,4,5 Pins. The
microcontroller Atmega328 processes data and performs controlling action of robot movements.
The control signals are given on 6,7,8,9 for L293d motor driver.

44
CODING:

// Transmitter Side Code

//connect 3.3v to AREF

const int ap1 = A5;

const int ap2 = A4;

int out1=6;

int out2=7;

int out3=8;

int out4=9;

int sv1 = 0;

int ov1 = 0;

int sv2 = 0;

int ov2= 0;

int sv3 = 0;

int ov3= 0;

void setup()

// initialize serial communications at 9600 bps:

Serial.begin(9600);

pinMode(out1,OUTPUT);

pinMode(out2,OUTPUT);

pinMode(out3,OUTPUT);

pinMode(out4,OUTPUT);

45
digitalWrite(out1,HIGH);

digitalWrite(out2,HIGH);

digitalWrite(out3,HIGH);

digitalWrite(out4,HIGH);

void loop()

analogReference(EXTERNAL); //connect 3.3v to AREF

// read the analog in value:

sv1 = analogRead(ap1);

// map it to the range of the analog out:

ov1 = map(sv1, 0, 1023, 0, 255);

// change the analog out value:

delay(2);

//

sv2 = analogRead(ap2);

ov2 = map(sv2, 0, 1023, 0, 255);

//

delay(2);

// print the results to the serial monitor:

// Serial.print("Xsensor1 = " );

// Serial.print(sv1);

46
// Serial.print("\t output1 = ");

// Serial.println(ov1);

//delay(10);

// Serial.print("Ysensor2 = " );

// Serial.print(sv2);

// Serial.print("\t output2 = ");

// Serial.println(ov2);

// delay(10);

if(sv1>550 && sv1<600 && sv2>500 && sv2<550 )

forward();

if(sv1>400 && sv1<450 && sv2>500 && sv2<550 )

backward();

if(sv1>500 && sv1<550 && sv2>600 && sv2<650 )

left();

if(sv1>500 && sv1<550 && sv2>400 && sv2<450 )

right();

47
if(sv1>500 && sv1<550 && sv2>500 && sv2<550 )

stop();

void forward()

digitalWrite(out1,LOW);

digitalWrite(out2,HIGH);

digitalWrite(out3,HIGH);

digitalWrite(out4,HIGH);

void backward()

digitalWrite(out1,HIGH);

digitalWrite(out2,LOW);

digitalWrite(out3,HIGH);

digitalWrite(out4,HIGH);

void left()

digitalWrite(out1,HIGH);

digitalWrite(out2,HIGH);

digitalWrite(out3,LOW);

48
digitalWrite(out4,HIGH);

void right()

digitalWrite(out1,HIGH);

digitalWrite(out2,HIGH);

digitalWrite(out3,HIGH);

digitalWrite(out4,LOW);

void stop()

digitalWrite(out1,HIGH);

digitalWrite(out2,HIGH);

digitalWrite(out3,HIGH);

digitalWrite(out4,HIGH);

//Receiver Side Code

//RF Robot

int sw1 =2;

int sw2 =3;

int sw3 =4;

int sw4 =5;

49
int out1=6;

int out2=7;

int out3=8;

int out4=9;

void setup()

pinMode(out1,OUTPUT);

pinMode(out2,OUTPUT);

pinMode(out3,OUTPUT);

pinMode(out4,OUTPUT);

pinMode(sw1,INPUT);

pinMode(sw2,INPUT);

pinMode(sw3,INPUT);

pinMode(sw4,INPUT);

void loop()

digitalWrite(sw1,HIGH);

digitalWrite(sw2,HIGH);

digitalWrite(sw3,HIGH);

digitalWrite(sw4,HIGH);

if ((digitalRead(sw1)==LOW) && (digitalRead(sw2)==HIGH) &&


(digitalRead(sw3)==HIGH) && (digitalRead(sw4)==HIGH))

fwd();

50
}

else if ((digitalRead(sw1)==HIGH) && (digitalRead(sw2)==LOW) &&


(digitalRead(sw3)==HIGH) && (digitalRead(sw4)==HIGH))

bwk();

else if ((digitalRead(sw1)==HIGH) && (digitalRead(sw2)==HIGH) &&


(digitalRead(sw3)==LOW) && (digitalRead(sw4)==HIGH))

lft();

else if ((digitalRead(sw1)==HIGH) && (digitalRead(sw2)==HIGH) &&


(digitalRead(sw3)==HIGH) && (digitalRead(sw4)==LOW))

rgt();

else

stop();

void fwd()

digitalWrite(out1,HIGH);

51
digitalWrite(out2,LOW);

digitalWrite(out3,HIGH);

digitalWrite(out4,LOW);

void bwk()

{ digitalWrite(out1,LOW);

digitalWrite(out2,HIGH);

digitalWrite(out3,LOW);

digitalWrite(out4,HIGH);

void lft()

{ digitalWrite(out1,HIGH);

digitalWrite(out2,LOW);

digitalWrite(out3,LOW);

digitalWrite(out4,HIGH);

void rgt()

{ digitalWrite(out1,LOW);

digitalWrite(out2,HIGH);

digitalWrite(out3,HIGH);

digitalWrite(out4,LOW);

void stop()

digitalWrite(out1,LOW);

52
digitalWrite(out2,LOW);

digitalWrite(out3,LOW);

digitalWrite(out4,LOW);

CONCLUSION

The project “GESTURE CONTROLLED WIRELESS ROBOT” has been successfully


completed and tested with integration of the features of every hardware component for its
development. Presence of every block has been reasoned out and placed carefully thus
contributing to the best working of the unit.

The project is built using very simple and easily available components making it lightweight and
portable. This helps for security and surveillance purpose in important areas. We believe that our step is
towards complete automated guidance system for robot and all the controls of its movements.

Finally we conclude that this project application gives very good features and there is huge scope
for further research and development for using the same with the help of advanced technology such as
Zigbee & WiFi Communication etc.

53
REFERENCES

BOOKS:

[1] Kenneth .J. Ayala, The 8051 Microcontroller and its applications, prentice hall, new
Edition, 2006.

[2] Frank Vahid, Embedded system design, Tata Mc Graw hill, 3 Edition, 1995.

[3] Raj Kamal, Embedded Systems, JWE, 4 Edition, 2000.

[4] Jonathan Clark, Applications of Ultrasonic, Tata Mc Graw hill, new Edition, 2002.

WEBSITES:

[5] www.google.com

[6] www.howstuffworks.com

[7] www.epanorama.net

[8] www.wikipedia.org

54

You might also like