Вы находитесь на странице: 1из 103

ABSTRACT

Most of Artificial Intelligence will eventually lead to robotics. Most neural networking,
natural language processing, image recognition, speech recognition/synthesis research aims at
eventually incorporating their technology into the epitome of robotics - the creation of a fully
humanoid robot.
The field of robotics has been around nearly as long as Artificial Intelligence - but the
field has made little progress. This is only natural, since the field not only attempts to conquer
intelligence, but also the body that embodies it - a formidable task. Robotics, though, is not just
about humanoid robots; but also about their commercial applications in manufacturing, safety
and hundreds of other fields.
It is only relatively recently that robots have started to employ a degree of Artificial
Intelligence in their work - many robots required human operators, or precise guidance
throughout their missions. Slowly, robots are becoming more and more autonomous. Robotics is
an absolutely fascinating field that interests most people. Robot is a system that contains sensors,
control systems, manipulators, power supplies and software all working together to perform a
task. Robot should have Sensing, Movement, Energy and Intelligence characteristics.
This project deals with one of the application of vehicles. In this project one moving
object is developed such that it is moved as per commands given by the voice recognition
module and that command is received by microcontroller using wireless communication. This
project is equipped with DC motor, Voice Recognition module, ZigBee module, Micro controller
along with the Power supply unit. Vehicle finds it applications in the real time.

INDEX
CONTENTS

PAGE NO.

ACKNOWLEDGEMENT
ABSTRACT
INDEX
LIST OF FIGURES
LIST OF TABLES
ABBREVIATIONS

I
II
VIII
X
XI

CHAPTER 1

(01-12)

INTRODUCTION

1.1 INTRODUCTION
1.2 SPEECH RECOGNIZATION
1.3 WHY BUILD ROBOTS?
1.4 ANDROID
1.4.1 ANDROID MEET ROBOT
1.5 BLOCK DIAGRAM
1.5.1 MICROCONTROLLER
1.5.2 RPS
1.5.3 BLUETOOTH MODULE
1.5.4 LCD
1.5.5 DRIVER
1.6 CONCLSION

01
01
03
04
05
06
07
09
09
10
11
12

CHAPTER 2 MICRO CONTROLLERS


2.1 INTRODUCTION
2.2 MICROPROCESSORS vs. MICROCONTROLLERS
2.3 DIFFERENCE BETWEEN 8051 AND 8052
2.4 THE 8051 MICROCONTROLLER
2.5 FEATURES
2.6 PIN DESCRIPTION OF MICROCONTROLLER 89S52
2.7 SPECIAL FUNCTION REGISTER (SFR) MEMORY
2.8 THE PROGRAM COUNTER AND STACK POINTER
2.8.1 ADDRESSING MODES
2.8.1.1 IMMEDIATE ADDRESSING
2.8.1.2 DIRECT ADDRESSING
2.8.1.3 INDIRECT ADDRESSING
2.8.2 TIMER 2 REGISTERS
2.8.3 INTERRUPT REGISTERS
2.8.4 TIMER 2
2.8.4.1 CAPTURE MODE

2.8.4.2 AUTO-RELOAD (UP OR DOWN COUNTER)


2.8.4.3 BAUD RATE GENERATOR
2.9 TIMER 0
2

(13-29)
13
13
14
14
17
18
23
23
23
24
24
25
25
25
25
26
26
26
27

2.9.1 MODE 0 (13-BIT TIMER)


2.9.2 MODE 1 (16-BIT TIMER)
2.9.3 MODE 2 (8-BIT TIMER WITH AUTO-RELOAD)
2.9.4 MODE 3 (TWO 8-BIT TIMERS)
2.10 TIMER 1
2.10.1 MODE 3 (HALT)
2.11 BAUD RATES
2.12 TCON REGISTER
2.13 TMOD REGISTER
2.14 CONCLUSION

CHAPTER 3

RPS (REGULATED POWER SUPPLY)

3.1 INTRODUCTION:
3.2 CIRCUIT
3.3 CIRCUIT EXPLANATION
3.3.1 SOLAR PANEL
3.3.1.1 BASIC OPERATION
3.3.2.1 BASIC PRINCIPLE
3.3.2 TRANSFORMER
3.3.2.1 BASIC PRINCIPLE
3.3.2.2 DETAILED OPERATION
3.3.3 BRIDGE RECTIFIER
3.3.3.1 BASIC OPERATION
3.3.3.2 OUTPUT SMOOTHING (USING CAPACITOR)
3.3.4 VOLTAGE REGULATOR
3.4 CONCLUSION

CHAPTER 4

BLUETOOTHMODULE

4.1 INTRODUCTION
4.2 BLUETOOTH PROFILES
4.2.1 BLUETOOTH VS WI-FI IN NETWORKING
4.3 BLUETOOTH DEVICES
4.4 OPERATING SYSTEM SUPPORT
4.5 MOBILE PHONE REQUIREMENTS
4.6 COMMUNICATION AND CONNECTION
4.6.1 SETTING UP CONNECTIONS:
4.6.2 PAIRING
4.6.3 AIR INTERFACE
4.7 HC SERIAL BLUETOOTH PRODUCTS
4.8 SELECTION OF THE MODULE
4.8.1 FEATURES:
4.8.2 STEP TO CONNECT
3

27
27
27
27
27
28
28
28
28
29

(30-38)
30
31
31
31
32
33
33
34
34
35
35
36
37
38

(39-49)
39
40
41
41
41
42
42
43
43
44
44
45
48
48

4.8.3 USAGE
4.9 CONCLUSION

48
49

CHAPTER 5

LCD (LIQUID CRISTAL DISPLAY)

5.1 INTRODUCTION
5.2 SHAPES AND SIZES
5.3 PIN DESCRIPTION
5.3.1 CONTROL LINES
5.3.2 LOGIC STATUS ON CONTROL LINES
5.3.3 WRITING DATA TO THE LCD
5.3.4 READ DATA FROM DATA LINES (IF IT IS READING) ON LCD
5.4 ENTERING TEXT
5.5 FEATURES
5.6 INITIALIZATION BY INSTRUCTIONS
5.7 CONCLUSION

CHAPTER 6

DRIVER

(50-58)
50
50
52
53
54
54
54
54
55
57
58

(59-69)

6.1 INTRODUCTION
6.2 MOTOR DRIVER AND H-BRIDGE BASICS
6.3 L293D CONNECTIONS
6.4 TRUTH TABLE
6.5 VOLTAGE SPECIFICATION
6.6 DC MOTOR
6.7 TYPES OF DCMOTORS
6.7.1 BRUSHED DC MOTORS
6.7.2 BRUSHLESS DC MOTORS
6.7.3 CORELESS DC MOTORS:
6.8 WORKING OR OPERATING PRINCIPLE OF DC MOTOR
6.9 CONCLUSION

59
60
61
62
63
63
64
64
64
64
65
69

CHAPTER 7

SCHEMATIC REPRESENTATION

7.1 INTRODUCTION
7.2 SCHEMATIC DIAGRAM
7.2.1 CRYSTAL OSCILLATOR
7.2.2 CAPACITORS
7.2.3 RESISTOR
7.2.4 SWITCHES
7.2.5 MOTORS
7.2.6 LCD
7.2.7 MICROCONTROLLER
7.2.8 DRIVER IC
7.2.9 SOLAR PANEL
7.2.10 SOLAR CHARGED BATTERIES
7.2.11 REGULATOR
7.2.12 CONNECTING WIRES
7.3 CONCLUSION

CHAPTER 8

HARDWARE AND SOFTWARE

8.1 INTRODUCTION
8.2 HARDWARE
8.3 SOFTWARE
8.3.1 FEATURES
8.3.2 EMBBEDED C
8.3.3 PROGRAM
8.4 CONCLUSION

CHAPTER 9

(70-75)
70
70
72
72
73
73
73
73
74
74
74
74
75
75
75

(76-94)
76
76
77
77
77
77
93

HARDWARE ANALYSIS

9.1 INTRODUCTUION
9.2 ASSEMBLING THE BOARD
9.2.1 ASSEMBLING PROCESS
9.2.2 COMPLETION OF ASSEMBLING PROCESS
9.3 ANDROID APPLICATIONS
9.3.1 BLUETOOTH SPP TEST
9.3.2 BLUETOOTH AMR (ANDROID MEETS ROBOT)
9.4 ROBOTS WORKING MECHANISM
9.5 TESTING
9.6 CONCLUSION

CHAPTER 10 EVALUTION

(95-98)
95
95
96
96
96
97
97
97
98
98

(99-103)

10.1 APPLICATIONS
10.1.1 HOME AUTOMATION
10.1.2 WHEELCHAIRS
10.1.3 SURVEILLANCE DEVICE
6

99
99
99
100

10.1.4 MILITARY APPLICATIONS


10.1.5 INDUSTRIAL PURPOSE
10.1.6 AGRICULTURE PURPOSE
10.2 ADVANTAGES
10.3 DISADVANTAGES
10.4 FUTURE SCOPE

CONCLUSION
BIBLOGRAPHY

100
101
101
102
102
103

104
105

NAME OF THE FIGURE

PAGE NO.

Fig1.1: Our Project


Fig 1.2: App images
Fig 1.3: Block diagram of voice control robo
Fig 1.4: Micro controller
Fig 1.5: HC-05 bluetooth module
Fig1 .6: 16X2 LCD
Fig 1.7: L293D Driver circuit
Fig 2.1: Pin Diagram of AT89s52
Fig 2.2: Architecture of AT89s52
Fig 2.3: Internal Architecture of AT89s52
Fig 2.4: Reset circuit
Fig 2.5: Crystal oscillator
Fig 3.1: Circuit Diagram for RPS
Fig 3.2: (a) Solar Panel& (b) Solar Panel Back side
Fig 3.3: Electron and Current Flow in Solar Cells
Fig 3.4: Transformer
Fig 3.5: An ideal step-down transformer showing magnetic flux in the core
Fig 3.6: (a) Bridge Rectifier & (b) Circuit
Fig 3.7: Bridge Rectifier Case 1
Fig 3.8: Bridge Rectifier Case 2
Fig 3.9: Output smoothing (using capacitor)
Fig 3.10: Voltage Regulator & PIN Descriptions
Fig 3.11: Internal Circuit for Regulator ICs
Fig 4.1: HC- 05
Fig 4.2: Internal architecture of HC-05
Fig 5.1: LCD Different Models
Fig 5.2: Electrical block diagram
Fig 5.3: Power supply for LCD driving
Fig 5.4: Pin Diagram of 1x16 lines LCD

Fig 5.5: FLOW CHART of Installation


Fig 6.1: L293D IC
Fig 6.2: Schematic Interfacing of the L293D
Fig 6.3: H-Bridge Motor Connection
Fig 6.4: DC Motor
Fig 6.5: Operation of DC Motor
Fig 6.6: Magnitude of the force for DC Motor
Fig 6.7: Motor rotating case 1
Fig 6.8: Motor rotating case 2
Fig 6.9: Motor rotating case 3
Fig 6.10: Motor rotating case 4
Fig 7.1: Circuit Diagram
Fig 7.2: Crystal Oscillator
Fig 9.1: Hardware board
Fig 9.2: Circuit Board

02
06
07
08
09
10
11
15
16
17
20
22
31
32
33
33
34
35
36
36
37
37
38
46
46
51
51
52
52
57
59
60
61
63
65
65
67
68
68
69
71
72
95
96

Fig 9.3: Architecture


Fig 10.1: Home Automation
Fig 10.2: Wheelchair Applications
Fig 10.3: Surveillance Device
Fig 10.4: Military Applications

97
99
100
100
101

NAME OF THE TABLE

PAGE NO.

Table 2.1: Alternate Functions of port 1 pins


Table 2.2: Port pin Functions
Table 2.3: TCON Register
Table 2.5: TMOD Register
Table 4.1: Bluetooth Max Permitted Power Range
Table 4.2: Bluetooth Versions
Table 4.3: PIN description of HC-05
Table 5.1: Address locations for a 1x16 line LCD
Table 5.2: Pin Description of LCD
Table 5.3: Characters display in LCD
Table 6.1: Truth Table
Table 9.1: TESTING RESULTS

10

19
20
28
29
40
40
47
50
53
56
62
98

ABBREVIATIONS
CPU
SRC
APP
RAM
ROM
DSP
CMOS
RPS
AC
DC
USB
LED
LCD
ALU
IC
ISP
UART
GND
TTL
RST
ALE
PC
SFR
PAN
GFSK
SIG
ISM
EDR
AMR

-------

------------------------

Central Processing Unit


Speech-recognition Circuit
Application
Random Access Memory
Read Only Memory
Digital Signal Processor
Complementary Metal Oxide Semiconductor
Regulated Power Supply
Altarnete Current
Direct Current
Universal Serial Bus
Light Emmiting Diode
Liquid Crystal Display
Arthematic Logic Unit
Integrated Circuit
In-System Programmable
Universal Asyncronous Receiver and Transmitor
Ground
Transistor Transistor Logic
Reset
Address Latch Enable
Programe Counter
Special Function Registers
Personal Area Networks
Gaussian frequency shift keying
Special Interest Group
Industrial, scientific and medical Band
- Enhanced Data Rate
Android meets robot

CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
It has always been a dream of human being to create machines that behave like humans.
Recognizing the speech and responding accordingly is an important part of this dream. With the
improvements of the technology and researches on artificial intelligent, this dream comes true
relatively.

11

In this project, it is aimed to make a contribution to this dream. Controlling the machines
and environment with speech makes human life easier and more comfortable. This project is a
simple implementation of this approach. A robot is controlled by voice commands. Voice
command is taken through a microphone, processed in computer and sent to the robot and finally
the robot acts accordingly.
Speech is the most used way of communication for people. We born with the skills of
speaking learn it easily during our early childhood and mostly communicate with each other with
speech throughout our lives. By the developments of communication technologies in the last era,
speech starts to be an important interface for many systems. Instead of using complex different
interfaces, speech is easier to communicate with computers.
In this project, it is aimed to control a robot with speech commands. The robot is able to
recognize spoken commands to move correctly. To give a direction to robot, first the voice
command is send to the ANDROID phone. The android recognizes the command by speech
recognition system. And then android converts the voice command to direction command that
predefined and recognizable by robot. When the robot gets the direction command, it moves
according to spoken command.

1.2 SPEECH RECOGNIZATION


When we say voice control, the first term to be considered is Speech Recognition i.e.
making the system to understand human voice. Speech recognition is a technology where the
system understands the words (not its meaning) given through speech.

12

Fig1.1: Our Project


Speech is an ideal method for robotic control and communication. The speech recognition
circuit we will outline, functions independently from the robots main intelligence [central
processing unit (CPU)]. This is a good thing because it doesnt take any of the robots main CPU
processing power for word recognition. The CPU must merely poll the speech circuits
recognition lines occasionally to check if a command has been issued to the robot. We can even
improve upon this by connecting the recognition line to one of the robots CPU interrupt lines.
By doing this, a recognized word would cause an interrupt, letting the CPU know a recognized
word had been spoken. The advantage of using an interrupt is that polling the circuits
recognition line occasionally would no longer be necessary, further reducing any CPU overhead.
Another advantage to this stand-alone speech-recognition circuit (SRC) is its
programmability. You can program and train the SRC to recognize the unique words you want
recognized. The SRC can be easily interfaced to the robots CPU. To control and command an
appliance (computer, VCR, TV security system, etc.) by speaking to it, will make it easier, while
increasing the efficiency and effectiveness of working with that device. At its most basic level
13

speech recognition allows the user to perform parallel tasks, (i.e. hands and eyes are busy
elsewhere) while continuing to work with the computer or appliance.
Robotics is an evolving technology. There are many approaches to building robots, and no
one can be sure which method or technology will be used 100 years from now. Like biological
systems, robotics is evolving following the Darwinian model of survival of the fittest. Suppose
you want to control a menu driven system. What is the most striking property that you can think
of? Well the first thought that came to our mind is that the range of inputs in a menu driven
system is limited. In fact, by using a menu all we are doing is limiting the input domain space.
Now, this is one characteristic which can be very useful in implementing the menu in standalone
systems. For example think of the pine menu or a washing machine menu. How many distinct
commands do they require?

1.3 WHY BUILD ROBOTS?


Robots are indispensable in many manufacturing industries. The reason is that the cost per
hour to operate a robot is a fraction of the cost of the human labor needed to perform the same
function. More than this, once programmed, robots repeatedly perform functions with a high
accuracy that surpasses that of the most experienced human operator. Human operators are,
however, far more versatile.
Humans can switch job tasks easily. Robots are built and programmed to be job specific.
You wouldnt be able to program a welding robot to start counting parts in a bin. Todays most
advanced industrial robots will soon become dinosaurs. Robots are in the infancy stage of their
evolution.
As robots evolve, they will become more versatile, emulating the human capacity and
ability to switch job tasks easily. While the personal computer has made an indelible mark on
society, the personal robot hasnt made an appearance. Obviously theres more to a personal
robot than a personal computer. Robots require a combination of elements to be effective:
sophistication of intelligence, movement, mobility, navigation, and purpose.Without risking
human life or limb, robots can replace humans in some hazardous duty service. Robots can work
in all types of polluted environments, chemical as well as nuclear. They can work in
environments so hazardous that an unprotected human would quickly die. As strange as it might
seem, there really is no standard definition for a robot. However, there are some essential
14

characteristics that a robot must have and this might help you to decide what is and what not a
robot is. It will also help you to decide what features you will need to build into a machine before
it can count as a robot. A robot has these essential characteristics:

SENSING - First of all your robot would have to be able to sense its surroundings. It would
do this in ways that are not unsimilar to the way that you sense your surroundings. Giving
your robot sensors: light sensors (eyes), touch and pressure sensors (hands), chemical
sensors (nose), hearing and sonar sensors (ears), and taste sensors (tongue) will give your
robot awareness of its environment.

MOVEMENT - A robot needs to be able to move around its environment. Whether rolling
on wheels, walking on legs or propelling by thrusters a robot needs to be able to move. To
count as a robot either the whole robot moves, like the Sojourner or just parts of the robot
moves, like the Canada Arm.

ENERGY - A robot needs to be able to power itself. A robot might be solar powered,
electrically powered, battery powered. The way your robot gets its energy will depend on
what your robot needs to do.

INTELLIGENCE - A robot needs some kind of "smarts." This is where programming enters
the pictures. A programmer is the person who gives the robot its 'smarts.' The robot will have
to have some way to receive the program so that it knows what it is to do.
Well it is a system that contains sensors, control systems, manipulators, power supplies and

software all working together to perform a task. Designing, building, programming and testing
robots is a combination of physics, mechanical engineering, electrical engineering, structural
engineering, mathematics and computing. In some cases biology, medicine, chemistry might also
be involved.
A study of robotics means that students are actively engaged with all of these disciplines in
a deeply problem-posing problem-solving environment.

15

1.4 ANDROID
Android is an operating system based on the Linux kernel, and designed primarily
for touch screen mobile devices such as smart phones and tablet computers. Initially developed
by Android, Inc., which Google backed financially and later bought in 2005, Android was
unveiled in 2007 along with the founding of the Open Handset Alliance a consortium
of hardware, software, and telecommunication companies devoted to advancing open
standards for mobile devices.
The first publicly available smart phone running Android, the HTC Dream, was released on
October 22, 2008. The user interface of Android is based on direct manipulation, using touch
inputs that loosely correspond to real-world actions, like swiping, tapping, pinching and reverse
pinching to manipulate on-screen objects.
Internal hardware such as accelerometers, gyroscopes and proximity sensors are used by
some applications to respond to additional user actions, for example adjusting the screen from
portrait to landscape depending on how the device is oriented. Android allows users to customize
their home screens with shortcuts to applications and widgets, which allow users to display live
content, such as emails and weather information, directly on the home screen. Applications can
further send notifications to the user to inform them of relevant information, such as new emails
and text messages.

1.4.1 ANDROID MEET ROBOT


It is the APP which is used in our project to control or commanding the robot.
Android Meets Robots: Voice Recognition
Uses android mobiles internal voice recognition to pass voice commands to your robot Pairs with
Bluetooth Serial Modules and sends in the recognized voice as a string.

16

For example if you say Hello the android phone will return a sting *Hello# to your Bluetooth
module *and # indicate the start and stop bits Can Be used with any micro controller which can
handle strings.
Examples Platforms: Arduino, ARM, PICAXE, MSP430, 8051 based and many other processors
and controllers.

Fig 1.2: App images

1.5 BLOCK DIAGRAM


Block diagram is a diagram of a system in which the principal parts or functions are
represented by blocks connected by lines that show the relationships of the blocks. They are
heavily used in the engineering world in hardware design, electronic design, software design,
and process flow diagrams.

17

Block diagrams rely on the principle of the black box where the contents are hidden from
view either to avoid being distracted by the details or because the details are not known. We
know what goes in, we know what goes out, but we can't see how the box does its work.
???????????????????????????????????????????????????????????????????????????
Fig 1.3: Block diagram of voice control robo
The above diagram shows the important blocks involves in this project. There are mainly
five blocks in this project.
There are:
1.
2.
3.
4.
5.

Microcontroller
RPS
Bluetooth Module
LCD
Driver

1.5.1 MICROCONTROLLER
A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer on a
single integrated circuit containing a processor core, memory, and programmable input/output
peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on
chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded
applications, in contrast to the microprocessors used in personal computers or other general
purpose applications.
Microcontrollers are used in automatically controlled products and devices, such as
automobile engine control systems, implantable medical devices, remote controls, office
machines, appliances, power tools, toys and other embedded systems. By reducing the size and
cost compared to a design that uses a separate microprocessor, memory, and input/output
devices, microcontrollers make it economical to digitally control even more devices and
processes. Mixed signal microcontrollers are common, integrating analog components needed to
control non-digital electronic systems.
Some microcontrollers may use 4-bit words and operate at clock rate frequencies as low as
4 kHz, for low power consumption (single-digit milli watts or microwatts). They will generally
have the ability to retain functionality while waiting for an event such as a button press or other
18

interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just
nanowatts, making many of them well suited for long lasting battery applications. Other
microcontrollers may serve performance-critical roles, where they may need to act more like
a digital signal processor (DSP), with higher clock speeds and power consumption.

Fig 1.4: Micro controller


In this project we used pic16f877A C. The pic16f877A is a low-power, high-performance
CMOS 8-bitmicrocontroller with 8K bytes of in-system programmable Flash memory. The
device is manufactured using Atmels high-density nonvolatile memory technology and is
compatible with the industry-standard 80C51 instruction set and pin out. In the chapter 2 we
discussed in detailed about microcontroller.

1.5.2 RPS
A regulated power supply is an embedded circuit; it converts unregulated AC into a
constant DC. With the help of a rectifier it converts AC supply into DC. Its function is to supply
a stable voltage (or less often current), to a circuit or device that must be operated within certain
power supply limits. The output from the regulated power supply may be alternating or
unidirectional, but is nearly always DC (Direct Current).
The type of stabilization used may be restricted to ensuring that the output remains within
certain limits under various load conditions, or it may also include compensation for variations in
its own supply source. The latter is much more common today. In the chapter 3 we discussed in
detailed about RPS.
19

1.5.3 BLUETOOTH MODULE


A Bluetooth module is usually a hardware component that provides a wireless product to
work with the computer; or in some cases, the Bluetooth may be an accessory or peripheral, or a
wireless headphone or other product (such as cell phones can use.). If the computer (is this
computer related?) has hardware support to use Bluetooth products and connections, then
whatever it is you are trying to download and use, may work.
There are component Bluetooth wireless modules with a USB plug on them to add this BT
to computers that did not have it built-in. Some of these modules may require drivers, but usually
Mac OS X has drivers built into the system to support several products. In the chapter 4 we
discussed in detailed about Bluetooth module. The below figure shows the model of Bluetooth
module,

Fig 1.5: HC-05 Bluetooth module


These small size Bluetooth TTL transceiver modules are designed for serial communication
(SPP - serial port profile). It allows your target device to both send or receive TTL data via
Bluetooth technology without connecting a serial cable to your computer. The modules with
the HC-03 and HC-05 firmware are the Master and Slave integrated Bluetooth serial modules
with firmware which allows you to modify master and slave mode at any time. HC-03 is
industrial grade products, HC-05 are commercial grade products.
The modules with the HC-04 and HC-06 firmware are the modules which are factory set to
be Master or Slave modules. Master and slave mode cannot be switched from the factory setting.
20

HC-04 is an industrial grade product; HC-06 is a commercial grade product. The modules with
the HC-09 firmware are replacements for the HC-06 and HC-07 modules.

1.5.4 LCD
These LCD screens are limited to monochrome text and are often used in copiers, fax
machines, laser

printers,

industrial

test

equipment,

networking

equipment

such

as routers and storage devices. The screens come in a small number of standard configurations.
Common sizes are 8x1 (one row of eight characters), 162, 202 and 204. Larger custom sizes
are made with 32, 40 and 80 characters and with 1, 2, 4 or 8 lines. The most commonly
manufactured larger configuration is 404characters, which requires two individually
addressable HD44780 controllers with expansion chips as a single HD44780 chip can only
address up to 80 characters. A common smaller size is 162, and this size is readily available as
surplus stock for hobbyist and prototyping work. Character LCDs can come with or
without backlights, which may be LED, fluorescent, or electroluminescent.

Fig 1.6: 16X2 LCD

1.5.5 DRIVER

21

In electronics, a driver is an electrical circuit or other electronic component used to control


another circuit or other component, such as a high-power transistor.
They are usually used to regulate current flowing through a circuit or is used to control the
other factors such as other components, some devices in the circuit. The term is often used, for
example, for a specialized integrated circuit that controls high-power switches in switchedmode power converters. An amplifier can also be considered a driver for loudspeakers, or
a constant voltage circuit that keeps an attached component operating within a broad range of
input voltages. Typically the driver stage(s) of a circuit requires different characteristics to other
circuit stages. For example in a transistor power amplifier, typically the driver circuit requires
current gain, often the ability to discharge the following transistor bases rapidly, and low output
impedance to avoid or minimize distortion.

Fig 1.7: L293D Driver circuit


The L293D is a popular motor driver IC that is usable from 6 to12V, at up to 1A total
output current. By itself, the IC is somewhat difficult to wire and use, but the Compact L293D
Motor Driver makes it much more convenient to use.Board Special Features

Four motor direction indicator LEDS

Schottky EMF-protection diodes

Socket pin connectors for easy logic interfacing

Enable pins are user accessible.

22

1.6 CONCLSION
In this chapter we have introduction about robot. It has always been a dream of human
being to create machines like humans. In this project robot is controlled by giving a voice or
speech commands. Speech recognition is a technology where the system understands the words
(not its meaning) given through speech. In our project android mobiles internal voice recognition
to pass voice commands to your robot Pairs with Bluetooth Serial Modules and sends in the
recognized voice as a string. In this chapter we have a small introduction about Microcontroller,
RPS, Bluetooth Module, LCD, Driver.

23

CHAPTER 2
MICRO CONTROLLERS
2.1 INTRODUCTION
The true computer on a chip is nothing but a microcontroller. The design incorporates all of
the features found in a microprocessor CPU, ALU, PC, SP and registers. It also had added the
other features needed to make a complete computer. ROM, RAM, parallel I/O, serial I/O,
Counters and a clock circuits. Microprocessors are intended to be general-purpose digital
computers whereas microcontrollers are intended to be special-purpose digital Controller.
Microprocessor contains a CPU, memory-addressing circuits and Interrupt handling circuits.
Microcontrollers have these features as well as timers, parallel and serial I/O, and internal RAM
and ROM. Microcontroller models vary in data size from 4 to 32 bits. Four-bit units are produced
in huge volumes for very simple applications; and8-bit units are the most versatile. 16 and 32-bit
units are used in high-speed control and signal processing applications. Many models feature
programmable pins that allow external memory to be added with the loss of I/O capability.

2.2 MICROPROCESSORS vs. MICROCONTROLLERS:

Microprocessors are single-chip CPUs used in microcomputers.


Microcontrollers and microprocessors are different in three main aspects: hardware

architecture, applications, and instruction set features.


Hardware architecture: A microprocessor is a single chip CPU while a microcontroller is a
single IC contains a CPU and much of remaining circuitry of a complete computer (e.g.,

RAM, ROM, serial interface, parallel interface, timer, and interrupt handling circuit).
Applications: Microprocessors are commonly used as a CPU in computers while
microcontrollers are found in small, minimum component designs performing control

oriented activities.
Microprocessor instruction sets are processing Intensive.
Their instructions operate on nibbles, bytes, words, or even double words.
Addressing modes provide access to large arrays of data using pointers and offsets.
They have instructions to set and clear individual bits and perform bit operations.

24

They have instructions for input/output operations, event timing, enabling and setting

priority levels for interrupts caused by external stimuli.


Processing power of a microcontroller is much less than a microprocessor.

2.3 DIFFERENCE BETWEEN 8051 AND 8052


The 8052 microcontroller is the 8051's "big brother." It is a slightly more powerful
microcontroller, sporting a number of additional features which the developer may make use of:

256 bytes of Internal RAM (compared to 128 in the standard 8051).


A third 16-bit timer, capable of a number of new operation modes and 16-bit reloads.
Additional SFRs to support the functionality offered by the third timer.

2.4 THE PIC16F877A MICROCONTROLLER


The PIC16F877A is a low-power, high-performance CMOS 8-bit microcontroller with
8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels
high-density nonvolatile memory technology and is compatible with the industry-standard 80C51
instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed
in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit
CPU with in-system programmable Flash on a monolithic chip, the Atmel PIC16F877A is a
powerful microcontroller which provides a highly-flexible and cost-effective solution to many
embedded control applications.
The PIC16F877A provides the following standard features: 8K bytes of Flash, 256 bytes of
RAM, 32 I/O lines, Watchdog timer, two data pointers, three16-bit timer/counters, a six-vector
two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry.
In addition, the PIC16F877A is designed with static logic for operation down to zero frequency
and supports two software selectable power saving modes. The Idle Mode stops the CPU while
allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The
Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip
functions until the next interrupt or hardware reset. The below Fig 2.1 shows pin diagram of
PIC16F877A.

25

Fig 2.1: Pin Diagram of PIC16F877A.


The on-chip Flash allows the program memory to be reprogrammed in system or by a
conventional nonvolatile memory programmer. By combining a versatile8-bit CPU with Flash on
a monolithic chip, the Atmel AT89s52 is a powerful microcomputer which provides a highlyflexible and cost effective solution to many embedded control applications.
The 89S52 has 4 different ports, each one having 8 Input/output lines providing a total of
32 I/O lines. Those ports can be used to output DATA and orders do other devices, or to read the
state of a sensor, or a switch. Most of the ports of the 89S52 have 'dual function' meaning that
they can be used for two different functions.
The first one is to perform input/output operations and the second one is used to implement
special features of the microcontroller like counting external pulses, interrupting the execution of
the program according to external events, performing serial data transfer or connecting the chip
to a computer to update the software. Each port has 8 pins, and will be treated from the software
point of view as an 8-bit variable called 'register', each bit being connected to a different
Input/output pin.

26

Fig 2.2: Architecture of PIC16F877A.


There are two different memory types: RAM and EEPROM. Shortly, RAM is used to
store variable during program execution, while the EEPROM memory is used to store the
program itself, that's why it is often referred to as the 'program memory'. It is clear that the CPU
(Central Processing Unit) is the heart of the micro controllers. It is the CPU that will Read the
program from the FLASH memory and execute it by interacting with the different peripherals.
Diagram below shows the pin configuration of the 89S52, where the function of each pin is
written next to it, and, if it exists, the dual function is written between brackets. Note that the
pins that have dual functions can still be used normally as an input/output pin. Unless the
program uses their dual functions, all the 32 I/O pins of the microcontroller are configured as
input/output pins. The below figure shows the internal architecture of AT89s52.
27

Fig 2.3: Internal Architecture of PIC16F877A.

2.5 FEATURES:

Compatible with MCS-51Products


8K Bytes of In-System Programmable (ISP) Flash Memory
Endurance: 1000 Write/Erase Cycles
4.0V to 5.5V Operating Range
Fully Static Operation: 0 Hz to 33 MHz
Three-level Program Memory Lock
256K Internal RAM
32 Programmable I/O Lines
3 16-bit Timer/Counters
Eight Interrupt Sources
Full Duplex UART Serial Channel
Low-power Idle and Power-down Modes
28

Interrupt Recovery from Power-down Mode


Watchdog Timer
Dual Data Pointer
Power-off Flag

2.6 PIN DESCRIPTION OF MICROCONTROLLER 89S52


VCC Supply voltage.
GND Ground.
Port 0

Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1sare written to port 0 pins, the pins can be used as high impedance

inputs.
Port 0 can also be configured to be the multiplexed low order address/data bus during

accesses to external program and data memory. In this mode, P0 has internal pull-ups.
Port 0 also receives the code bytes during Flash programming and outputs the code bytes
during program verification. External pull-ups are required during program verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 Output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the

internal pull-ups and can be used as inputs.


In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input
(P1.0/T2) and the timer/counter 2 trigger input P1.1/T2EX), respectively, as shown in the
following table. Port 1 also receives the low-order address bytes during Flash programming
and verification.
Port PIN
P1.0
P1.1
P1.5
P1.6
P1.7

ALTERNATE FUNCTIONS OF PORT PINS


T2 (external count input toTimer/Counter 2), clock-out
T2EX(Timer/Counter 2 capture/reload trigger and direction control)
MOSI (used for In-System Programming)
MISO (used for In-System Programming)
SCK (used for In-System Programming)
Table 2.1: Alternate Functions of port 1 pins
29

Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the

internal pull-ups and can be used as inputs.


Port 2 emits the high-order address byte during fetches from external program memory and
during accesses to external data memory that uses 16-bit addresses (MOVX @DPTR). In this
application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to
external data memory that use 8-bit addresses (MOVX @ RI), Port 2emits the contents of the

P2 Special Function Register.


Port 2 also receives the high-order address bits and some control signals during Flash
programming and verification.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are writ 1s are written to Port 3 pins, they are pulled
high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are

externally being pulled low will source current (IIL) because of the pull-ups.
Port 3 also serves the functions of various special features of the AT89S52, as shown in the

following table.
Port 3 also receives some control signals for Flash programming and verification.

Table 2.2: Port pin Functions


30

31

CHAPTER 3
RPS (REGULATED POWER SUPPLY)
3.1 INTRODUCTION:
A power supply is a device that supplies electric power to an electrical load. The term is
most commonly applied to electric power converters that convert one form of electrical energy to
another, though it may also refer to devices that convert another form of energy (mechanical,
chemical, solar) to electrical energy. A regulated power supply is one that controls the output
voltage or current to a specific value; the controlled value is held nearly constant despite
variations in either load current or the voltage supplied by the power supply's energy
source.Every power supply must obtain the energy it supplies to its load, as well as any energy it
consumes while performing that task, from an energy source. Depending on its design, a power
supply may obtain energy from:

Electrical energy transmission systems. Common examples of this include power supplies

that convert AC line voltage to DC voltage.


Energy storage devices such as batteries and fuel cells.
Electromechanical systems such as generators and alternators.
Solar power.
A power supply may be implemented as a discrete, stand-alone device or as an integral

device that is hardwired to its load. Examples of the latter case include the low voltage DC
power supplies that are part of desktop computers and consumer electronics devices.Commonly
specified power supply attributes include:

The amount of voltage and current it can supply to its load.


How stable its output voltage or current is under varying line and load conditions.
How long it can supply energy without refueling or recharging (applies to power supplies
that employ portable energy sources).
This power supply section is required to convert AC signal to DC signal and also to reduce

the amplitude of the signal. The available voltage signal from the mains is 230V/50Hz which is
an AC voltage, but the required is DC voltage (no frequency) with the amplitude of +5V and
32

+12V for various applications.In this section we have Transformer, Bridge rectifier, are
connected serially and voltage regulators for +5V and +12V (7805 and 7812) via a capacitor
(1000F) in parallel are connected parallel as shown in the circuit diagram below.

3.2 CIRCUIT:
From this project we specially designed RPS(regular power). This RPS is ecofriendly
because it is designed especially by solar charged batteries to give power to the robot. From solar
charged batteries directly DC voltage is given to the regulator. From this regulator the required
voltage is coming out put it is generally +5V. This circuit is both solar and transform based
power supply. The below Figure shows the power supply circuit diagram.

Fig 3.1: Circuit Diagram for RPS.

3.3 CIRCUIT EXPLANATION


From this section we explains the important components of circuit.

3.3.1 SOLAR PANEL


A solar panel is a set of solar photovoltaic modules electrically connected and mounted on
a supporting structure. A photovoltaic module is a packaged, connected assembly of solar cells.
The solar panel can be used as a component of a larger photovoltaic system to generate and
supply electricity in commercial and residential applications. Each module is rated by
33

its DC output power under standard test conditions (STC), and typically ranges from 100 to 320
watts. The efficiency of a module determines the area of a module given the same rated output an 8% efficient 230 watt module will have twice the area of a 16% efficient 230 watt module. A
single solar module can produce only a limited amount of power; most installations contain
multiple modules. A photovoltaic system typically includes a panel or an array of solar modules,
an inverter, and sometimes a battery orsolar tracker and interconnection wiring.

Fig 3.2 (a) Solar Panel& (b) Solar Panel Back side.
Solar modules use light energy (photons) from the sun to generate electricity through
the photovoltaic effect. The majority of modules use wafer-based crystalline silicon cells or thinfilm cells based on cadmium telluride or silicon. The structural (load carrying) member of a
module can either be the top layer or the back layer. Cells must also be protected from
mechanical damage and moisture.

3.3.1.1 BASIC OPERATION


Solar cells convert light energy into electrical energy either indirectly by first converting it
into heat, or through a direct process known as the photovoltaic effect. The most common types
of solar cells are based on the photovoltaic effect, which occurs when light falling on a two-layer
semiconductor material produces a potential difference, or voltage, between the two layers. The
voltage produced in the cell is capable of driving a current through an external electrical circuit
that can be utilized to power electrical devices. This tutorial explores the basic concepts behind
solar cell operation.
34

Fig 3.3: Electron and Current Flow in Solar Cells.


Today, the most common photovoltaic cells employ several layers of doped silicon, the
same semiconductor material used to make computer chips. Their function depends upon the
movement of charge-carrying entities between successive silicon layers. In pure silicon, when
sufficient energy is added (for example, by heating), some electrons in the silicon atoms can
break free from their bonds in the crystal, leaving behind a hole in an atom's electronic structure.
These freed electrons move about randomly through the solid material searching for another hole
with which to combine and release their excess energy.

3.3.2 TRANSFORMER
A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled electrical conductors. A changing current in the first circuit (the primary)
creates a changing magnetic field; in turn, this magnetic field induces a changing voltage in the
second circuit (the secondary). By adding a load to the secondary circuit, one can make current
flow in the transformer, thus transferring energy from one circuit to the other.

Fig 3.4: Transformer

35

The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP
by a factor equal to the ratio of the number of turns of wire in their respective windings:

3.3.2.1 BASIC PRINCIPLE


The transformer is based on two principles: firstly, that an electric current can produce a
magnetic field (electromagnetism) and secondly that a changing magnetic field within a coil of
wire induces a voltage across the ends of the coil (electromagnetic induction). By changing the
current in the primary coil, it changes the strength of its magnetic field; since the changing
magnetic field extends into the secondary coil, a voltage is induced across the secondary.A
simplified transformer design is shown below. A current passing through the primary coil creates
a magnetic field. The primary and secondary coils are wrapped around a core of very high
magnetic permeability, such as iron; this ensures that most of the magnetic field lines produced
by the primary current are within the iron and pass through the secondary coil as well as the
primary coil.

Fig 3.5: An ideal step-down transformer showing magnetic flux in the core.

3.3.2.2 DETAILED OPERATION


The simplified description above neglects several practical factors, in particular the primary
current required to establish a magnetic field in the core, and the contribution to the field due to
current in the secondary circuit.Models of an ideal transformer typically assume a core of
36

negligible reluctance with two windings of zero resistance. When a voltage is applied to the
primary winding, a small current flows, driving flux around the magnetic circuit of the core. The
current required to create the flux is termed the magnetizing current; since the ideal core has
been assumed to have near-zero reluctance, the magnetizing current is negligible, although still
required to create the magnetic field.

3.3.3 BRIDGE RECTIFIER


A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge configuration
that provides the same polarity of output voltage for any polarity of input voltage. When used in
its most common application, for conversion of alternating current (AC) input into direct current
(DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave rectification
from a two-wire AC input, resulting in lower cost and weight as compared to a center-tapped
transformer design, but has two diode drops rather than one, thus exhibiting reduced efficiency
over a center-tapped design for the same output voltage.

Fig 3.6: (a) Bridge Rectifier & (b) Circuit.

3.3.3.1 BASIC OPERATION


When the input connected at the left corner of the diamond is positive with respect to the
one connected at the right hand corner, current flows to the right along the upper colored path to
the output, and returns to the input supply via the lower one.

37

Fig 3.7: Bridge Rectifier Case 1


When the right hand corner is positive relative to the left hand corner, current flows along
the upper colored path and returns to the supply via the lower colored path.

Fig 3.8: Bridge Rectifier Case 2


In each case, the upper right output remains positive with respect to the lower right one.
Since this is true whether the input is AC or DC, this circuit not only produces DC power when
supplied with AC power: it also can provide what is sometimes called "reverse polarity
protection". That is, it permits normal functioning when batteries are installed backwards or DC
input-power supply wiring "has its wires crossed" (and protects the circuitry it powers against
damage that might occur without this circuit in place).

3.3.3.2 OUTPUT SMOOTHING (USING CAPACITOR)


For many applications, especially with single phase AC where the full-wave bridge serves
to convert an AC input into a DC output, the addition of a capacitor may be important because
38

the bridge alone supplies an output voltage of fixed polarity but pulsating magnitude (see
diagram above).

Fig 3.9: Output smoothing (using capacitor)


The function of this capacitor, known as a reservoir capacitor (aka smoothing capacitor) is
to lessen the variation in (or 'smooth') the rectified AC output voltage waveform from the bridge.
One explanation of 'smoothing' is that the capacitor provides a low impedance path to the AC
component of the output, reducing the AC voltage across, and AC current through, the resistive
load. In less technical terms, any drop in the output voltage and current of the bridge tends to be
cancelled by loss of charge in the capacitor. This charge flows out as additional current through
the load. Thus the change of load current and voltage is reduced relative to what would occur
without the capacitor. Increases of voltage correspondingly store excess charge in the capacitor,
thus moderating the change in output voltage / current. Also see rectifier output smoothing.

3.3.4 VOLTAGE REGULATOR


A voltage regulator is an electrical regulator designed to automatically maintain a constant
voltage level.

39

Fig 3.10: Voltage Regulator & Pin Descriptions.


The 78xx (also sometimes known as LM78xx) series of devices is a family of selfcontained fixed linear voltage regulator integrated circuits. The 78xx family is a very popular
choice for many electronic circuits which require a regulated power supply, due to their ease of
use and relative cheapness. When specifying individual ICs within this family, the xx is replaced
with a two-digit number, which indicates the output voltage the particular device is designed to
provide (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts.

Fig 3.11: Internal Circuit for Regulator ICs

3.4 CONCLUSION
RPS is a regulated power supply. A power supply is a device that supplies electric
power to an electrical load. RPS converts AC line voltage to DC voltage. Fig 3.1 shows circuit
diagram of RPS. Here we are used ecofriendly electrical energy that is solar panel. Solar modules
use light energy (photons) from the sun to generate electricity through the photovoltaic effect.
Solar cells convert light energy into electrical energy either indirectly by first converting it into
heat, or through a direct process known as the photovoltaic effect.The most common types of
solar cells are based on the photovoltaic effect, which occurs when light falling on a two-layer
semiconductor material produces a potential difference, or voltage, between the two layers. In
RPS bridge is used to When used in its most common application, for conversion of alternating
current (AC) input into direct current (DC) output.
40

CHAPTER 4
BLUETOOTHMODULE
4.1 INTRODUCTION
Bluetooth is a wireless protocol utilizing short-range communications technology
facilitating data transmission over short distances from fixed and/or mobile devices, creating
wireless personal area networks (PANs). The intent behind the development of Bluetooth was the
creation of a single digital wireless protocol, capable of connecting multiple devices and
overcoming issues arising from synchronization of these devices.
Bluetooth uses a very robust radio technology called frequency hopping spread spectrum. It
chops up the data being sent and transmits chunks of it on up to 75 different frequencies. In its
basic mode, the modulation is Gaussian frequency shift keying (GFSK). It can achieve a gross
data rate of 1 Mb/s. Bluetooth provides a way to connect and exchange information between
devices such as mobile phones, telephones, laptops, personal computers, printers, GPS receivers,
digital cameras, and video game consoles over a secure, globally unlicensed Industrial,
Scientific, and Medical (ISM) 2.4 GHz short-range radio frequency bandwidth.
The Bluetooth specifications are developed and licensed by the Bluetooth Special Interest
Group (SIG). The Bluetooth SIG consists of companies in the areas of telecommunication,
computing, networking, and consumer electronics. Bluetooth is a standard and communications
protocol primarily designed for low power consumption, with a short range (power-classdependent: 1 meter, 10 meters, 100 meters) based on low-cost transceiver microchips in each
device.
Bluetooth enables these devices to communicate with each other when they are in range.
The devices use a radio communications system, so they do not have to be in line of sight of each
other, and can even be in other rooms, as long as the received transmission is powerful enough.
Bluetooth device class indicates the type of device and the supported services of which the
information is transmitted during the discovery process.

41

Class

Maximum Permitted Power


mW(dBm)

Range
(approximate)

Class 1

100 mW (20 dBm)

~100 meters

Class 2

2.5 mW (4 dBm)

~10 meters

Class 3

1 mW (0 dBm)

~1 meter

Table 4.1: Bluetooth Max Permitted Power Range


In most cases the effective range of class 2 devices is extended if they connect to a class 1
transceiver, compared to pure class 2 network. This is accomplished by the higher sensitivity and
transmission power of Class 1 devices.

Version

Data Rate

Version 1.2

1 Mbit/s

Version 2.0 + EDR

3 Mbit/s

WiMedia Alliance
(proposed)

53 - 480 Mbit/s

Table 4.2: Bluetooth Versions

4.2 BLUETOOTH PROFILES:


In order to use Bluetooth, a device must be compatible with certain Bluetooth profiles.
These define the possible applications and uses of the technology.
42

4.2.1 BLUETOOTH VS WI-FI IN NETWORKING


Bluetooth and Wi-Fi have different applications in today's offices, homes, and on the move:
setting up networks, printing, or transferring presentations and files from PDAs to computers.
Both are versions of unlicensed wireless technology. Wi-fi differs from Bluetooth in that it
provides higher throughput and covers greater distances, but requires more expensive hardware
and may present higher power consumption. They use the same frequency range, but employ
different modulation techniques. While Bluetooth is a replacement for cabling in a variety of
small-scale applications, Wi-Fi is a replacement for cabling for general local area network
access. Bluetooth can be taken as replacement for USB or any other serial cable link, whereas
Wi-Fi is wireless Ethernet communications according to the protocol architectures of IEEE 802.3
with TCP/IP. Both standards are operating at a specified bandwidth not identical with that of
other networking standards; the mechanical plug compatibility problem known with cables is
replaced by the compatibility requirement for an air interface and a protocol stack.

4.3 BLUETOOTH DEVICES:


Bluetooth exists in many products, such as telephones, printers, modems and headsets. The
technology is useful when transferring information between two or more devices that are near
each other in low-bandwidth situations. Bluetooth is commonly used to transfer sound data with
telephones (i.e. with a Bluetooth headset) or byte data with hand-held computers (transferring
files).Bluetooth protocols simplify the discovery and setup of services between devices.
Bluetooth devices can advertise all of the services they provide. This makes using services easier
because more of the security, network address and permission configuration can be automated
than with many other network types.

4.4 OPERATING SYSTEM SUPPORT:


Apple has supported Bluetooth since Mac OS X v10.2 which was released in 2002. For
Microsoft platforms, Windows XP Service Pack 2 and later releases have native support for
Bluetooth. Linux has two popular Bluetooth stacks, BlueZ and Affix. The BlueZ stack is
included with most Linux kernels and it was originally developed by Qualcomm. The Affix stack
was developed by Nokia. FreeBSD features Bluetooth support since its 5.0 release. NetBSD

43

features Bluetooth support since its 4.0 release. Its Bluetooth stack has been ported to OpenBSD
as well.

4.5 MOBILE PHONE REQUIREMENTS:


A mobile phone that is Bluetooth enabled is able to pair with many devices. To ensure the
broadest support of feature functionality together with legacy device support. The OMTP forum
has recently published a recommendations paper, entitled "Bluetooth Local Connectivity", see
external links below to download this paper.This publication recommends two classes, basic and
advanced, with requirements that cover imaging, printing, stereo audio and in car usage.

4.6 COMMUNICATION AND CONNECTION:


A master Bluetooth device can communicate with up to seven devices. This network group
of up to eight devices is called a piconet. A piconet is an ad-hoc computer network, using
Bluetooth technology protocols to allow one master device to interconnect with up to seven
active devices. Up to 255 further devices can be inactive, or parked, which the master device can
bring into active status at any time.
At any given time, data can be transferred between the master and one other device,
however, the devices can switch roles and the slave can become the master at any time. The
master switches rapidly from one device to another in a round-robin fashion. (Simultaneous
transmission from the master to multiple other devices is possible, but not used much.)Bluetooth
specification allows connecting two or more piconets together to form a scatter net, with some
devices acting as a bridge by simultaneously playing the master role and the slave role in one
piconet.Many USB Bluetooth adapters are available, some of which also include an IrDA
adapter. Older (pre-2003) Bluetooth adapters, however, have limited services, offering only the
Bluetooth Enumerator and a less-powerful Bluetooth Radio incarnation. Such devices can link
computers with Bluetooth, but they do not offer much in the way of services that modern
adapters do.

4.6.1 SETTING UP CONNECTIONS:


Any Bluetooth device will transmit the following information on demand:

44

Device name.

Device class.

List of services.

Technical information, for example, device features, manufacturer, Bluetooth specification used,
clock offset.

Any device may perform an inquiry to find other devices to connect to, and any device can
be configured to respond to such inquiries. However, if the device trying to connect knows the
address of the device, it always responds to direct connection requests and transmits the
information shown in the list above if requested. Use of device services may require pairing or
acceptance by its owner, but the connection itself can be initiated by any device and held until it
goes out of range. Some devices can be connected to only one device at a time, and connecting to
them prevents them from connecting to other devices and appearing in inquiries until they
disconnect from the other device.Every device has a unique 48-bit address. However these
addresses are generally not shown in inquiries. Instead, friendly Bluetooth names are used, which
can be set by the user. This name appears when another user scans for devices and in lists of
paired devices.Most phones have the Bluetooth name set to the manufacturer and model of the
phone by default. Most phones and laptops show only the Bluetooth names and special programs
that are required to get additional information about remote devices. This can be confusing as,
for example, there could be several phones in range named T610 (see Bluejacking).

4.6.2 PAIRING:
Pairs of devices may establish a trusted relationship by learning (by user input) a shared
secret known as a passkey. A device that wants to communicate only with a trusted device can
cryptographically authenticate the identity of the other device. Trusted devices may also encrypt
the data that they exchange over the airwaves so that no one can listen in. The encryption can,
however, be turned off, and passkeys are stored on the device file system, not on the Bluetooth
chip itself. Since the Bluetooth address is permanent, a pairing is preserved, even if the Bluetooth
name is changed. Pairs can be deleted at any time by either device. Devices generally require
pairing or prompt the owner before they allow a remote device to use any or most of their
45

services. Some devices, such as mobile phones, usually accept OBEX business cards and notes
without any pairing or prompts.

4.6.3 AIR INTERFACE:


The protocol operates in the license-free ISM band at 2.4-2.4835 GHz. To avoid interfering
with other protocols that use the 2.45 GHz band, the Bluetooth protocol divides the band into
79 channels (each 1 MHz wide) and changes channels up to 1600 times per second.
Implementations with versions 1.1 and 1.2 reach speeds of 723.1 kbit/s. Version 2.0
implementations feature Bluetooth Enhanced Data Rate (EDR) and reach 2.1 Mbit/s. Technically,
version 2.0 devices have a higher power consumption, but the three times faster rate reduces the
transmission times, effectively reducing power consumption to half that of 1.x devices (assuming
equal traffic load).

4.7 HC SERIAL BLUETOOTH PRODUCTS


HC serial Bluetooth products consist of Bluetooth serial interface module and Bluetooth
adapter, such as:
(1) Bluetooth serial interface module:
Industrial level: HC-03, HC-04(HC-04-M, HC-04-S)
Civil level: HC-05, HC-06(HC-06-M, HC-06-S)
HC-05-D, HC-06-D (with baseboard, for test and evaluation)
(2) Bluetooth adapter:
HC-M4
HC-M6
This document mainly introduces Bluetooth serial module. Bluetooth serial module is used
forconverting serial port to Bluetooth. These modules have two modes: master and slaver device.
Thedevice named after even number is defined to be master or slaver when out of factory and
cant bechanged to the other mode. But for the device named after odd number, users can set the
work mode(master or slaver) of the device by AT commands.
The main function of Bluetooth serial module is replacing the serial port line, such as:
1. There are two MCUs want to communicate with each other. One connects to Bluetooth master
device while the other one connects to slave device. Their connection can be built once the pair
46

is made. This Bluetooth connection is equivalently liked to a serial port line connection including
RXD, TXD signals. And they can use the Bluetooth serial module to communicate with each
other.
2. When MCU has Bluetooth salve module, it can communicate with Bluetooth adapter of
computers and smart phones. Then there is a virtual communicable serial port line between MCU
and computer or smart phone.
3. The Bluetooth devices in the market mostly are salve devices, such as Bluetooth printer,
Bluetooth GPS. So, we can use master module to make pair and communicate with
them.Bluetooth Serial modules operation doesnt need drive, and can communicate with the
other Bluetooth device that has the serial. But communication between two Bluetooth modules
requires at least two conditions:
(1) The communication must be between master and slave.
(2) The password must be correct.
However, the two conditions are not sufficient conditions. There are also some other
conditions basing on different device model. Detailed information is provided in the following
chapters. In the following chapters, we will repeatedly refer to Linvors (Formerly known as
Guangzhou HC Information Technology Co., Ltd.) Material and photos.

4.8 SELECTION OF THE MODULE


The Bluetooth serial module named even number is compatible with each other; The salve
module is also compatible with each other. In other word, the function of HC-04 and HC-06,
HC-03 and HC-05 are mutually compatible with each other. HC-04 and HC-06 are former
version that user cant reset the work mode (master or slave). And only a few AT commands and
functions can be used, like reset the name of Bluetooth (only the slaver), reset the password,
reset the baud rate and check the version number. The command set of HC-03 and HC-05 are
more flexible than HC-04 and HC-06s. Generally, the Bluetooth of HC-03/HC-05 is
recommended for the user.

47

Fig 4.1 HC- 05


HC-05 has many functions and covers all functions of HC-06. The above commands are
the most common ones. Besides this, HC-05 leaves lots of space for user. So HC-05 is better than
HC-06 and recommended. HC-03 is similar with HC-05.

Fig 4.2: Internal architecture of HC-05


48

PIN 1

UART_TXD, Bluetooth serial signal sending PIN, can connect with MCUs RXD
PIN
UART_RXD, Bluetooth serial signal receiving PIN, can connect with the MCUs

PIN2

TXD PIN; there is no pull-up resistor in this PIN. But It needs to be added an eternal

PIN11

pull-up resistor.
RESET, the reset PIN of module, inputting low level can reset the module, when the

PIN12
PIN13

module is in using, this PIN can connect to air.


VCC, voltage supply for logic, the standard voltage is 3.3V, and can work at 3.0-4.2V
GND
LED1, indicator of work mode. Has 3 modes:
When the module is supplied power and PIN34 is input high level, PIN31 output 1Hz
square wave to make the LED flicker slowly. It indicates that the module is at the AT
mode, and the baud rate is 38400;
When the module is supplied power and PIN34 is input low level, PIN31 output 2Hz
square wave to make the LED flicker quickly. It indicates the module is at the pair

PIN31

able mode. IfPIN34 is input high level, then the module will enter to AT mode, but
the output of PIN31 is still 2Hz square wave.
After the pairing, PIN31 output 2Hz square ware.
Note: if PIN34 keep high level, all the commands in the AT command set can be in
application. Otherwise, if just excite PIN34 with high level but not keep; only some

PIN32

command can be used. More information has provided at chapter 2.


Output terminal. Before paired, it output low level. Once the pair is finished, it output
high level.
Mode switch input. If it is input low level, the module is at paired or communication
mode. If its input high level, the module will enter to AT mode. Even though the

PIN34

module is at communication, the module can enter to the AT mode if PIN34 is input
high level. Then it will go back to the communication mode if PIN34 is input low
level again.
Table 4.3: PIN description of HC-05

4.8.1 FEATURES:

Wireless serial Bluetooth port.


With free power adapter bottom board come with well power regulator.
49

User can connect 3.3 to 5VDC and connect TX and RX to your control IO (general 3.3 to 5V

digital input output of MCU or IO is ok, or general TLL IO)


Easy to connect this module with PC, just search and key "1234" pass code.
With white SMD LED on the adapter board, can see the Bluetooth connection status.

4.8.2 STEP TO CONNECT:

Connect the wiring, power up, while the device is not connected, the Bluetooth module board

has a white LED flashing


At PC side, search Bluetooth device.
Found name called "HC-05" device
Connect it, and pass code is "1234"
While connection is ok, you can see the LED become always on

4.8.3 USAGE:

Coupled Mode: Two modules will establish communication automatically when powered.
PC hosted mode: Pair the module with Bluetooth dongle directly as virtual serial.
Bluetooth protocol : Bluetooth Specification v2.0+EDR
Frequency : 2.4GHz ISM band
Modulation : GFSK(Gaussian Frequency Shift Keying)
Speed : Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps
Security : Authentication and encryption
Profiles : Bluetooth serial port
CSR chip : Bluetooth v2.0
Wave band : 2.4GHz-2.8GHz, ISM Band
Protocol : Bluetooth V2.0
Voltage : 5V (3.6V-6V, NO more than 7V)
User defined Baud rate: 4800, 9600, 19200, 38400, 57600, 115200, 230400,460800,921600,
and 1382400.

4.9 CONCLUSION
Bluetooth is a wireless protocol utilizing short-range communications technology
facilitating data transmission over short distances from fixed and/or mobile devices. Creating
wireless personal area networks (PANs).Bluetooth uses a very robust radio technology called
frequency hopping spread spectrum. It chops up the data being sent and transmits chunks of it on
up to 75 different frequencies. Works under (ISM) 2.4 GHz short-range radio frequency
bandwidth. In this chapter we have about Bluetooth, Bluetooth devices, working range, setup
50

connection of Bluetooth. How the Bluetooth is connected, pairing of Bluetooth. Here we are
used HC-05 Bluetoothdevice. In this project we are connection as step wise at android side
search Bluetooth Found name called "HC-05" device Connect it, and pass code is "1234" While
connection is ok, you can see the LED become always on. this is pairing way of Bluetooth to
voice control robot.

51

CHAPTER 5
LCD (LIQUID CRISTAL DISPLAY)
5.1 INTRODUCTION:
A liquid crystal display (LCD) is a thin, flat display device made up of any number of color
or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of a
column of liquid crystal molecules suspended between two transparent electrodes, and two
polarizing filters, the axes of polarity of which are perpendicular to each other. Without the
liquid crystals between them, light passing through one would be blocked by the other. The
liquid crystal twists the polarization of light entering one filter to allow it to pass through the
other.
A program must interact with the outside world using input and output devices that
communicate directly with a human being. One of the most common devices attached to an
controller is an LCD display. Some of the most common LCDs connected to the controllers are
16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters per line
by 2 lines and 20 characters per line by 2 lines, respectively.
When the LCD display is not enabled, data lines are tri-state and they do not interfere with
the operation of the microcontroller.Data can be placed at any location on the LCD. For 161
LCD, the address locations are:

available. Line lengths


of 8,
16,
5.2 SHAPES AND SIZES:
20,
24, 32
Even limited to character based modules,there is still a wide variety of shapes and sizes
and
40
available. Line lengths of 8, 16,20,24,32 and 40 characters are all standard, in one, two and four
chara
line versions.
cters
are all
52
stand
ard, in
one,
two

Table 5.1: Address locations for a 1x16 line LCD

Fig 5.1: LCD Different Models.


Several different LC technologies exist. Supertwist types, for example, offer improved
contrast and viewing angle over the older twisted nematic types. Some modules are available
with back lighting, so so that they can be viewed in dimly-lit conditions. The back lighting may
be either electro-luminescent, requiring a high voltage inverter circuit, or simple LED
illumination.

Fig 5.2: Electrical blockdiagram


53

Fig 5.3: Power supply for LCD driving

5.3 PIN DESCRIPTION:


Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins
are extra in both for back-light LED connections).

Fig 5.4: PinDiagram of 1x16 lines LCD.


54

Table 5.2: Pin Description of LCD

5.3.1 CONTROL LINES:


EN: Line is called "Enable." This control line is used to tell the LCD that you are sending it data.
To send data to the LCD, your program should make sure this line is low (0) and then set the
other two control lines and/or put data on the data bus. When the other lines are completely
ready, bring EN high (1) and wait for the minimum amount of time required by the LCD
datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.
RS:Line is the "Register Select" line. When RS is low (0), the data is to be treated as a command
or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data
being sent is text data which sould be displayed on the screen. For example, to display the letter
"T" on the screen you would set RS high.
RW: Line is the "Read/Write" control line. When RW is low (0), the information on the data bus
is being written to the LCD. When RW is high (1), the program is effectively querying (or
reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are
write commands, so RW will almost always be low.

55

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected
by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,
DB4, DB5, DB6, and DB7.

5.3.2 LOGIC STATUS ON CONTROL LINES:


E - 0 Access to LCD disabled
- 1 Access to LCD enabled
R/W - 0 Writing data to LCD
- 1 Reading data from LCD
RS - 0 Instructions
-1 Character

5.3.3 WRITING DATA TO THE LCD:

Set R/W bit to low


Set RS bit to logic 0 or 1 (instruction or character)
Set data to data lines (if it is writing)
Set E line to high
Set E line to low

5.3.4 READ DATA FROM DATA LINES (IF IT IS READING) ON LCD:

Set R/W bit to high


Set RS bit to logic 0 or 1 (instruction or character)
Set data to data lines (if it is writing)
Set E line to high
Set E line to low

5.4 ENTERING TEXT:


First, a little tip: it is manually a lot easier to enter characters and commands in hexadecimal
rather than binary (although, of course, you will need to translate commands from binary couple
of sub-miniature hexadecimal rotary switches is a simple matter, although a little bit into hex so
56

that you know which bits you are setting). Replacing the d.i.l. switch pack with a of re-wiring is
necessary. The switches must be the type where On = 0, so that when they are turned to the zero
position, all four outputs are shorted to the common pin, and in position F, all four outputs are
open circuit. All the available characters that are built into the module are shown in Table 3.
Studying the table, you will see that codes associated with the characters are quoted in binary and
hexadecimal, most significant bits (left-hand four bits) across the top, and least significant bits
(right-hand four bits) down the left.
Most of the characters conform to the ASCII standard, although the Japanese and Greek
characters (and a few other things) are obvious exceptions. Since these intelligent modules were
designed in the Land of the Rising Sun, it seems only fair that their Katakana phonetic symbols
should also be incorporated. The more extensive Kanji character set, which the Japanese share
with the Chinese, consisting of several thousand different characters, is not included! Using the
switches, of whatever type, and referring to Table 3, enter a few characters onto the display, both
letters and numbers. The RS switch (S10) must be up (logic 1) when sending the characters, and
switch E (S9) must be pressed for each of them. Thus the operational order is: set RS high, enter
character, and trigger E, leave RS high, enter another character, trigger E, and so on.

5.5 FEATURES:

Interface with either 4-bit or 8-bit microprocessor.


Display data RAM
80x8 bits (80 characters).
Character generator ROM
160 different 5 7 dot-matrix character patterns.
Character generator RAM
8 different users programmed 5 7 dot-matrix patterns.
Display data RAM and character generator RAM may be accessed by the

microprocessor.
Numerous instructions
Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF, Blink
Character, Cursor Shift, Display

57

58

Fig 5.5: FLOW CHART of Installation


If the power conditions for the normal operation of the internal reset circuit are not
satisfied, then executing a series of instructions must initialize LCD unit. The procedure for this
initialization process is as above show.

5.7 CONCLUSION
In this chapter we are discussed briefly LCD. A liquid crystal display (LCD) is a
thin, flat display device made up of any number of color or monochrome pixels arrayed in front
of a light source or reflector. Program must interact with the outside world using input and output
devices that communicate directly with a human being. One of the most common devices
attached to a controller is an LCD display. Fig 5.1 shows different types of LCD.n our project we
are used 1x16 lines LCD.in this project port0 (32 to 39) pins are connected to LCD.in LCD 1, 2,
3 pins are given to power supply,4,5&6 pins are EN,RS & RW control lines respectively.EN is
enable,RS is register select,RW is read write.From 7 to 14 pins data bit lines pins. And also from
this chapter we will know how the data is entered. And how the logic pins are enabled or
disabled by using logic 1 & 0.

59

CHAPTER 6
DRIVER
6.1 INTRODUCTION
L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current
amplifiers since they take a low-current control signal and provide a higher-current signal. This
higher current signal is used to drive the motors. L293D contains two inbuilt H-bridge driver
circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in
forward and reverse direction. The motor operations of two motors can be controlled by input
logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01
and 10 will rotate it in clockwise and anticlockwise directions, respectively.

Fig 6.1: L293D IC


Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start
operating. When an enable input is high, the associated driver gets enabled. As a result, the
outputs become active and work in phase with their inputs. Similarly, when the enable input is
low, that driver is disabled, and their outputs are off and in the high-impedance state.L293D is a
dual H-Bridge motor driver, So with one IC we can interface two DC motors which can be
controlled in both clockwise and counter clockwise direction and if you have motor with fix
direction of motion the you can make use of all the four I/Os to connect up to four DC motors.
L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for
protection of circuit from back EMF output diodes are included within theIC. The output supply
60

(VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice for DC motor
driver.A simple schematic for interfacing a DC motor using L293D is shown below.

Fig 6.2: Schematic Interfacing of the L293D.

6.2 MOTOR DRIVER AND H-BRIDGE BASICS


Generally, even the simplest robot requires a motor to rotate a wheel or performs particular
action. Since motors require more current then the microcontroller pin can typically generate,
you need some type of a switch (Transistors, MOSFET, Relay etc.,) which can accept a small
current, amplify it and generate a larger current, which further drives a motor. This entire process
is done by what is known as a motor driver.Motor driver is basically a current amplifier which
takes a low-current signal from the microcontroller and gives out a proportionally higher current
signal which can control and drive a motor. In most cases, a transistor can act as a switch and
perform this task which drives the motor in a single direction.
Turning a motor ON and OFF requires only one switch to control a single motor in a single
direction. What if you want your motor to reverse its direction? The simple answer is to reverse
its polarity. This can be achieved by using four switches that are arranged in an intelligent
manner such that the circuit not only drives the motor, but also controls its direction. Out of
61

many, one of the most common and clever design is a H-bridge circuit where transistors are
arranged in a shape that resembles the English alphabet "H".

Fig 6.3: H-Bridge Motor Connection.


As you can see in the image, the circuit has four switches A, B, C and D. Turning these
switches ON and OFF can drive a motor in different ways.

Turning on Switches A and D makes the motor rotate clockwise

Turning on Switches B and C makes the motor rotate anti-clockwise

Turning on Switches A and B will stop the motor (Brakes)

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

Lastly turning on A & C at the same time or B & D at the same time shorts your entire
circuit. So, do not attempt this.
H-bridges can be built from scratch using relays, mosfets, field effect transistors (FET), bi-

polar junction transistors (BJT), etc. But if your current requirement is not too high and all you
need is a single package which does the job of driving a small DC motor in two directions, then
all you need is a L293D IC. This single inexpensive package can interface not one, but two DC
motors. L293, L293B and few other versions also does the same job, but pick the L293D version

62

as this one has an inbuilt fly back diode which protects the driving transistors from voltage
spikes that occur when the motor coil is turned off.

6.3 L293D CONNECTIONS


The circuit shown to the right is the most basic implementation of L293D IC. There are 16
pins sticking out of this IC and we have to understand the functionality of each pin before
implementing this in a circuit.

Pin1 and Pin9 are "Enable" pins. They should be connected to +5V for the drivers to
function. If they pulled low (GND), then the outputs will be turned off regardless of the input
states, stopping the motors. If you have two spare pins in your microcontroller, connect these
pins to the microcontroller, or just connect them to regulated positive 5 Volts.

Pin4, Pin5, Pin12 and Pin13 are ground pins which should ideally be connected to
microcontroller's ground.

Pin2, Pin7, Pin10 and Pin15 are logic input pins. These are control pins which should be
connected to microcontroller pins. Pin2 and Pin7 control the first motor (left); Pin10 and
Pin15 control the second motor (right).

Pin3, Pin6, Pin11, and Pin14 are output pins. Tie Pin3 and Pin6 to the first motor, Pin11 and
Pin14 to second motor, Pin16 powers the IC and it should be connected to regulated +5Volts

Pin8 powers the two motors and should be connected to positive lead of a secondary battery.
As per the datasheet, supply voltage can be as high as 36 Volts.

63

6.4 TRUTH TABLE


I have shown you where to connect the motors, battery and the microcontroller. But how do
we control the direction of these motors? Let us take an example: Suppose you need to control
the left motor which is connected to Pin3 (O1) and Pin6 (O2). As mentioned above, we require
three pins to control this motor - Pin1 (E1), Pin2 (I1) and Pin7 (I2). Here is the truth table
representing the functionality of this motor driver.
Pin 1

Pin 2

Pin 7

Function

High

High

Low

Turn Anti-clockwise (Reverse)

High

Low

High

Turn clockwise (Forward)

High

High

High

Stop

High

Low

Low

Stop

Low

Stop

Table 6.1: Truth Table.


High ~+5V, Low ~0V, X=either high or low (don't care)
In the above truth table you can observe that if Pin1 (E1) is low then the motor stops,
irrespective of the states on Pin2 and Pin7. Hence it is essential to hold E1 high for the driver to
function, or simply connect enable pins to positive 5 volts. With Pin1 high, if Pin2 is set high and
Pin7 is a pulled low, then current flow from Pin2 to Pin7 driving the motor in anti-clockwise
direction. If the states of Pin2 and Pin7 are flipped, then current flows from Pin7 to Pin2 driving
the motor in clockwise direction.

6.5 VOLTAGE SPECIFICATION


VCC is the voltage that it needs for its own internal operation 5v; l293D will not use this
voltage for driving the motor. For driving the motor it has a separate provision to provide motor
supply VSS (V supply). It means if you want to operate a motor at 9V then you need to provide
a Supply of 9V across VSS Motor supply.The maximum voltage for VSS motor supply is 36V. It
can supply a max current of 600mA per channel. Since it can drive motors Up to 36v hence you

64

can drive pretty big motors with this l293d.VCC pin 16 is the voltage for its own internal
Operation. The maximum voltage ranges from 5v and up to 36v.

6.6 DC MOTOR
A DC motor is designed to run on DC electric power. Two examples of pure DC designs
are Michael Faraday's homopolar motor (which is uncommon), and the ball bear in motor, which
is (so far) a novelty. By far the most common DC motor types are the brushed and brushless
types, which use internal and external commutation respectively to create an oscillating AC
current from the DC source -- so they are not purely DC machines in a strict sense.

Fig 6.4: DC Motor.

6.7 TYPES OF DCMOTORS:

Brushed DC Motors

Brushless DC motors

Coreless DC motors
6.7.1 BRUSHED DC MOTORS:
The classic DC motor design generates an oscillating current in a wound rotor with a split
ring commutator, and either a wound or permanent magnet stator. A rotor consists of a coil
wound around a rotor which is then powered by any type of battery.Many of the limitations of
the classic commutator DC motor are due to the need for brushes to press against the
commutator. This creates friction. At higher speeds, brushes have increasing difficulty in
maintaining contact. Brushes may bounce off the irregularities in the commutator surface,

65

creating sparks. This limits the maximum speed of the machine. The current density per unit area
of the brushes limits the output of the motor.

6.7.2 BRUSHLESS DC MOTORS:


Some of the problems of the brushed DC motor are eliminated in the brushless design. In
this motor, the mechanical "rotating switch" or commutator/brushgear assembly is replaced by an
external electronic switch synchronized to the rotor's position. Brushless motors are typically 8590% efficient, whereas DC motors with brush gear are typically 75-80% efficient. Midway
between ordinary DC motors and stepper motors lies the realm of the brushless DC motor. Built
in a fashion very similar to stepper motors, these often use a permanent magnet external rotor,
three phases of driving coils, one or more Hall Effect sensors to sense the position of the rotor,
and the associated drive electronics.

6.7.3 CORELESS DC MOTORS:


Nothing in the design of any of the motors described above requires that the iron (steel)
portions of the rotor actually rotate; torque is exerted only on the windings of the electromagnets.
Taking advantage of this fact is the coreless DC motor, a specialized form of a brush or brushless
DC motor. Optimized for rapid acceleration, these motors have a rotor that is constructed without
any iron core. The windings are typically stabilized by being impregnated with Electrical epoxy
potting systems.

6.8 WORKING OR OPERATING PRINCIPLE OF DC MOTOR


A DC motor in simple words is a device that converts direct current (electrical energy) into
mechanical energy. Its of vital importance for the industry today, and is equally important for
engineers to look into the working principle of DC motor in details that has been discussed in
this article. In order to understand the operating principle of dc motor we need to first look into
its constructional feature.The very basic construction contains a current carrying armature
which is connected to the supply end through commutator segments and brushes and placed
within the north south poles of a permanent or an electro-magnet as shown in the diagram below.

66

Fig 6.5: Operation of DC Motor.


For clear understanding the principle of DC motor we have to determine the magnitude of
the force, by considering the diagram below.

Fig 6.6: Magnitude of the force for DC Motor.


We know that when an infinitely small charge dq is made to flow at a velocity v under the
influence of an electric field E, and a magnetic field B, then the Lorentz Force dF experienced by
the charge is given by:dF = dq(E + v X B)
For the operation of dc motor, considering E = 0
dF = dq v X B
i.e. its the cross product of dq v and magnetic field B.
or dF = dq (dL/dt) X B

[v = dL/dt]

Where dL is the length of the conductor carrying charge q.


or dF = (dq/dt) dL X B
or dF = I dL X B

[Since, current I = dq/dt]

or F = IL X B = ILB Sin
or F = BIL Sin

67

From the 1st diagram we can see that the construction of a DC motor is such that the
direction of electric current through the armature conductor at all instance is perpendicular to the
field. Hence the force acts on the armature conductor in the direction perpendicular to the both
uniform field and current is constant.
i.e. = 90
So if we take the current in the left hand side of the armature conductor to be I, and current at
right hand side of the armature conductor to be I, because they are flowing in the opposite
direction with respect to each other.
Then the force on the left hand side armature conductor, Fl = BIL Sin90 = BIL
Similarly force on the right hand side conductor Fr = B( I)L.Sin90 = BIL
We can see that at that position the force on either side is equal in magnitude but opposite
in direction. And since the two conductors are separated by some distance w = width of the
armature turn, the two opposite forces produces a rotational force or a torque that results in the
rotation of the armature conductor.Now let's examine the expression of torque when the armature
turns crate an angle of with its initial position.
The torque produced is given by
Torque = force, tangential to the direction of armature rotation X distance.
or = Fcos.w
or = BIL w cos
Where is the angle between the plane of the armature turn and the plane of reference or
the initial position of the armature which is here along the direction of magnetic field.The
presence of the term cos in the torque equation very well signifies that unlike force the torque at
all position is not the same. It in fact varies with the variation of the angle . To explain the
variation of torque and the principle behind rotation of the motor let us do a stepwise analysis.

68

Fig 6.7: Motor rotating case 1


Step 1:
Initially considering the armature is in its starting point or reference position where the angle =
0.
= BIL w cos0 = BILw
Since = 0, the term cos = 1, or the maximum value, hence torque at this position is maximum
given by = BILw. This high starting torque helps in overcoming the initial inertia of rest of the
armature and sets it into rotation.

Fig 6.8: Motor rotating case 2


Step 2:
Once the armature is set in motion, the angle between the actual position of the armature and
its reference initial position goes on increasing in the path of its rotation until it becomes 90
from its initial position. Consequently the term cos decreases and also the value of torque.The
torque in this case is given by = BILwcos which is less than BIL w when is greater than 0.

69

Fig 6.9: Motor rotating case 3


Step 3:
In the path of the rotation of the armature a point is reached where the actual position of the rotor
is exactly perpendicular to its initial position, i.e. = 90, and as a result the term cos = 0.
The torque acting on the conductor at this position is given by.
= BILwcos90 = 0

Fig 6.10: Motor rotating case 4


i.e. virtually no rotating torque acts on the armature at this instance. But still the armature does
not come to a standstill; this is because of the fact that the operation of dc motor has been
engineered in such a way that the inertia of motion at this point is just enough to overcome this

70

point of null torque. Once the rotor crosses over this position the angle between the actual
position of the armature and the initial plane again decreases and torque starts acting on it again.

6.9 CONCLUSION
From this chapter we conclude that L293D is a dual H-bridge motor driver integrated
circuit (IC). Motor drivers act as current amplifiers since they take a low-current control signal.
The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15.
Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in
clockwise and anticlockwise directions and provide a higher-current signal. This higher current
signal is used to drive the motors. In chapter 6.3, 6.4 we are shown connections and
truthtable.L293D will use this to drive the motor. It means if you want to operate a motor at 9V
then you need to provide a Supply of 9V across VSS Motor supply.

71

CHAPTER 7
SCHEMATIC REPRESENTATION
7.1 INTRODUCTION
A schematic, or schematic diagram, is a representation of the elements of a system using
abstract, graphic symbols rather than realistic pictures. A schematic usually omits all details that
are not relevant to the information the schematic is intended to convey, and may add unrealistic
elements that aid comprehension. For example, a subway map intended for riders may represent
a subway station with a dot; the dot doesn't resemble the actual station at all but gives the viewer
information without unnecessary visual clutter.
A schematic diagram of a chemical process uses symbols to represent the vessels, piping,
valves, pumps, and other equipment of the system, emphasizing their interconnection paths and
suppressing physical details. In an electronic circuit diagram, the layout of the symbols may not
resemble the layout in the physical circuit. In the schematic diagram, the symbolic elements are
arranged to be more easily interpreted by the viewer.
A circuit diagram (also known as an electrical diagram, elementary diagram, or electronic
schematic) is a simplified conventional graphical representation of an electrical circuit.
A pictorial circuit diagram uses simple images of components, while a schematic diagram shows
the components of the circuit as simplified standard symbols; both types show the connections
between the devices, including power and signalconnections. Arrangement of the components
interconnections on the diagram does not correspond to their physical locations in the finished
device.

7.2 SCHEMATIC DIAGRAM


In the previous chapters we got an idea about project block diagram and functions of each
block in detail. In this chapter we seen schematic representation of the project and various
components what are involved in this project. The below figure shows the schematic
representation of the project.

72

Fig 7.1: Circuit Diagram


After seen the above diagram we have an idea about each and every pin connection of
microcontroller involves in the project. The wire connections in the project are very important.
The various components involved in this project are:

CRYSTAL OSCILATOR
CAPACITORS
RESISTORS
SWITCHES
MOTORS
LCD
MICROCONTROLLER
DRIVER IC
SOLAR PANEL
73

SOLAR CHARGED BATTERIES


REGULATOR
CONNECTIG WIRES

7.2.1 CRYSTAL OSCILLATOR


It is an electronic circuit that uses the mechanical resonance of a vibrating crystal of
piezoelectric material to create an electrical signal with a very precise frequency. This frequency
is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock
signal for digital integrated circuits, and to stabilize frequencies for radio transmitters. Using an
amplifier and feedback, it is an especially accurate form of an electronic oscillator. In this project
crystal oscillator frequency is 11.0592 MHz. The below figure shows the crystal oscillator.

Fig 7.2: Crystal Oscillator

7.2.2 CAPACITORS
A capacitor (formerly known as condenser) is a device for storing electric charge. The
forms of practical capacitors vary widely, but all contain at least two conductors separated by a
non-conductor. Capacitors used as parts of electrical systems, for example, consist of metal foils
separated by a layer of insulating film. A capacitor is a passive electronic component consisting
of a pair of conductors separated by a dielectric (insulator). An ideal capacitor is characterized by
a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on
each conductor to the potential difference between them. In this Project we used 1000uF/50V
and 100uF/50V.

7.2.3 RESISTOR

74

A resistor is

a passive

two-terminal electrical

component that

implements electrical

resistance as a circuit element. Resistors act to reduce current flow, and, at the same time, act to
lower voltage levels within circuits. Resistors may have fixed resistances or variable resistances,
such as those found in thermistors, varistors, trimmers, photo resistors and potentiometers.
Resistors are common elements of electrical networks and electronic circuits and are ubiquitous
in electronic equipment. Practical resistors can be composed of various compounds and films, as
well as resistance wires (wire made of a high-resistivity alloy, such as nickel-chrome).

7.2.4 SWITCHES
In electrical engineering, a switch is an electrical component that can break an electrical
circuit, interrupting the current or diverting it from one conductor to another. The most familiar
form of switch is a manually operated electromechanical device with one or more sets
of electrical contacts, which are connected to external circuits. Each set of contacts can be in one
of two states: either "closed" meaning the contacts are touching and electricity can flow between
them, or "open", meaning the contacts are separated and the switch is no conducting.

7.2.5 MOTORS
A DC motor is designed to run on DC electric power. Two examples of pure DC designs
are Michael Faraday's homo polar motor (which is uncommon), and the ball bear in motor, which
is (so far) a novelty. By far the most common DC motor types are the brushed and brushless
types. In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field.

7.2.6 LCD
A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of
a column of liquid crystal molecules suspended between two transparent electrodes, and two

75

polarizing filters. One of the most common devices attached to an controller is an LCD display.
Some of the most common LCDs connected to the controllers are 16X1.

7.2.7 MICROCONTROLLER
The true computer on a chip is nothing but a microcontroller. The design incorporates all
of the features found in a microprocessor CPU, ALU, PC, SP and registers. It also had added the
other features needed to make a complete computer. ROM, R AM, parallel I/O, serial I/O,
Counters and a clock circuits. In this project we used AT89S52 C. The AT89S52 is a lowpower, high-performance CMOS 8-bitmicrocontroller with 8K bytes of in-system programmable
Flash memory. It is a 8051 microcontroller family.

7.2.8 DRIVER IC
L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current
amplifiers since they take a low-current control signal and provide a higher-current signal. This
higher current signal is used to drive the motors. L293D is a dual H-Bridge motor driver, So with
one IC we can interface two DC motors which can be controlled in both clockwise and counter
clockwise direction and if you have motor with fix direction of motion the you can make use of
all the four I/O s to connect up to four DC motors.

7.2.9 SOLAR PANEL


A solar panel is a set of solar photovoltaic modules electrically connected and mounted
on a supporting structure. A photovoltaic module is a packaged, connected assembly of solar
cells. The solar panel can be used as a component of a larger photovoltaic system to generate and
supply electricity in commercial and residential applications.

7.2.10 SOLAR CHARGED BATTERIES


Batteries are used to give a electric supply to run the electronic devices, machines, to run
the vehicles. Batteries are also helpful in storage purpose. When power supply is not available
then we will follow the storage batteries or batteries. Solar charged batteries are also based on the
principle of solar panel Solar cells convert light energy into electrical energy either indirectly by
first converting it into heat, or through a direct process known as the photovoltaic effect. The
76

solar batteries will stores the light energy as an electrical energy which is available from the
sunlight. Solar charged batteries are low cost, can be rechargeable. No expansive.

7.2.11 REGULATOR
A voltage regulator is an electrical regulator designed to automatically maintain a constant
voltage level. Electronic voltage regulators are found in devices such as computer power
supplies where they stabilize the DC voltages used by the processor and other elements. In
automobile alternators and central power station generator plants, voltage regulators control the
output of the plant. In an electric power distribution system, voltage regulators may be installed
at a substation or along distribution lines so that all customers receive steady voltage independent
of how much power is drawn from the line.

7.2.12 CONNECTING WIRES


A wire is a single, usually cylindrical, flexible strand or rod of metal. Wires are used to
bear mechanical loads or electricity and telecommunications signals. Wire is commonly formed
by drawing the metal through a hole in a die or draw plate. Wire gauges come in various standard
sizes, as expressed in terms of a gauge number. The term wire is also used more loosely to refer
to a bundle of such strands, as in 'multistranded wire', which is more correctly termed a wire
rope in mechanics, or a cable in electricity.

7.3 CONCLUSION
From this chapter we conclude that schematic, or schematic diagram, is a representation
of the elements of a system using abstract, graphic symbols rather than realistic pictures. A
schematic usually omits all details that are not relevant to the information the schematic is
intended to convey. Fig 7.1 shows the schematic diagram of voice control robot through android.
This fig shows the overall project representation of the project and we are able to know in which
way every pin of the microcontroller involves in this project. And also we are discussed about
each component in this project. Fig 7.1 shows the schematic diagram of voice control robot
through android. This fig shows the overall project representation of the project and we are able

77

to know in which way every pin of the microcontroller involves in this project. And also we are
discussed about each component in this project.

CHAPTER 8
HARDWARE AND SOFTWARE
8.1 INTRODUCTION
Embedded systems are designed to do some specific task, rather than be a general-purpose
computer for multiple tasks. Some also have time performance constraints that must be met, for
reasons such as safety and usability; others may have low or no performance requirements,
allowing the system hardware to be simplified to reduce costs. Embedded systems are not always
standalone devices. Many embedded systems consist of small, computerized parts within a larger
device that serves a more general purpose. For example, the Gibson Robot Guitar features an
embedded system for tuning the strings, but the overall purpose of the Robot Guitar is, of course,
to play music.[7] Similarly, an embedded system in an automobile provides a specific function as
a subsystem of the car itself. The program instructions written for embedded systems are referred
to as firmware, and are stored in read-only memory or Flash memory chips. They run with
limited computer hardware resources: little memory, small or non-existent keyboard or screen.

8.2 HARDWARE
Embedded systems range from no user interface at all, in systems dedicated only to one
task, to complex graphical user interfaces that resemble modern computer desktop operating
systems. Simple embedded devices use buttons, LEDs, graphic or character LCDs (for example
popular HD44780 LCD) with a simple menu system. More sophisticated devices which use a
graphical screen with touch sensing or screen-edge buttons provide flexibility while minimizing
space used: the meaning of the buttons can change with the screen, and selection involves the
natural behavior of pointing at what's desired. Handheld systems often have a screen with a
"joystick button" for a pointing device. Some systems provide user interface remotely with the
help of a serial (e.g. RS-232, USB, IC, etc.) or network (e.g. Ethernet) connection. This
approach gives several advantages: extends the capabilities of embedded system, avoids the cost
of a display, simplifies BSP, allows us to build rich user interface on the PC. A good example of
78

this is the combination of an embedded web server running on an embedded device (such as
an IP camera) or a network routers. The user interface is displayed in a web browser on a PC
connected to the device, therefore needing no bespoke software to be installed.

8.3 SOFTWARE
In this project we used keil software. The Keil C51 C Compiler for the 8051
microcontroller is the most popular 8051 C compiler in the world. It provides more features than
any other 8051 C compiler available today. The C51 Compiler allows you to write 8051
microcontroller applications in C that, once compiled, have the efficiency and speed of assembly
language. Language extensions in the C51 Compiler give you full access to all resources of the
8051. The C51 Compiler translates C source files into relocatable object modules which contain
full symbolic information for debugging with the Vision Debugger or an in-circuit emulator. In
addition to the object file, the compiler generates a listing file which may optionally include
symbol table and cross reference information.

8.3.1 FEATURES

Nine basic data types, including 32-bit IEEE floating-point,


Flexible variable allocation with bit, data, bdata, idata, xdata, and pdatamemory types,
Interrupt functions may be written in C,
Full use of the 8051 register banks,
Complete symbol and type information for source-level debugging,
Use of AJMP and ACALL instructions,
Bit-addressable data objects,
Built-in interface for the RTX51 Real-Time Kernel,
Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor, Infineon,

Philips, and Triscend microcontrollers,


Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets,
Support for the Infineon 80C517 arithmetic unit.

8.3.2 EMBBEDED C
Embedded C is a set of language extensions for the C Programming language by the C
Standards committee to address commonality issues that exist between C extensions for different
79

embedded systems. Historically, embedded C programming requires nonstandard extensions to


the C language in order to support exotic features such as fixed-point arithmetic, multiple distinct
memory banks, and basic I/O operations.
In 2008, the C Standards Committee extended the C language to address these issues by
providing a common standard for all implementations to adhere to. It includes a number of
features not available in normal C, such as, fixed-point arithmetic, named address spaces, and
basic I/O hardware addressing. Embedded C use most of the syntax and semantics of standard C,
e.g., main () function, variable definition, data type declaration, conditional statements (if,
switch. case), loops (while, or), functions, arrays and strings, structures and union, bit operations,
macros, unions, etc.

8.3.3 PROGRAM
The below program is used in this project.
/*===========================================*/
/*------------btrobo programming------------*/
/*------PH:89C51RD+,28/01/11-----------------*/
/*===========================================*/
LCD_DPort EQU P0
LCD_Rs

EQU P1.5

LCD_Rw EQU P1.6


LCD_En
DELAY1
DELAY2
DELAY3
VStack

EQU P1.7
DATA 30h
DATA 31h
DATA 32h
DATA 61h

FDispRFID Bit 01h


/*---------------------------------*/
org 00h
80

ljmpPower_on
org 23h
ljmpserial_ISR
/*-------------------------------------*/
org 100h
Power_on:
mov R0,#00h
clr A
LclearNxtRAM:
mov @R0,a
inc R0
cjne R0,#0FFh,LclearNxtRAM
mov R0,#00h
acallLCD_Init
acallwelcomedata
call delay1sec
mov TMOD,#20h
mov TH1,#0FDh
mov SCON,#50h
mov IE,#90h
setb TR1
Call Btinit
call delay1sec
mov P2,#0F0h
MOV R1,#00H
/*-------------------------------------*/
MainLoop:
//

jnb P2.4,backrf

//

jnb P2.5,fwdrf

//

jnb P2.6,rightrf
81

//

jnb P2.7,leftrf
jbFDispRFID,RFIDLoop
call delay500ms
jmpMainLoop

/*--------------------------------------*/
/*backrf:
mov P2,#0f5h
calllcdclear
call displine1
movdptr,#BWD
call DISPDATA
movdptr,#robobwd
callserialsend
call delay500ms
acallwelcomedata
call delay1sec
mov P2,#0F0h
jmpMainLoop
fwdrf:
mov P2,#0fAh
calllcdclear
call displine1
movdptr,#FWD
call DISPDATA
movdptr,#robofwd
callserialsend
call delay500ms
acallwelcomedata
call delay1sec
mov P2,#0F0h
82

jmpMainLoop
rightrf:
mov P2,#0F2h
calllcdclear
call displine1
movdptr,#RT
call DISPDATA
movdptr,#robolft
callserialsend
call delay500ms
acallwelcomedata
call delay1sec
mov P2,#0F0h
jmpMainLoop
leftrf:
mov P2,#0F8h
calllcdclear
call displine1
movdptr,#LFT
call DISPDATA
movdptr,#robort
callserialsend
call delay500ms
acallwelcomedata
call delay1sec
mov P2,#0F0h
jmpMainLoop */
/*****************************************/
RFIDLoop:
clrFDispRFID
83

cjne R1,#38h,backlp
mov P2,#55h
calllcdclear
call displine1
movdptr,#BWD
call DISPDATA
movdptr,#robofwd
callserialsend
call delay500ms
acallwelcomedata
jmpMainLoop
backlp:
cjne R1,#32h,rightlp
mov P2,#0AAh
calllcdclear
call displine1
movdptr,#FWD
call DISPDATA
movdptr,#robobwd
callserialsend
call delay500ms
acallwelcomedata
jmpMainLoop
rightlp:
cjne R1,#36h,leftlp
mov P2,#022h
calllcdclear
call displine1
movdptr,#RT
call DISPDATA
84

movdptr,#robolft
callserialsend
call delay500ms
acallwelcomedata
jmpMainLoop
leftlp:
cjne R1,#34h,stop
mov P2,#88h
calllcdclear
call displine1
movdptr,#LFT
call DISPDATA
movdptr,#robort
callserialsend
call delay500ms
acallwelcomedata
jmpMainLoop

/****************************/
stop:
cjne R1,#35h,EXIT1
mov P2,#00h
calllcdclear
call displine1
movdptr,#ST
call DISPDATA
movdptr,#robost
callserialsend
call delay500ms
acallwelcomedata
85

jmpMainLoop
EXIT1:
jmpMainLoop
/***************************************/
Btinit:
mov dptr,#mycmnd0
callserialsend
call delay1sec
mov dptr,#mycmnd1
callserialsend
call delay1sec
mov dptr,#mycmnd2
callserialsend
call delay1sec
ret
mycmnd0:

DB "**********ANDROID BASED ROBOT CONTROL*********",0Dh,0Ah,0

mycmnd1:
DB
BACKWARD***",0Dh,0Ah,0
mycmnd2:

"**********CONTROLKEYS:

8-FORWARD,2-

DB "**********6-RIGHT, 4-LEFT, 5-STOP*************",0Dh,0Ah,0

robofwd: DB "**********ROBOT MOVING FORWARD****************",0Dh,0Ah,0


robobwd: DB "**********ROBOT MOVING BACKWARD***************",0Dh,0Ah,0
robolft: DB "**********ROBOT MOVING RIGHT******************",0Dh,0Ah,0
robort:

DB "**********ROBOT MOVING LEFT*******************",0Dh,0Ah,0

robost:

DB "**********ROBOT STOPPED***********************",0Dh,0Ah,0

LITE:

DB "**********LIGHT DETECTED**********************",0Dh,0Ah,0

FIRE:

DB "**********FIRE DETECTED***********************",0Dh,0Ah,0

OBJ:

DB "**********OBJECT DETECTED*********************",0Dh,0Ah,0

/****************************************/
serialsend:
looop:
86

clr a
movc a,@a+dptr
jz exit
movSBUF,a
call delay20ms
incDptr
jmplooop
exit:
ret
/*--------------------------------------*/
serial_ISR:
jbRI,RX_Service
jbTI,TX_Service
reti
RX_Service:
clr RI
mova,sbuf
mov R1,a
call delay20ms
call delay20ms
setbFDispRFID
ljmpEnd_isr
TX_Service:
clr TI
ljmpEnd_isr
End_isr:
reti
/****************************************/
/*-----welcome data programming---------*/
/****************************************/
87

welcomedata:
calllcdclear
call displine1
movdptr,#mydata
call DISPDATA
call displine2
mov dptr,#mydata1
call DISPDATA
ret
mydata : DB" ANDROID BASED",0
mydata1: DB" ROBOT CONTROL ",0
FWD:

DB" FORWARD ",0

BWD:

DB" BACKWARD ",0

LFT:

DB" LEFT ",0

RT:

DB" RIGHT ",0

ST:

DB" STOP ",0

FierDisp:DB" FIRE DETECTED ",0


liTEDisp:DB" LIGHT DETECTED ",0
object: DB" OBJECT DETECTED",0
/******************************************/
/*---LCD initialization program-----------*/
/******************************************/
LCD_Init:
mov a,#30h
call LCD_CMND_OUT
mov a,#38h
call LCD_CMND_OUT
mov a,#06h
call LCD_CMND_OUT
mov a,#0Ch
88

call LCD_CMND_OUT
mov a,#01h
call LCD_CMND_OUT
RET
/*******************************************/
/*-------lcd command programming-----------*/
/*******************************************/
LCD_CMND_OUT:
calllcd_busy
movLCD_DPort,a
clr LCD_Rs
clrLCD_Rw
setbLCD_En
nop
nop
clrLCD_En
RET
/****************************************/
/*-------lcd data programming-----------*/
/****************************************/
LCD_DATA_OUT:
calllcd_busy
movLCD_DPort,a
setb LCD_Rs
clrLCD_Rw
setbLCD_En
nop
nop
clrLCD_En
RET
89

/****************************************/
/*----------busy check programming------*/
/****************************************/
lcd_busy:
mov LCD_DPort,#0ffh
CLR LCD_Rs
SETB LCD_Rw
AGAIN1:
CLR LCD_EN
NOP
NOP
SETB LCD_EN
JB p0.7,AGAIN1
RET
/***************************************/
/*-----Display the string&send---------*/
/***************************************/
DISPDATA:
Next_Char:
clr a
movc a,@a+dptr
jzEnd_Str
call LCD_DATA_OUT
incdptr
jmpNext_char
End_Str:
RET
/***************************************/
/*---------display routine-------------*/
/***************************************/
90

lcdclear:
mov a,#01h
call LCD_CMND_OUT
ret
displine1:
mov a,#80h
call LCD_CMND_OUT
ret
displine2:
mov a,#0c0h
call LCD_CMND_OUT
ret
displine1A:
mov a,#8Ah
call LCD_CMND_OUT
ret
/*-------Delay routine-------------------*/
delay1sec:
mov DELAY1,#10
wait2: mov DELAY2,#200
wait1: mov DELAY3,#250
wait:

djnz DELAY3,wait
djnz DELAY2,wait1
djnz DELAY1,wait2
ret

delay500ms:
mov DELAY2,#183
wait12:

mov DELAY3,#250

wait0: djnz DELAY3,wait0


djnz DELAY2,wait12
91

ret
delay20ms:
wait32:

mov DELAY2,#40

wait31:

mov DELAY3,#250

wait3: djnz DELAY3,wait3


djnz DELAY2,wait31
ret
delay:
mov DELAY1,#0
same: djnz DELAY1,same
ret
end

8.4 CONCLUSION
In this chapter we are discussed about embedded system. Embedded systems are
designed to do some specific task, rather than be a general-purpose computer for multiple tasks.
Some also have time performance constraints that must be met. The program instructions written
for embedded systems are referred to as firmware, and are stored in read-only memory or Flash
memory chips. The Keil C51 C Compiler for the 8051 microcontroller is the most popular 8051
C compiler in the world. From this chapter we conclude that embedded C is a set of language
extensions for the C Programming language by the C Standards committee to address
commonality issues that exist between C extensions for different embedded systems.
Historically, embedded C programming requires nonstandard extensions to the C language in
order to support exotic features such as fixed-point arithmetic, multiple distinct memory banks,
and basic I/O operations. And also we have discussed about embedded and keil features. And
program of voice control robot is shown in this chapter.

92

CHAPTER 9
HARDWARE ANALYSIS
9.1 INTRODUCTUION
In this chapter we will discuss about the assembling process of voice control robot
through android and assembling process. In this we will also discuss about android, android
applications. How the android will be useful in this project. Which android applications are used
in this project. In the android applications how the commands are used to control the robots and
also in this chapter we will discuss about robots working mechanism. They are briefly explained
below.

9.2 ASSEMBLING THE BOARD


The chassis used for this thesis is known as Magician Chassis, which is widely used for
robotics project. It is a very simple robot platform which consists of two gear motors and wheels
and many constructing elements like screws, chases plates and tools. Total assembling process is
shown in below chapters.

Fig 9.1: Hardware board


93

9.2.1 ASSEMBLING PROCESS


Assembling the chassis may take some time but it comes with detailed information so it is
not difficult to assemble the parts. There are numbered screws and the plates have numbered
mounting holes for the equivalent screws. The figures below show the process of assembling.

Fig 9.2: Circuit Board

9.2.2 COMPLETION OF ASSEMBLING PROCESS


The final product on the picture above is the framework for the robot movement which can
gain the momentum if connected to the power source. But for certain control of the momentum it
needs different elements. Thus, the elements required for the control are explained in part two.

9.3 ANDROID APPLICATIONS


The android application designed for this thesis. It was designed through App Inventor. The
basic function of the application is to control the robot (created with Arduino and Magician
Chassis).these android applications are used to design.
They are given as follows.
i) Bluetooth spp test. ii) Bluetooth AMR (Android meets robot).

94

9.3.1 BLUETOOTH SPP TEST


Bluetooth SPP test is a android application to move robo. It is also available in Google
play store. In this applications we will run the robo by using a commands like 2,4,6,8,5.in this
application 2 is used to move the robo forward,4 is to move left side,6 is used to move right
side,8 is used to move backward.5 is used to STOP. These are the commands used for moving
robot.

9.3.2 BLUETOOTH AMR (ANDROID MEETS ROBOT).


It is also a android application to move robo. It is also available in Google play store. In
this application we will run the robo by using a voice commands. By using this application we
will give voice commands only. In this application we will not give typing commands.

9.4 ROBOTS WORKING MECHANISM


The working mechanism of the robot is based on the information passed from the android
mobile phone via Bluetooth connection to the robot using a Bluetooth modem and vice versa.
When will give a commands by android phone that will transmitt and receive the
information signals.by giving a commands it will move in the given command direction.here is
the power supply is given to robot by eco friendly solar panel and storage batteries.by using
both solar panel and batteries we are capable to run the robo. If there is no power or no light
energy then power supply is used as vice versa.

Voice

Fig 9.3: Architecture


95

9.5 TESTING
From the following commands our robot will be follows. The following commands are
same as both android apps. What we given to robot via android whther it is voice command or
touch command the following commands are same for the robot movement. They are

COMMAND

ROBOT MOVEMENT

2(TWO)
4(FOUR)
5(FIVE)
6(SIX)
8(EIGHT)

BACKWARD
LEFT
STOP
RIGHT
FORWARD
Table 9.1: TESTING RESULT

9.6 CONCLUSION
In this chapter we were discussed about the assembling process of voice control robot. In
this chapter we were discussed about android, android applications. How the android
applications are used in this project. in this chapter we will discuss about robots working
mechanism.

96

CHAPTER 10
EVALUTION
10.1 APPLICATIONS:
We believe such a system would find wide variety of applications. Menu driven systems
such as e-mail readers, household appliances like washing machines, microwave ovens, and
pagers and mobiles etc. will become voice controlled in future.

10.1.1 HOME AUTOMATION


The popularity of home automation has been increasing greatly in recent years due to much
higher affordability and simplicity through Smartphone and tablet connectivity. The concept of
the "Internet of Things" has tied in closely with the popularization of home automation.

Fig 10.1: Home Automation

10.1.2 WHEELCHAIRS:
Based on our project the robo is controlled by giving a voice commands though android
mobile. We can move wheel easily giving direction commands to android without hand
movement.

97

Fig 10.2: Wheelchair Applications

10.1.3 SURVEILLANCE DEVICE:


Surveillance is the monitoring of the behavior, activities, or other changing information,
usually of people for the purpose of influencing, managing, directing, or protecting them. This
can include observation from a distance by means of electronic equipment (such
as CCTV cameras).

Fig 10.3: Surveillance Device

10.1.4 MILITARY APPLICATIONS:


Mobile robots important role in militery matters ,from panel to dealing with potential
explosives. With suitable sensors and cameras to perform different missions, mobile robots are
operated remotely for reconnaissance patrol and relay back video images to an operator.

98

Fig 10.4: Military Applications

10.1.5 INDUSTRIAL PURPOSE


Material handling is the most popular application with 38% of operational stock of
industrial robots worldwide. This includes machine tending, palatalizing and various operations
for metal machining and plastic mounding. In cement industries machines are operated by robos.
To reduce the use of labours robots are used in loading purpose.

10.1.6 AGRICULTURE PURPOSE:


Robots are also useful in agriculture purpose in the next century. For planting seeding,
cropping etc.
It helps physically disabled persons by carrying some

objects from one place to another

place using the arm structure in the robot.


It guides the blind persons to reach a particular Destination by using the voice feature.
The robot is useful in places where humans find difficult to reach but human.
Voice reaches. E.g. in a small pipeline, in a fire-situations, in highly toxic areas.
The robot can be used as a toy.
It can be used to bring and place small objects.
It is the one of the important stage of Humanoid robots.
Command and control of appliances and equipment.
Telephone assistance systems.
It is also used in Data entry.
Speech and voice recognition security systems.
The photo electric sensor in the robot will sense the obstacles and it will make decisions
according to the obstacles it encounters.
99

10.2 ADVANTAGES
By using robos we can control live video feed by giving voice commands.
We can use voice control robot for a multiple ways. We can move any clockwise,
anticlockwise direction, forward and backward by giving voice commands.
In industries we can control the machines by using robos.
It is used in hazardous places.
They are no need of food, nutrients need only electrical energy by means of battery storage,
solar energy etc.
You can program them to make them do exactly what you want them to do.
They are more accurate than humans Eg no shaking when in a very important surgery, puts
every screw in fabricating a car etc.
You can send them to very dangerous places.
You can make them do your job for you.
They can perform tasks faster than humans and much more consistently and accurately. They
can capture moments just too fast for the human eye to get, for example the Atlas detector in
the LHC project can capture ~ 600000 frames per second while we can see at about 60.
Most of them are automatic so they can go around by themselves without any human
interference
They can also useful for physically handicapped persons through wheel chairs etc.
They can reduce the labour work in industry by it portable takes the load from one place to
another place. They able to work always 24x7.

10.3 DISADVANTAGES
They are very expensive to make they can reproduce but it could cost money for the

materials.
You need the right materials to make them.
They can be very hard to program.
You need highly trained people to make them.
People can lose jobs in factories.
It needs maintenance to keep it running.

10.4 FUTURE SCOPE:


The purpose of such robotic system is to help people with motor disabilities in controlling
different widgets in daily life using mobile phone. The proposed idea can be expanded to control
almost any device with Bluetooth receiver. In future we use a secured wireless channel using
encryption and decryption. Consider larger bandwidth system should be onboard because video
100

streaming service desired. Some of interfacing applications which can be made are controlling
home appliances, robotics movements, Speech Assisted technologies, Speech to text translation,
and many more. In future industries, home auto machine, agriculture is also developed by
robotics. To reduce the labour efficiency, work efficiency, to reduce the working time to increase
the productivity.

101

CONCLUSION
A highly reliable and easy system to accomplish a purpose design specific task such as
distribution of medicine and food to the bed ridden patients specially in infected & inaccessible
areas of the hospitals and medical Centre have been reported. The on-board intelligence helps
providing situational awareness a basic requirement of the system to be operated by voice / tele
confined for ascertaining a majority of other tasks in open loop environment. The operation by
voice command could best be used for handicapped.
The outcome of the thesis is a simple robot which is controlled by a smart android
phone& also receives the voice commands. This thesis aims to provide simple guidelines for
people interested in building robots. As mentioned earlier, the project has been carried out
several times and the aim of this thesis is to familiarize the students with fundamentals of
Arduino and Android to build anything possible. Although the thesis projects very little about the
robots use in real world, but with the help of guidelines and the abundance of resources the
outcome could be very beneficial for many people in the world. People with physical limitations
such as handicapped people could use the feature to their wheel chair from this thesis to
compensate their abilities.

102

BIBLOGRAPHY
The Micro controller and Embedded Systems.
Muhammad Ali Mazidi
Janice Gillispie Mazidi
The Micro controller Architecture, Programming & Applications
Kenneth J.Ayala
Fundamentals of Micro processors and Micro computers
B.Ram
Micro processor Architecture, Programming & Applications
Ramesh S.Gaonkar
Electronic Components
D.V.Prasad
Answers.com. Online dictionary, and much more, URL http://www.answers.com.
Wikipedia.com, complete information website.
http://en.wikipedia.org/wiki/Solar_battery_charger
Scribd.com, the worlds largest online library. URL:http://www.scribd.com
Encyclopedia of regulators, capacitors, diodes, resistors
http://www.morldtechgossips.com, simple way of understand
Other websites
http://www.elprocus.com/solar-panel-facts/
http://org.ntnu.no/solarcells/pages/introduction.php
http://www.facstaff.bucknell.edu
http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/leds.html
www.national.com
www.atmel.com
www.microsoftsearch.com
www.geocities.com

103

Вам также может понравиться