Professional Documents
Culture Documents
Bachelor of Engineering
In
SUBMITTED BY
-------------------- (--------------)
--------------------- (---------------)
--------------------- (---------------)
1
CERTIFICATE
WIRELESSCONTROL
________________ ____________
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
Abstract…………………………………
Hardware Description………………….
Coding…………………………………..
Software Description……………………………
Conclusion……………………………………………
References……………………………….
5
Hand Gesture Controlled Wireless Robot
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:
RF TX & RF RX Module
HT12E Encoder
HT12D Decoder
GEAR DC MOTORS
Software:
ARDUINO IDE
PROTEUS SIMULATOR
6
Transmitter:
ATMEGA328
ADXL 335 RF
MCU
MEMS HT12E Transmitter
Encoder
Sensor Module
Receiver :
+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 :
8
MICROCONTROLLER
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.
9
Arduino
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:
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
• 6 Analog Inputs
• Max Voltage: 5V
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.
• 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
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)
15
Physical principles:
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.
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.
Types of accelerometer:
18
High Gravity
Triaxial
Modally Tuned Impact Hammers
Seat Pad Accelerometers
PIGA accelerometer (Pendulating Integrating Gyroscopic Accelerometer)
By interface type
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.
21
RF TRANSMITTER
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.
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
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.
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
Thermal Shutdown
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.
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.
38
Proteus ISIS Schematic Simulation Software :
Step 1: Open ISIS software and select New design in 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.
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:
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()
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()
sv1 = analogRead(ap1);
delay(2);
//
sv2 = analogRead(ap2);
//
delay(2);
// Serial.print("Xsensor1 = " );
// Serial.print(sv1);
46
// Serial.print("\t output1 = ");
// Serial.println(ov1);
//delay(10);
// Serial.print("Ysensor2 = " );
// Serial.print(sv2);
// Serial.println(ov2);
// delay(10);
forward();
backward();
left();
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);
//RF Robot
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);
fwd();
50
}
bwk();
lft();
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 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.
[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