You are on page 1of 74

VOICE ENCODED & CONTROLLED TWEEK

OPERATIONAL ROBOT
Report submitted in partial fulfillment of the
requirement for the degree of

B.Tech in
Electronics & Communication Engineering
Under the Supervision of

Mr. SHAILENDRA SINHA


Assistant Professor (ECE)

By

SUDHANSHU OJHA
TUSHENDRA MISHRA
RESHAM RASTOGI
RAHUL SRIVASTAVA
SAUMYA SENGAR

Pranveer Singh Institute of Technology, Kanpur


Dr. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY
Lucknow
May 2018
VOICE ENCODED & CONTROLLED
TWEEK OPERATIONAL ROBOT
Report submitted in partial fulfillment of the
requirement for the degree of

B.Tech in
Electronics & Communication Engineering
Under the Supervision of

Mr. SHAILENDRA SINHA


Assistant Professor (ECE)
By

TUSHENDRA MISHRA
SUDHANSHU OJHA
RESHAM RASTOGI
SAUMYA SENGAR
RAHUL SRIVASTAVA

Pranveer Singh Institute of Technology, Kanpur


Dr. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY

Lucknow
May 2018
DECLARATION

This is to certify that Report entitled “VOICE ENCODED & CONTROLLED TWEEK
OPERATIONAL ROBOT” which is submitted by us in partial fulfillment of the
requirement for the award of degree B.Tech in Electronics & Communication Engineering
to Pranveer Singh Institute of Technology, Kanpur Dr. A P J A K Technical University,
Lucknow comprises only my own work and due acknowledgement has been made in the
text to all other material used.

Date: Name of Students:

Sudhanshu Ojha

Tushendra Mishra

Rahul Srivastava

Saumya Sengar

Resham Rastogi

HOD
Approved By: Electronics & Communication Engineering

PSIT, Kanpur

iii
CERTIFICATE

This is to certify that Report entitled “VOICE ENCODED CONTROLLED TWEEK


OPERATIONAL ROBOT” which is submitted by Tushendra Mishra (1416431151),
Rahul Srivastava (1416431105), Sudhanshu Ojha (1416431148), Saumya Sengar
(1416431131), Resham Rastogi (1416431112) in partial fulfillment of the requirement for
the award of degree B.Tech in Electronics & Communication Engineering to Pranveer
Singh Institute of Technology, Kanpur Dr. A.P.J. A K Technical University, Lucknow is a
record of the candidate own work carried out by him under my/our supervision. The matter
embodied in this thesis is original and has not been submitted for the award of any other
degree.

Date: Mr. Shailendra Sinha

Assistant Professor (ECE)

iv
ACKNOWLEDGEMENT

It gives us a great sense of pleasure to present the report of the B.Tech project
undertaken during B.Tech Final Year. We owe special debt of gratitude to our guide
Mr. Shailendra Sinha, Assistant Professor of Department of Electronics &
Communication Engineering, Pranveer Singh Institute of Technology, Kanpur
(U.P.) for his constant support and guidance throughout course of our work. His
sincerity, thoroughness and perseverance have been a constant source of inspiration for
us. It is only his cognizant efforts that our endeavours have been light for the day.

We also take opportunity to acknowledge the contribution of Dr. Y.M. Dubey, Head
of Department of Electronics & Communication Engineering, Pranveer Singh
Institute of Technology, Kanpur (U.P.) for his full support and assistance during the
development of the project.
We would also want to acknowledge the contribution of Mr. Raghvendra Singh,
Assistant Professor of Department of Electronics & Communication Engineering,
Pranveer Singh Institute of Technology for his continuous support as our project
coordinator.
We also do not like to miss the opportunity to acknowledge the contribution of all
faculty members of department for their assistance and cooperation during the
development of my project. Last but not the least we acknowledge our friends for their
contribution in the completion of the project.

Date: Name:

Place: Kanpur Tushendra Mishra (1416431151)

Sudhanshu Ojha (1416431148)

Rahul Srivastava (1416431105)

Saumya Sengar (1416431131)


Resham Rastogi (1416431112)

v
ABSTRACT

As it is known embedded system is a special-purpose computer system designed to perform


a dedicated function. As a spice we also included robotics domain and achieved this project
partially. In this project, an automation surveillance system is achieved using camera which
will detect the face or object and flash the information about it. Also the robot consists of a
temperature sensor for temperature display and it also consist of a ultrasonic sensor to detect
the nearby object. The movement of the Robot is voice controlled.
This Project is being made keeping defence related problems in mind. Day by Day
infiltration problems are increasing rapidly. Terrorist are getting smarter day by day so there
is a sore need to upgrade our security systems. We are performing this project on robot
because with a very small change in configuration we can make this project a success.
Currently our country is turning to a digital place where everyone has mobile and some
smart device. So we will use their existing device to improve our security system.
Technologies like face detection, temperature display, Bluetooth connectivity, etc. can help
in creating a device/ product which can help military for surveillance purpose with sole
intension of minimizing the causalities.

vi
TABLE OF CONTENTS
Declaration iii
Certificate iv
Acknowledgement v
Abstract vi
List of figure xi
List of table xiii

CHAPTER 1: INTRODUCTION 1-6

1.1 Brief Review 1


1.2 Motivation 2
1.3 Purpose 2
1.4 Block Diagram of Project 3
1.5 Flowchart of Project 4
1.6 Literature Review 5
1.7 Generation and Development 5
1.8 Types of Humanoid 6
1.9 Scope of Project 7

CHAPTER 2: HARDWARE USED 8-46

2.1 Arduino Mega 8


2.1.1 Technical Specifications 8
2.1.2 Power Supply 9
2.1.3 Input Output Pins 10
2.1.4 Programming 11
2.1.5 USB Overcurrent Protection 11

vii
2.1.6 Physical Characteristics And Shield Compatibility 11
2.2 Voice Control Mechanism 12
2.2.1 Introduction 12
2.2.2 Voice Control 12
2.2.3 Use of Building Module 13
2.2.4 Task of Module 14
2.2.5 System Description 14
2.2.6 Detailed Description 16
2.3 Bluetooth Module 17
2.3.1 Specifications 18
2.3.2 Working Technology 18
2.3.3 Network Technology 19
2.3.4 Interfacing With Arduino 20
2.3.5 Power Modes And Security 20
2.3.6 Features 21
2.4 Ultrasonic Sensor 22
2.4.1 Technical Specifications 23
2.5 Servo Motor 24
2.5.1 Working 25
2.6 DC Motor 26
2.6.1 Principle of Operation 28
2.7 Bread Board 29
2.8 LCD Module 29
2.8.1 44780 Background 30
2.8.2 Initializing The LCD 31
2.8.3 Important Command Codes for LCD 34
2.9 Temperature Sensor 36
2.9.1 LM35 Precision Centigrade Temperature Sensor 36
2.9.2 Block Diagram 38
2.9.3 Applications 38

viii
2.10 L293N Motor Driver Module 40
2.10.1 Introduction 40
2.10.2 Pin Details of L293N Module 42
2.10.3 Working 42
2.11 LM2596 BUCK Convertor Module 43
2.11.1 Introduction 43
2.11.2 Working 45

CHAPTER 3: FACE DETECTION USING 47-51


MATLAB

3.1 Introduction 47
3.2 Methods of Face Detection 48
3.2.1 HAAR Like Feature for Face Detection 48
3.3 Hardware/Software Used For Face Detection 50

CHAPTER-4: BASIC COMPONENTS USED 52-57

4.1 Resistor 52
4.1.1 Introduction 52
4.1.2 Electronics Symbols And Notations 52
4.1.3 Theory of Operation 53
4.1.4 Series And Parallel Resistor 53
4.2 Capacitor 54
4.2.1 Introduction 54
4.3 Buzzer 56
4.3.1 Introduction 56
4.3.2 Buzzer Pin Configuration 57
4.3.3 Buzzer Features 57
4.3.4 Applications of Buzzer 58

ix
4.4 LM2596 Voltage Regulator 58

4.4.1 Introduction 58
4.4.2 Features 59
4.4.3 Applications 59

CHAPTER 5: RESULT & CONCLUSION 60-61

5.1 Result 60
5.2 Conclusion 60

REFERENCES 62
APPENDIX-I: PROGRAM USED FOR ARDUINO 63-73
APPENDIX-II: PROGRAM USED FOR MATLAB 74-78

x
LIST OF FIGURES

Figure no. Name Page no.


1.1 Block Diagram of Project 3
1.2 Flowchart of Project 4
2.1 Arduino mega 2560 board 8
2.2 Detailed diagram of ATmega board 9
2.3 Working Module Voice Control 14
2.4 Bluetooth Module 17
2.5 Master-Slave Configuration 19
2.6 Interfacing with Arduino 20
2.7 Ultrasonic sensor module 22
2.8 Echo and trigger generation in ultrasonic sensor 23
2.9 Servo motor 24
2.10 Pulse generation for rotation of servo motor 26
2.11 Poles and working of DC motor 27
2.12 DC Motor 27
2.13 Breadboard 29
2.14 LCD Module 30
2.15 Memory Map 33
2.16 Temperature Sensor 37
2.17 Basic Centigrade Temperature Sensor 37
2.18 Internal Block diagram of temperature sensor 38
2.19 LM35 application sample 39
2.20 L298N Motor Driver Module 40
2.21 Schematic Diagram for motor drive module 40
2.22 Pin Diagram of L289N Module 41
2.23 LM2596 Power Supply Module 44
2.24 Two States of Buck Converter 46
3.1 Haar features used for face detection 49
3.2 Flow Chart of Face Detection 50
3.3 Webcam used for project 51

xi
4.1 (a) Resistor, (b) Rheostat, (c) Potentiometer 52
4.2 Resistance Operation 53
4.3 Resistance in Series 54
4.4 Resistance in Parallel 54
4.5 Capacitors 56
4.6 Buzzer 57
4.7 LM2596 Voltage Regulator IC 58

xii
LIST OF TABLE
Table no. Name Page no.
2.1 Technical Specifications of Ardunio Mega2560 8
2.2 Command codes for LCD 34
2.3 Pin Details of L289N Module 42
4.1 Pin Configuration of Buzzer 57

xiii
CHAPTER 1
INTRODUCTION
1.1 BRIEF REVIEW

Voice Encoded Controlled Tweek Operational Robot i.e., VECTOR is a robot having
combinations of different features for various operations such as face/object detection,
location tagging, weather forecasting and portable media centre. The Robot used to be
controlled wirelessly.

This project Robot helps to control robot through voice commands received through
android application. The integration of control unit with Bluetooth device is done to
capture and read the voice commands. The robotic vehicle then operates as per the
command received through android application. For this Arduino board is integrated
in the system which makes it possible to operate the vehicle via android application.
The controlling device may be any android based Smartphone/tab etc. having an
android OS. The android controlling system provides a good interactive GUI that
makes it easy for the user to control the vehicle. The transmitter uses an android
application required for transmitting the data. The android device sends commands to
move the vehicle in forward, backward, right and left directions.

After receiving the commands, the microcontroller then operates the motors in order
to move the vehicle in four directions. The communication between android device
and receiver is sent as serial communication data. The microcontroller program is
designed to move the motor through a motor driver IC as per the commands sent by
android device. Such Robot will be useful for surveillance purpose and provides
simple means for face detection and recognition.

A humanoid Robot is a robot with its body shape built to resemble that of the human
body. A humanoid design might be for functional purposes, such as interacting with
human tools and environments, for experimental purposes, such as the study of
bipedal locomotion, or for other purposes. In general, humanoid robots have a torso, a
head, two arms, and two legs, though some forms of humanoid robots may model
only part of the body, for example, from the waist up. Some humanoid robots may
also have heads designed to replicate human facial features such as eyes and mouths.

1
1.2 MOTIVATION

Under the scheme of Digital India as we are moving towards sophisticated and
digitally active world, we have a responsibility to make people cognizant of every
possible aspect of technology.

 To provide user friendly robot which required simple step for the user to use it.
 To help the user to use for safety purpose.
 Test the robot in more real world situation by utilizing external testing facilities.
 To combine more and more functions in a single unit to make use of it for
multiple tasks.
 To make a robot as feasible as possible so that it can be used for different
purposes in different situations.

1.3 PURPOSE
Humanoid robots are used as a research tool in several research areas. Researchers
need to understand the human body structure and behaviour of build and study
humanoid robots. On the other side, the attempt to the simulation of the human body
leads to a better understanding of it. Human Recognition is a field of study which is
focused on how humans learn from sensory Information in order to acquire perceptual
and motor skills. This knowledge is used to develop Computational models of human
behaviour and it has been improving over time. It has been suggested that very
advanced robotics will facilitate the enhancement of ordinary humans. Although the
initial aim of humanoid research was to build better orthotics and prosthesis for
human beings, knowledge has been transferred between both disciplines. Besides the
research, humanoid robots are being developed to perform human tasks like personal
assistance, where they should be able to assist the sick and elderly, and dirty or
dangerous jobs like being receptionist or a worker of an automotive manufacturing
line are also suitable for humanoids. In essence, since they can use tools and operate
equipment and vehicles designed for the human form, humanoids could theoretically
perform any task a human being can, so long as they have the proper software.
However, the complexity of doing so is deceptively great. They are becoming
increasingly popular for providing entertainment too. These animations look so
realistic that it can be hard to decipher from a distance whether or not they are

2
actually human. Although they have a realistic look, they have no cognition or
physical autonomy. Various humanoid robots, especially with artificial intelligence
algorithms, could be useful for future dangerous and distant space exploration
missions, without having the need to turn back around again and return to earth once
the mission is completed.

1.4 BLOCK DIAGRAM OF PROJECT

Fig 1.1: Block Diagram

3
1.5 FLOWCHART OF PROJECT

Fig 1.2: Flowchart of Project

4
1.6 LITERATURE REVIEW
NASA’s vision for space exploration stresses the cultivation of human-robotic system
(NASA 2004). Fong and nourbaksh (fong and nourbaksh 2005) point out that to
reduce The human workload, costs, fatigue, driven error and risk, intelligent robotic
system will Have to be part of mission design. They also observe that the scant
attention has been paid to joint human robot team and making human robot
collaboration natural and efficient is crucial to future space exploration. Companies
such as Honda, Toyota and Sony are also interested in developing consumer robot that
interact with humans in the home and in workplace. There is a growing interest in the
human robot interaction a can be recognized by (HRI). The Cogniron project
(COGNORON 2007), MIT Media lab and the Mitsubishi Electric Research
Laboratories (Sidney and Lee 2005) recognize the need for human robot collaboration
As well and are currently conducting research in this field emerging area. Clearly,
there is a Growing need for research on human robot collaboration and modes of
communication between human and robotic system. This article review at the field of
humanoid robot interaction with a focus on communication and collaboration. First an
overview of models of Human robot collaboration and how they could be used to
develop a model for human robot collaboration is present. Next the current state of
human robot interaction is reviewed and how it fits into a model of humanoid robot
collaboration is explored. Finally, a holistic architecture Design human robot
collaboration using AR is presented.

1.7 GENERATION AND DEVELOPMENT


Rapid development of humanoid robots brings about new shifts of boundaries of
robotics as a scientific and technological discipline. New technologies of components,
sensors, microcomputers, as well as new materials, have recently removed the
obstacles to real-time integration control of some very complex dynamic systems such
as humanoid robots, which already today possess about fifty degrees of freedom and
are updated in microseconds of controller signals. In view of the above statements, the
work for first time raises the essential question on the justifiability of increasing the
number of degrees of freedom pf humanoid robots, having in mind that for the overall
skeletal activity man has at its disposal roughly about 650 muscles of human body

5
which could be approximately expressed by more than three hundreds equivalent
degrees of freedom, i.e., the same number of biological actuators.

The above-mentioned obstacles being taken down, along with the humanoid robots
playing mainly the role of communicators and entertainer, there have appeared
humanoids of quite different aspirations in the domain of manipulation locomotion
activities of humans . The work is also promoting some new ideas concurring the
already visible trends of expanding activities of humanoid robotics to cover the new
tasks.

1.8 TYPES OF HUMANOID ROBOT


Nowadays, robots do a lot of different tasks in many fields and the number of jobs
entrusted to robots is growing steadily. That’s why in my opinion one of the best ways
how to divide robots into types is a division by their by their application there are

INDUSTRIAL ROBOTS: Industrial robots are robots used in an industrial


manufacturing environment. Usually these are articulated arms specifically developed
for such applications are welding, material handling, handling, painting and others. If
we judge purely by applications this type could also include some automated guided
vehicle and robot.

DOMESTIC OR HOUSEHOLD ROBOTS: Robots used at home. This type of


robots include may quite different devices such as a robotic vacuum cleaner, robotic
pool cleaner, sweepers, gutter cleaner and other robots that can do different tasks.
Also, same surveillance and telepresence robots could regarded as household robot if
used in that environment.

MEDICAL ROBOTS: Robots used in medicine and medical institutions. First and
foremost- surgery robots. Also, some automated guided vehicles and maybe lifting
aids.

SERVICE ROBOTS: Robots that don’t fall into other types by usage. These could
be different data gathering robots, robots made to show off technologies, robots used
for research.

6
MILITARY ROBOTS: Robots used in military. This type of robots includes bomb
diffusion robots, different transportation robots. Often robots initially created for
military purposes can be in law enforcement and other fields.

SPACE ROBOTS: I’d like to single out robots used in space as a separate type. This
type would include robots used on the International Space Station, Canadarm that was
used in Shuttles, as well as Mars rovers and other robots used in space.

HOBBY AND COMPETITION ROBOTS: Robots that you create. Line followers,
sumo-bots, robots made just for fun and robots made for competition.

1.9 SCOPE OF PROJECT


It is expected that humanoids will change the way we interact with machines, and will
have the ability to blend perfectly into an environment already designed for humans.
The attention of the robotics community has been drawn more and more on humanoid
robots in the last years. This interest is not only motivated by the trend of designing
robots with human appearance, but also for the implications of their use in human
environments. They must be able to perform a wide range of different tasks in
partially or completely unknown environments. And, what is most interesting, they
must able to cooperate and probably communicate with humans in a variety of modes.
The development of such amount of different capabilities represents and ambitious
and attractive research field for many scientists. Robotics, therefore, extends the
frontiers of its application, whereby robots attain completely new functional structures
and forms of construction. Thus, for example, a pilotless aircraft is in fact a root-
aircraft, and automatically guided tank (vehicle) with controlled fire action on the
target, is again a robot of its kind; an automatically-guided torpedo is a submarine
robot; a cruise missile is a pilotless aircraft that can not only track the target that
should be destroyed, but, relying on artificial intelligence, detect it too.

7
CHAPTER 2
HARDWARE USED

2.1 ARDUINO MEGA


The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has
54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog
inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB
connection, a power jack, an ICSP header, and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with an AC-to-DC adapter or battery to get started. The Mega is
compatible with most shields designed for the Arduino Duemilanove or Diecimila.

Fig 2.1: Arduino mega 2560 board

2.1.1 TECHNICAL SPECIFICATIONS


Microcontroller ATmega2560
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 54 (of which 15 provide PWM output)
Analog Input Pins 16
DC Current per I/O Pin 20 Ma
DC Current for 3.3V Pin 50 Ma
Flash Memory 256 KB of which 8 KB used by bootloader

8
SRAM 8 KB
EEPROM 4 KB
Clock Speed 16 MHz
LED_BUILTIN 13
Length 101.52 mm
Width 53.3 mm
Weight 37 g

Table 2.1: Technical Specifications of Ardunio Mega2560

Fig. 2.2: Detailed diagram of ATmega board.

2.1.2 POWER SUPPLLY


The Arduino Mega2560 can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB) power
can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1mm centre-positive plug into the board's power jack.
Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER
connector. The board can operate on an external supply of 6 to 20 volts. If supplied
with less than 7V, however, the 5V pin may supply less than five volts and the board
may be unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts. The Mega2560 differs
from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial converter.

9
2.1.3 INPUT-OUTPUT PINS

Each of the 54 digital pins on the Mega can be used as an input or output, using
pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each
pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor
(disconnected by default) of 20-50 k-Ohms. In addition, some pins have specialized
functions:

Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and
16 (TX); Serial 3: 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX)
TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.

External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19


(interrupt 4), 20 (interrupt 3), and 21(interrupt 2). These pins can be configured to
trigger an interrupt on a low value, a rising or falling edge, or a change in value. See
the attach Interrupt() function for details.

PWM: 0 to 13. Provide 8-bit PWM output with the analogWrite() function.

SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI


communication, which, although provided by the underlying hardware, is not
currently included in the Arduino language. The SPI pins are also broken out on the
ICSP header, which is physically compatible with the Duemilanove and Diecimila.

LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.

I2C: 20 (SDA) and 21 (SCL). Support I2C (TWI) communication using the Wire
library (documentation on the Wiring website). Note that these pins are not in the
same location as the I2C pins on the Duemilanove.

The Mega2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e.
1024 different values). By default they measure from ground to 5 volts, though is it
possible to change the upper end of their range using the AREF pin and Analog
Reference () function.

10
2.1.4 PROGRAMMING
If you have an external programmer (e.g. an AVR-ISP, STK500, or parallel
programmer), you can burn sketches to the Arduino board without using the
bootloader. This allows you to use the full program space (flash) of the chip on the
Arduino board. So with an ATmega168, you'll get 16 KB instead of 14 (on
an ATmega8 you'll get 8 KB instead of 7). It also avoids the bootloader delay when
you power or reset your board. However you must have in mind that the Upload
Using Programmer procedure doesn't burn fuses so, if you have a fresh factory micro-
controller you have to burn the boot-loader first in order to have a properly working
device. This can be easily done in this way:

 Tools->Boards->Your Board
 Tools->Programmer->Your Programmer
 Sketch->Upload Using a Programmer

2.1.5 USB OVERCURRENT PROTECTION


The Arduino Mega has a resettable poly fuse that protects your computer's USB ports
from shorts and overcurrent. Although most computers provide their own internal
protection, the fuse provides an extra layer of protection. If more than 500 mA is
applied to the USB port, the fuse will automatically break the connection until the
short or overload is removed.

2.1.6 PHYSICAL CHARACTERISTICS AND SHIELD


COMPATIBILITY
The maximum length and width of the Mega PCB are 4 and 2.1 inches respectively,
with the USB connector and power jack extending beyond the former dimension.
Three screw holes allow the board to be attached to a surface or case. Note that the
distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the
100 mil spacing of the other pins.

The Mega is designed to be compatible with most shields designed for the Diecimila
or Duemilanove. Digital pins 0 to 13 (and the adjacent AREF and GND pins), analog
inputs 0 to 5, the power header, and ICSP header are all in equivalent locations.
Further the main UART (serial port) is located on the same pins (0 and 1), as are
11
external interrupts 0 and 1 (pins 2 and 3 respectively). SPI is available through the
ICSP header on both the Mega and Duemilanove / Diecimila.

2.2 VOICE CONTROL MECHANISM


2.2.1 INTRODUCTION
Voice Controlled Robot (VCR) is a mobile robot whose motions can be controlled by
the user by giving specific voice commands. The speech is received by a microphone
and processed by the voice module. When a command for the robot is recognized,
then voice module sends a command message to the robot’s microcontroller. The
microcontroller analyses the message and takes appropriate actions. The objective is
to design a walking robot which is controlled by servo motors. When any commands
are given on the transmitter, the Easy VR module will take the voice commands and
convert the voice commands into digital signals. Then these digital signals are
transmitted via ZIGBEE module to the robot. On the receiver side the other ZIGBEE
module receives the command from the transmitter side and then performs the
respective operations. The Hardware Development board used here is ATmega 2560
development board. In ATmega 2560 there are 15 PWM channels which are needed
to drive the servo motors. Addition to this there is camera which is mounted in the
head of the robot will give live transmission and recording of the area. The speech-
recognition circuit functions independently from the robot’s main intelligence [central
processing unit (CPU)]. This is a good thing because it doesn’t take any of the robot’s
main CPU processing power for word recognition. The CPU must merely poll the
speech circuit’s recognition lines occasionally to check if a command has been issued
to the robot. The software part is done in Arduino IDE using Embedded C. Hardware
is implemented and software porting is done.

2.2.2 VOICE CONTROL


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.
Speech is an ideal method for robotic control and communication. The speech
recognition circuit we will outline, functions independently form the robot’s main
intelligence [central processing unit (CPU)]. This a good thing because it doesn’t

12
takes any of the robots main CPU processing power for word recognition. The CPU
must merely poll the speech circuit’s 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 robot’s 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 circuit’s
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 robot’s 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 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.

2.2.3 USE OF BUILDING MODULE


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 labour 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
wouldn’t be able to program a welding robot to start counting parts in a bin. Today’s
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 hasn’t
made an appearance. Obviously there’s 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

13
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

2.2.4 TASK OF MODULE

The purpose of this project is to build a robotic car which could be controlled using
voice commands. Generally these kinds of systems are known as Speech Controlled
Automation Systems (SCAS). Our system will be a prototype of the same. We are not
aiming to build a robot which can recognize a lot of words. Our basic idea is to
develop some sort of menu driven control for our robot, where the menu is going to
be voice driven. What we are aiming at is to control the robot using following voice
commands. The robot can do these basic tasks:-
1. Move forward
2. Move back
3. Turn right
4. Turn left
5. Hands up
6. Hands down

Fig 2.3: Working Module Voice Control

2.2.5 SYSTEM DESCRIPTION


EXISTING SYSTEM:-
The Existing system is a speech recognizing system. Speech recognition is the process
of capturing spoken words using a microphone or telephone and converting them into

14
a digitally stored set of words. The quality of a speech recognition systems are
assessed according to two factors: its accuracy (error rate in converting spoken words
to digital data) and speed (how well the software can keep up with a human speaker).
Speech recognition technology has endless applications. Commonly, such software is
used for automatic translations, dictation, hands-free computing, medical
transcription, robotics, automated customer service, and much more. If you have ever
paid a bill over the phone using an automated system, you have probably benefited
from speech recognition software. Speech recognition technology has made huge
strides within the last decade. However, speech recognition has its weaknesses and
nagging problems. Current technology is a long way away from recognizing
conversational speech. Despite its shortcomings, speech recognition is quickly
growing in popularity. Within the next few years, experts say that speech recognition
will be the norm in phone networks the world over. Its spread will be aided by the fact
that voice is the only option for controlling automated services in places where touch
tone phones are uncommon.

VOICE CONTROLLED SYSTEM:-


While speech recognition is the process of converting speech to digital data, voice
recognition is aimed toward identifying the person who is speaking. Voice recognition
works by analysing the features of speech that differ between individuals. Everyone
has a unique pattern of speech stemming from their anatomy (the size and shape of
the mouth and throat) and behavioural patterns (their voice’s pitch, their speaking
style, accent, and so on). The applications of voice recognition are markedly different
from those of speech recognition. Most commonly, voice recognition technology is
used to verify a speaker’s identity or determine an unknown speaker’s identity.
Speaker verification and speaker identification are both common types of voice
recognition. Speaker verification is the process of using a person’s voice to verify
that they are who they say they are. Essentially, a person’s voice is used like a
fingerprint.

Once a sample of their speech is recorded, a person’s speech patterns are tested
against a database to see if their voice matches their claimed identity. Most
commonly, speaker verification is applied to situations where secure access is needed.
Such systems operate with the user’s knowledge and cooperation. Speaker

15
identification is the process of determining an unknown speaker’s identity. Unlike
speaker verification, speaker identification is usually convert and done without the
user’s knowledge.

2.2.6 DETAILED DESCRIPTION


TRANSMISSION SECTION:-
On the transmitter section, voice commands are given to the Android application. The
Android application will then take the voice commands convert it to text by using
inbuilt voice to text feature and compare it with the predefined voice commands (for
e.g.: “F”– forward, “B” – backward) and transmits those values according to the voice
commands in the form of binary. This binary information is then received by the
Microcontroller (ATmega 2560) and enters into the switch case. It will compare the
value with the cases and according to it the string with the command is transmitted via
BLUETOOTH module.

RECIEVER SECTION:-
On the receiver section, the binary data are received by the BLUETOOTH receiver
module, and it sends the binary values to the microcontroller (ATmega 2560). The
micro controller enters into the switch case and compares those string values with the
values in switch case. Then according to the string value it will drive the motors in a
continuous loop.

ALGORITHM:-
1. The voice commands are given to android application.
2. Then the stored voice commands are compared with the keywords stored in
program such as move forward – “F”, move backward – “B” etc.
3. These Strings are transmitted via BLUETOOTH module which is a transceiver in
form of binary data using serial communication (here transmitter is android
smartphone).
4. The transmitted binary values are then received by another BLUETOOTH module
which is present on the receiver side (here receiver is Bluetooth module HC-05).
5. Microcontroller will take those binary values and performs action (motors)
according to the binary values.

16
DISADVANTAGE:-
1. Even the best speech recognition systems sometimes make errors. If there is noise
or some other sound in the room (e.g. the television or a kettle boiling), the number of
errors will increase.
2. Speech Recognition works best if the microphone is close to the user (e.g. in a
phone, or if the user is wearing a microphone). More distant microphones (e.g. on a
table or wall) will tend to increase the number of errors.
3. No password protection.

2.3 BLUETOOTH MODULE


In today’s world wireless communication is one of the most important medium of
transmission of information from one device to other devices. In this technology, the
information can be transmitted through the air without requiring any cable or wires or
other electronic conductors, by using electromagnetic waves like IR, RF, satellite, etc.
The wireless communication technology refers to a variety of wireless communication
devices and technologies ranging from smart phones to computers, tabs, laptops,
Bluetooth Technology, printers. Bluetooth is a type of wireless communication used
to transmit voice and data at high speed using radio waves. It is used for short range
radio communications between many different types of devices, including mobile
phones, computers and other electronics device. Bluetooth module has a range of
around 10 meters and data transfer rate of 3 Mbps.

Fig2.4: Bluetooth Module

17
2.3.1 SPECIFICATIONS

Bluetooth is a global specification for a small form-factor, low-cost radio solution


providing links between computers, mobile phones, and other portable handheld
devices, as well as connectivity to the Internet. The Institute of Electrical and
Electronics Engineers (IEEE) has given the IEEE 802.15 standard. Its main strength is
its ability to simultaneously handle both data and voice transmissions. A mobile
computer equipped with Bluetooth technology, for example, could link to a similarly
equipped mobile phone to connect to the Internet. Multiple Bluetooth units form a
Wireless Personal Area Network, called and up to seven client devices. A Bluetooth
WPAN is capable of supporting an asynchronous data link with each client and
synchronous voice links with up to three client devices. It provides a range of up to
10m at a transmit power of 1 m watt. The range can be extended to 100m if the
transmit power is increased to 100 m watt. Bluetooth has a data rate of 1 Mbps.
Bluetooth is a standard for a small (9mm x 9mm) , cheap radio chip to be plugged into
computers, printers, mobile phones, etc. A Bluetooth chip takes the information
normally carried by the cable, and transmits it at a special frequency to a receiver.
Bluetooth chip, which will then give the information received to the computer, phone
whatever. Bluetooth offers the most economical solution for low-to-medium-speed
device connectivity. It aims at low power consumption and provides security for both
stationary and mobile devices. The basic function is to provide a standard wireless
technology to replace the multitude of propriety cables currently linking computing
devices.

2.3.2 WORKING TECHNOLOGY

A Bluetooth module is a short range device of around 10 meters which provides both
sound and data transmission. The Bluetooth transmits and receives at a frequency
band of 2.4 GHz which is globally available. The Bluetooth device uses an IEEE 802
standards where in the connections can be point-to-point or point-to-multipoint. The
data transfer rate is 3mbps and the maximum range of a Bluetooth device can be 10-
100 meters. The default baud rate is 9600 for communication mode and other
supported baud rates are 19200, 38400, 57600,115200,230400 and 460800. Bluetooth
can connect up to 8 devices simultaneously. It uses the spread spectrum technology in

18
which each device uses different frequency band and hence the devices do not
transmit at same time. When the two devices come in range with each other, the
transmission takes place between them.

Bluetooth Low Energy (BLE):-

Bluetooth low energy is a wireless personal area network technology designed and
marketed by the Bluetooth Special Interest Group aimed at novel applications in the
healthcare, fitness, beacons, security, and home entertainment industries. Compared to
Classic Bluetooth, Bluetooth Smart is intended to provide considerably reduced
power consumption and cost while maintaining a similar communication range.
Mobile operating systems including iOS, Android, Windows Phone and BlackBerry,
as well as OS X, Linux, and Windows 8, natively support Bluetooth Smart.

2.3.3 NETWORK TOPOLOGY


There are three types of connections in Bluetooth, single slave, multi-slave or scatter
net. Multiple Bluetooth devices form a piconet network that is a wireless personal
area network. A piconet consists of one hub device along with seven client devices. In
order to transmit or receive information with the client it should be in active mode.
Only seven clients can be active at a time. In a scatter net, the two piconets are not
synchronized (in terms of time and frequency). Each of them operates in its own
frequency band, multiple piconets can work simultaneously using frequency division
multiplexing.

Fig 2.5: Master-Slave Configuration

M – MASTER

S – SLAVE
19
2.3.4 INTERFACING WITH ARDUINO
Bluetooth HC-05 module interfacing with Arduino Mega 2560 board module
interfacing with Arduino board. Bluetooth HC-05 module can be easily interfaced
with Arduino mega board. Connections should be done as the schematic shown in
figure 2.6:

Fig 2.6: Interfacing with Arduino

Voltage divider is used to drop 5V to 3.3V. After the completion of the connections,
the red led on HC-05 Bluetooth Module will blink continuously indicating that device
is ready to pair. To pair the HC-05 Bluetooth module with computer

1. Go to the Bluetooth icon on computer, right click on Add a Device.

2. Search for new device to pair, Bluetooth module HC-05 will appear as HC-05.

3. Go to HC-05, click Ready to pair.

4. Enter the password as 1234.

5. Now after pairing is done we can program the Arduino microcontroller to send and
receive data. Once the pairing is done led on Bluetooth module will blink twice after
every 2sec.

2.3.5 POWER MODES AND SECURITY


Power modes: There are three power modes available for a bluetooth module.
They are sniff mode, hold mode and park mode. These modes are selected depending
upon the requirement for a Bluetooth device. In sniff mode, a device listens to a
piconet at a reduced rate. The sniff mode has a programmable interval which provides

20
flexibility for different applications. In hold mode only an interval timer is running
and data transfer starts again as the units transits out of hold mode. Park mode is used
in the case wherein seven clients can be active at any time.

Security: By default most of the devices operate in an unprotected environment.


The link established between two devices in order to exchange information with each
other there should provide authentication, this is achieved using encryption keys. This
key is known as PIN code, both the devices should have the same PIN code. By
default the PIN provided is “0000” or “1234”. After these PIN codes are entered, the
two devices are paired and hence now they can exchange information with each other.

2.3.6 FEATURES
1-Typical -80dBm sensitivity
2-Up to +4dBm RF transmit power
3-Low Power 1.8V Operation, 1.8 to 3.6V I/O
4-PIO control
5-UART interface with programmable baud rate
6-With integrated antenna
7-Default Baud rate: 38400, Data bits: 8, Stop bit:1, Parity: No parity, Data control:
has supported baud rate: 9600,19200,38400,57600,115200,230400,460800.

ADVANTAGES:-

1- Ease of use.
2- No LOS (Line of sight) required for data transfer.
3- Less power consumption makes its usage very practical.
4- 2.4 GHz radio frequency ensures worldwide operability.
5- The data rate is high i.e. around 3Mbp.

APPLICATIONS:-
1- Handheld device, music players, other electronic systems.
2- Wireless communication of devices like keyboard, mouse, printer, etc.
3- Wireless internet access using Bluetooth Dongle.
4- In medical field like

21
BLP -for blood pressure measurement. HTP - for medical temperature measurement
devices.
GLP -for blood glucose monitors.
CGMP -Continuous Glucose Monitor Profile

5- In sports field like


HRP –for devices which measure heart rate
LNP-Location and Navigation Profile
RSCP-Running Speed and Cadence Profile WSP-Weight Scale Profile

6- Short range data transfer

2.4 ULTRASONIC SENSOR


The HC-SR04 ultrasonic sensor uses SONAR to determine the distance of an object
just like the bats do. It offers excellent non-contact range detection with high accuracy
and stable readings in an easy to use package from 2 cm to 400 cm or 1” to 13 feet.
The operation is not affected by sunlight or black material, although acoustically, soft
materials like cloth can be difficult to detect. It comes complete with ultrasonic
transmitter and receiver module.

Fig 2.7: Ultrasonic sensor module

22
Ultrasonic sensors emit ultrasonic pulses that travel in a cone-shaped beam by using a
vibrating device known as a transducer, generating the ultrasonic wave. The
frequency of vibration of the transducer determines the range of an ultrasonic sensor.
The sound waves transmit for progressively shorter distances along with the
frequency increases. Conversely, the sound waves transmit for progressively longer
distances as the frequency decreases. Therefore, short-range ultrasonic sensors work
best at higher frequencies, while long-range ultrasonic sensors work best at lower
frequencies.

According to the application, ultrasonic sensors come in a variety of configurations


and typically use one or more transducers. If the ultrasonic sensor has multiple
transducers, you should consider the space between the transducers. The cone-shaped
beams emitted from each may cause unwanted interference if the transducers are
spaced too closely together. Blind zone is an unusable area that closes to the face of
the sensor. The sensor cannot accurately receive the echo if the beam completes a
detection cycle before the sensor completes its transmission.

Fig 2.8: Echo and trigger generation in ultrasonic sensor

2.4.1 Technical Specifications

 Power Supply − +5V DC


 Quiescent Current − <2mA
 Working Current − 15mA
 Effectual Angle − <15°
 Ranging Distance − 2cm – 400 cm/1″ – 13ft

23
 Resolution − 0.3 cm
 Measuring Angle − 30 degree

2.5 SERVOMOTOR

A Servo Motor is a small device that has an output shaft. This shaft can be
positioned to specific angular positions by sending the servo a coded signal. As
long as the coded signal exists on the input line, the servo will maintain the angular
position of the shaft. If the coded signal changes, the angular position of the shaft
changes. In practice, servos are used in radio-controlled airplanes to position
control surfaces like the elevators and rudders. They are also used in radio-
controlled cars, puppets, and of course, robots.

Fig 2.9: Servo motor

Servos are extremely useful in robotics. The motors are small, have built-in control
circuitry, and are extremely powerful for their size. A standard servo such as the
Futaba S-148 has 42 oz/inches of torque, which is strong for its size. It also draws
power proportional to the mechanical load. A lightly loaded servo, therefore, does
not consume much energy. The guts of a servo motor is shown in the following
picture. You can see the control circuitry, the motor, a set of gears, and the case.
You can also see the 3 wires that connect to the outside world. One is for power
(+5volts), ground, and the white wire is the control wire.

24
2.5.1 Working of a Servo Motor

The servo motor has some control circuits and a potentiometer (a variable resistor, aka
pot) connected to the output shaft. In the picture above, the pot can be seen on the
right side of the circuit board. This pot allows the control circuitry to monitor the
current angle of the servo motor. If the shaft is at the correct angle, then the motor
shuts off. If the circuit finds that the angle is not correct, it will turn the motor until it
is at a desired angle. The output shaft of the servo is capable of traveling somewhere
around 180 degrees. Usually, it is somewhere in the 210-degree range, however, it
varies depending on the manufacturer. A normal servo is used to control an angular
motion of 0 to 180 degrees. It is mechanically not capable of turning any farther due
to a mechanical stop built on to the main output gear. The power applied to the motor
is proportional to the distance it needs to travel. So, if the shaft needs to turn a large
distance, the motor will run at full speed. If it needs to turn only a small amount, the
motor will run at a slower speed. This is called proportional control.

How Do You Communicate the Angle at Which the Servo Should Turn?

The control wire is used to communicate the angle. The angle is determined by the
duration of a pulse that is applied to the control wire. This is called Pulse Coded
Modulation. The servo expects to see a pulse every 20 milliseconds (.02 seconds).
The length of the pulse will determine how far the motor turns. A 1.5 millisecond
pulse, for example, will make the motor turn to the 90-degree position (often called
as the neutral position). If the pulse is shorter than 1.5 milliseconds, then the motor
will turn the shaft closer to 0 degrees. If the pulse is longer than 1.5 milliseconds,
the shaft turns closer to 180 degrees.

25
Fig 2.10: pulse generation for rotation of servo motor

2.6 DC MOTORS
A DC motor is any of a class of electrical machines that converts direct current
electrical power into mechanical power. The most common types rely on the forces
produced by magnetic fields. Nearly all types of DC motors have some internal
mechanism, either electromechanical or electronic, to periodically change the
direction of current flow in part of the motor. Most types produce rotary motion; a
linear motor directly produces force and motion in a straight line. DC motors were the
first type widely used, since they could be powered from existing direct-current
lighting power distribution systems. A DC motors’ speed can be controlled over a
wide range, using either a variable supply voltage or by changing the strength of
current in its field windings. Small DC motors are used in tools, toys, and appliances.
The universal motor can operate on direct current but is a lightweight motor used for
portable power tools and appliances.

Larger DC motors are used in propulsion of electric vehicles, elevator and hoists, or in
drives for steel rolling mills. The advent of power electronics has made replacement
of DC motors with AC motors possible in many applications. A DC motor in simple
words is a device that converts direct current (electrical energy) into mechanical
energy. It's 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

26
need to first look into its constructional feature. The very basic construction of a dc
motor 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 electromagnet as shown in the figure 2.11.

Fig 2.11: Poles and working of DC motor

Now to go into the details of the operating principle of DC motor it's important that
we have a clear understanding of Fleming's left hand rule to determine the direction of
force acting on the armature conductors of dc motor.

Fig 2.12: DC Motor

Fleming left hand rule says that if we extend the index finger, middle finger and
thumb of our left hand in such a way that the current carrying conductor is placed in a
magnetic field (represented by the index finger) is perpendicular to the direction of
current (represented by the middle finger), then the conductor experiences a force in
the direction of field and the current in the conductor. For clear understanding the
principle of DC motor we have to determine the magnitude of the force. A portion of
a conductor of length L placed vertically in a uniform horizontal magnetic field

27
strength H, produced by two magnetic poles N and S. If I is the current flowing
through this conductor, the magnitude of the force acts on the conductor is

F=BiL …. (1)

2.6.1 PRINCIPLE OF OPERATION


To explain the variation of torque and the principle behind rotation of the motor let us
do a step wise analysis.

Step 1: Initially considering the armature is in its starting point or reference position
where the angle a=0. Since a=0, the term cos a=1, or the maximum value, hence
torque at this position is maximum given by:-

t= BILw. ….(2)

This high starting torque helps in overcoming the initial inertia of rest of the armature
and sets it into rotation.

Steps 2: Once the armature is set in motion, the angle a 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 degree from its initial position. Consequently the term cos
a decreases and also the value of torque. The torque in this case is given by

t=BIL w cos a …. (3)

which is less than BIL w when a is greater than 0 degree.

Steps 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., a=90 degree,
and as a result the term.

cos a=0 …. (4)

The torque acting on the conductor at this position is given by

t=Bilw.cos90=0 …. (5)

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

28
just enough to overcome this 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 its again.

2.7 BREAD BOARD


A breadboard is a construction base for prototyping of electronics. Originally it was
literally a bread board, a polished piece of wood used for slicing bread. Because the
solderless breadboard does not require soldering, it is reusable. This makes it easy to
use for creating temporary prototypes and experimenting with circuit design. For this
reason, solderless breadboards are also extremely popular with students and in
technological education. Older breadboard types did not have this property. A
stripboard (Vero board) and similar prototyping printed circuit boards, which are used
to build semi-permanent soldered prototypes or one-offs, cannot easily be reused. A
variety of electronic systems may be prototyped by using breadboards, from small
analog and digital circuits to complete central processing units (CPUs).

Fig 2.13: Breadboard

2.8 LCD MODULE


LCD stands for liquid crystal display. Character and graphical lcd's are most common
among hobbyist and DIY electronic circuit/project makers. Since their interface

29
serial/parallel pins are defined so its easy to interface them with many
microcontrollers. Many products we see in our daily life have lcd's with them. They
are used to show status of the product or provide interface for inputting or selecting
some process. Washing machine, microwave, air conditioners and mat cleaners are
few examples of products that have character or graphical lcd's installed in them.
Character lcd's come in many sizes 8x1, 8x2, 10x2, 16x1, 16x2, 16x4, 20x2, 20x4,
24x2, 30x2, 32x2, 40x2 etc. Many multinational companies like Philips, Hitachi, and
Panasonic make their own custom type of character lcd's to be used in their products.
All character lcd's performs the same functions (display characters numbers special
characters, ascii characters etc.).Their programming is also same and they all have
same 14 pins (0-13) or 16 pins (0 to 15)

Fig 2.14: LCD Module

2.8.1 44780 BACKGROUND

The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the
data bus. The user may select whether the LCD is to operate with a 4-bit data bus or
an 8-bit data bus. If a 4-bit data bus is used, the LCD will require a total of 7 data
lines (3 control lines plus the 4 lines for the data bus). If an 8-bit data bus is used, the
LCD will require a total of 11 data lines (3 control lines plus the 8 lines for the data
bus). The three control lines are referred to as EN, RS, and RW. The 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 first set this line high (1) 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 low (0) again. The 1-0 transition tells the 44780 to take

30
the data currently found on the other control lines and on the data bus and to treat it as
a command.

The 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 should be displayed on the
screen. For example, to display the letter "T" on the screen you would set RS high.

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

AN EXAMPLE HARDWARE CONFIGURATION:-

Example program for displaying ‘HELLOWORLD’ on LCD module

Library “LiquidCrystal.h” is used for easily controlling the LCD module using
Arduino board with the help of built in methods defined inside the library For
example, data string can be printed on the LCD module by merely calling a method
lcd.print(). If you want to print “Hello World” at row 1, starting from column 3; first
set the cursor at the desired position using method lcd.setCursor(1,3) and then write
the command to print the characters as lcd.print(“Hello World”); – got it? The library
is readily available with the Arduino IDE (as it’s a pre-installed standard library).
Any library can be accessed manually through the “Import library” in the “sketch” tab
in the main menu bar. The LiquidCrystal.h library provides functions/methods for
almost all applications like printing a string, setting the cursor, initializing the LCD,
scrolling the display, auto scroll, clear LCD, blink cursor etc.

The program to interface Ardunio to LCD is given below:-

31
#include<LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // sets the interfacing pins

void setup()

lcd.begin(16, 2); // initializes the 16x2 LCD

void loop()

lcd.setCursor(0,0); //sets the cursor at row 0 column 0

lcd.print("16x2 LCD MODULE"); // prints 16x2 LCD MODULE

lcd.setCursor(2,1); //sets the cursor at row 1 column 2

lcd.print("HELLO WORLD"); // prints HELLO WORLD

CURSOR POSITIONING:-

The above "Hello World" program is simplistic in the sense that it prints its text in the
upper left-hand corner of the screen. However, what if we wanted to display the word
"Hello" in the upper left-hand corner but wanted to display the word "World" on the
second line at the tenth character? This sounds simple--and actually, it is simple.
However, it requires a little more understanding of the design of the LCD.

The 44780 contains a certain amount of memory which is assigned to the display. All
the text we write to the 44780 is stored in this memory, and the 44780 subsequently
reads this memory to display the text on the LCD itself. This memory can be
represented with the following "memory map":

32
Fig 2.15: Memory Map

Thus, the first character in the upper left-hand corner is at address 00h. The following
character position (character #2 on the first line) is address 01h, etc. This continues
until we reach the 16th character of the first line which is at address 0Fh. However,
the first character of line 2, as shown in the memory map, is at address 40h. This
means if we write a character to the last position of the first line and then write a
second character, the second character will not appear on the second line. That is
because the second character will effectively be written to address 10h--but the
second line begins at address 40h.

Thus we need to send a command to the LCD that tells it to position the cursor on the
second line. The "Set Cursor Position" instruction is 80h. To this we must add the
address of the location where we wish to position the cursor. In our example, we said
we wanted to display "World" on the second line on the tenth character position.

PIN WISE DETAIL OF LCD:-

1. Vss GROUND

2. Vcc +5VOLT SUPPLY

3 Vee POWER SUPPLY TO CONTROL CONTRAST

4. RS RS = 0 TO SELECT COMMAND REGISTER

RS = 1 TO SELECT DATA REGISTER

5. R/W R/W = 0 FOR WRITE

R/W = 1 FOR READ

6 E ENABLE

7 DB0

8 DB1
33
9. DB2

10. DB3

11. DB4

12. DB5

13. DB6

14. DB7

15, 16 FOR BACK LIGHT DISPLAY

A 16X2 LCD has two registers, namely, command and data. The register select is
used to switch from one register to other. RS=0 for command register, whereas RS=1
for data register.

Command Register: The command register stores the command instructions given to
the LCD. A command is an instruction given to LCD to do a predefined task like
initializing it, clearing its screen, setting the cursor position, controlling display etc.
Processing for commands happen in the command register.

Data Register: The data register stores the data to be displayed on the LCD. The
data is the ASCII value of the character to be displayed on the LCD. When we send
data to LCD it goes to the data register and is processed there. When RS=1, data
register is selected.

2.8.3 IMPORTANT COMMAND CODES FOR LCD

Command to LCD
Sr.No. Hex Code instruction
Register

1 01 Clear display screen

34
2 02 Return home

Decrement cursor
3 04
(shift cursor to left)

Increment cursor
4 06
(shift cursor to right)

5 05 Shift display right

6 07 Shift display left

Display off, cursor


7 08
off

Display off, cursor


8 0A
on

Display on, cursor


9 0C
off

Display on, cursor


10 0E
blinking

Display on, cursor


11 0F
blinking

Shift cursor position


12 10
to left

Shift cursor position


13 14
to right

Shift the entire


14 18
display to the left

Shift the entire


15 1C
display to the right

35
Force cursor to
16 80
beginning ( 1st line)

Force cursor to
17 C0
beginning ( 2nd line)

2 lines and 5×7


18 38
matrix

Table 2.2: Command codes for LCD

2.9 TEMPERATURE SENSOR

2.9.1 LM35 Precision Centigrade Temperature Sensors:-


Description:-
The LM35 series are precision integrated-circuit temperature sensors, whose output
voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35
thus has an advantage over linear temperature sensors calibrated in ° Kelvin, as the
user is not required to subtract a large constant voltage from its output to obtain
convenient Centigrade scaling. The LM35 does not require any external calibration or
trimming to provide typical accuracies of ±1⁄4°C at room temperature and ±3⁄4°C
over a full −55 to +150°C temperature range. Low cost is assured by trimming and
calibration at the water level. The LM35’s low output impedance, linear output, and
precise inherent calibration make interfacing to readout or control circuitry especially
easy. It can be used with single power supplies, or with plus and minus supplies. As it
draws only 60 μA from its supply, it has very low self-heating, less than 0.1°C in still
air. The LM35 is rated to operate over a −55° to +150°C temperature range, while the
LM35C is rated for a −40° to +110°C range (−10°with improved accuracy). The
LM35 series is available packaged in hermetic TO-46 transistor packages, while
theLM35C, LM35CA, and LM35D are also available in the plastic TO-92 transistor

36
package. The LM35D is also available in an 8-lead surface mount small outline
package and a plastic TO-220 package.

Fig 2.16: Temperature Sensor

Features:-
 Calibrated directly in ° Celsius (Centigrade)
 Linear + 10.0 mV/°C scale factor
 0.5°C accuracy guarantee able (at +25°C)
 Rated for full −55° to +150°C range
 Suitable for remote applications
 Low cost due to wafer-level trimming
 Operates from 4 to 30 volts
 Less than 60 μA current drain
 Low self-heating, 0.08°C in still air
 Nonlinearity only ±1⁄4°C typical
 Low impedance output, 0.1 W for 1 mA load.

Typical Applications:-

Fig 2.17: Basic Centigrade Temperature Sensor (+2˚C to +150˚C)

37
2.9.2 BLOCK DIAGRAM

Fig 2.18: Internal Block diagram of temperature sensor

2.9.3 APPLICATIONS
The LM35 can be applied easily in the same way as other integrated-circuit
temperature sensors. It can be glued or cemented to a surface and its temperature will
be within about 0.01˚C of the surface temperature. This presumes that the ambient air
temperature is almost the same as the surface temperature; if the air temperature were
much higher or lower than the surface temperature, the actual temperature of the
LM35 die would be at an intermediate temperature between the surface temperature
and the air temperature. This is especially true for the TO-92 plastic package, where
the copper leads are the principal thermal path to carry heat into the device, so its
temperature might be closer to the air temperature than to the surface temperature.

38
Fig 2.19: LM35 Application Sample

To minimize this problem, be sure that the wiring to the LM35, as it leaves the device,
is held at the same temperature as the surface of interest. The easiest way to do this is
to cover up these wires with a bead of epoxy which will insure that the leads and
wires are all at the same temperature as the surface, and that the LM35 die’s
temperature will not be affected by the air temperature. The TO-46 metal package can
also be soldered to a metal surface or pipe without damage. Of course, in that case the
V− terminal of the circuit will be grounded to that metal. Alternatively, the LM35 can
be mounted inside a sealed-end metal tube, and can then be dipped into a bath or
screwed into a threaded hole in a tank. As with any IC, the LM35 and accompanying
wiring and circuits must be kept insulated and dry, to avoid leakage and corrosion.
This is especially true if the circuit may operate at cold temperatures where
condensation can occur. Printed-circuit coatings and varnishes such as Humiseal and
epoxy paints or dips are often used to insure that moisture cannot corrode the LM35
or its connections. These devices are sometimes soldered to a small light-weight heat
fin, to decrease the thermal time constant and speed up the response in slowly-moving
air. On the other hand, a small thermal mass may be added to the sensor, to give the
steadiest reading despite small deviations in the air temperature.

39
2.10 MOTOR DRIVER MODULE-L298N

2.10.1 INTRODUCTION

The L298N is an integrated monolithic circuit in a 15- lead Multi watt and
PowerSO20 packages. It is a high voltage, high current dual full-bridge driver de-
signed to accept standard TTL logic level sand drive inductive loads such as relays,
solenoids, DC and stepping motors. Two enable inputs are provided to enable or
disable the device independently of the in-put signals .The emitters of the lower
transistors of each bridge are connected together rand the corresponding external
terminal can be used for the connection of an external sensing resistor. An additional
Supply input is provided so that the logic works at a lower voltage.

Fig 2.20: L298N Motor Driver Module

Fig 2.21: Schematic Diagram for motor drive module

40
Features:-

1. High operating voltage, which can be up to 40 volts;


2. Large output current, the instantaneous peak current can be up to 3A;
3. With 25W rated power;
4. Two built in H-bridge, high voltage, large current, full bridge driver, which
can be used to drive DC motors, stepper motors, relay coils and other
inductive loads.
5. Using standard logic level signal to control.
6. Able to drive a two-phase stepper motor or four-phase stepper motor, and
two-phase DC motors.
7. Adopt a high-capacity filter capacitor and a freewheeling diode that protects
devices in the circuit from being damaged by the reverse current of an
inductive load, enhancing reliability
8. Drive voltage: 5-35V; logic voltage: 5V
9. PCB size: 4.2 x 4.2 cm

Pin Function:-
There are 4 input pins for l298N, pin 5, 7 and pin 10, 12 shown on the pin diagram.
Left input pins will regulate the rotation of motor connected across left side and right
input for motor on the right hand side. The motors are rotated on the basis of the
inputs provided across the input pins as LOGIC 0 or LOGIC 1. In simple you need to
provide Logic 0 or 1 across the input pins for rotating the motor.

Fig 2.22: Pin Diagram of L289N Module

41
2.10.2 PIN DETAIL OF L289N MODULE

MW.15 Name Function


1;15 Sense A; Sense Between this pin and ground is connected the sense
B resistor to control the current of the load.
2;3 Out 1; Out 2 Outputs of the Bridge A; the current that flows
through the load connected between these two pins is
monitored at pin 1.
4 Vs Supply Voltage for the Power Output Stages. A non-
inductive 100nF capacitor must be connected between
this pin and ground.
5;7 Input 1; Input 2 TTL Compatible Inputs of the Bridge A.
6;11 Enable A; TTL Compatible Enable Input: the L state disables the
Enable B bridge A (enable A) and/or the bridge B (enable B).
8 GND Ground.
9 VSS Supply Voltage for the Logic Blocks. A100nF
capacitor must be connected between this pin and
ground.
10;12 Input 3; Input 4 TTL Compatible Inputs of the Bridge B.
13;14 Out 3; Out 4 Outputs of the Bridge B. The current that flows
through the load connected is monitored at pin 15.

Table 2.3: Pin Details of L289N Module

2.10.3 WORKING

The L298 uses two different supply voltages. The voltage on pin 9 powers the chip
itself and should be 5 volts. The voltage on pin 4 supplies the motors, and it can be up
to 46 volts. For controlling the motors, Motor1. In order to activate the motor, the
Enable1 line must be HIGH. You then control the motor and its direction by applying
a LOW or HIGH signal to the Input1 and Input2 lines, as shown in this table.

42
Input1 Input2 Action
LOW LOW Motor breaks and stops*
HIGH LOW Motor turns forward
LOW HIGH Motor turns backward
HIGH HIGH Motor breaks and stops*

* To coast a motor to a slower stop, apply a LOW signal to the Enable1 line. The
L298 does not have built-in protection diodes, so you’ll need to add those. The
datasheet for the L298 specifies “fast recovery” 1-amp diodes; an inexpensive
selection is the 1N4933, available from most online electronic parts outlets.

2.11 LM2596 BUCK CONVERTER MODULE

2.11.1 INTRODUCTION

DC-DC Buck Converter Step Down Module LM2596 Power Supply is a step-
down (buck) switching regulator, capable of driving a 3-A load with excellent line
and load regulation. These devices are available in fixed output voltages of 3.3 V, 5
V, 12 V, and an adjustable output version. The LM2596 series operates at a switching
frequency of 150 kHz, thus allowing smaller sized filter components than what would
be required with lower frequency switching regulators.

A buck converter (step-down converter) is a DC-to-DC power converter which steps


down voltage (while stepping up current) from its input (supply) to its output (load). It
is a class of switched-mode power supply (SMPS) typically containing at least two
semiconductors (a diode and a transistor, although modern buck converters frequently
replace the diode with a second transistor used for synchronous rectification) and at
least one energy storage element, a capacitor, inductor, or the two in combination. To
reduce voltage ripple, filters made of capacitors (sometimes in combination with
inductors) are normally added to such a converter's output (load-side filter) and input
(supply-side filter). Switching converters (such as buck converters) provide much
greater power efficiency as DC-to-DC converters than linear regulators, which are
simpler circuits that lower voltages by dissipating power as heat, but do not step up
output current. Buck converters can be highly efficient (often higher than 90%),
making them useful for tasks such as converting a computer's main (bulk) supply
43
voltage (often 12 V) down to lower voltages needed by USB, DRAM and the CPU
(1.8 V or less).

Fig 2.23: LM2596 Power Supply Module

SPECIFICATIONS:-

 Conversion efficiency: 92%(highest)

 Switching frequency: 150KHz

 Output ripple: 30mA9maximum)

 Load Regulation: ± 0.5%

 Voltage Regulation: ± 0.5%

 Dynamic Response speed: 5% 200uS

 Input voltage:4.75-35V

 Output voltage:1.25-26V(Adjustable)

 Output current: Rated current is 2A,maximum 3A(Additional heat sink is


required)

 Conversion Efficiency: Up to 92% (output voltage higher, the higher the


efficiency)

 Switching Frequency: 150KHz

 Rectifier: Non-Synchronous Rectification

 Module Properties: Non-isolated step-down module (buck)

 Short Circuit Protection: Current limiting, since the recovery

44
 Operating Temperature: Industrial grade (-40 to +85 ) (output power 10W or
less)

2.11.2 WORKING

The basic operation of the buck converter has the current in an inductor controlled by
two switches (usually a transistor and a diode). In the idealised converter, all the
components are considered to be perfect. Specifically, the switch and the diode have
zero voltage drop when on and zero current flow when off, and the inductor has zero
series resistance. Further, it is assumed that the input and output voltages do not
change over the course of a cycle (this would imply the output capacitance as being
infinite).

The conceptual model of the buck converter is best understood in terms of the relation
between current and voltage of the inductor. Beginning with the switch open (off-
state), the current in the circuit is zero. When the switch is first closed (on-state), the
current will begin to increase, and the inductor will produce an opposing voltage
across its terminals in response to the changing current. This voltage drop counteracts
the voltage of the source and therefore reduces the net voltage across the load. Over
time, the rate of change of current decreases, and the voltage across the inductor also
then decreases, increasing the voltage at the load. During this time, the inductor stores
energy in the form of a magnetic field. If the switch is opened while the current is still
changing, then there will always be a voltage drop across the inductor, so the net
voltage at the load will always be less than the input voltage source. When the switch
is opened again (off-state), the voltage source will be removed from the circuit, and
the current will decrease. The decreasing current will produce a voltage drop across
the inductor (opposite to the drop at on-state), and now the inductor becomes a
Current Source. The stored energy in the inductor's magnetic field supports the
current flow through the load. This current, flowing while the input voltage source is
disconnected, when concatenated with the current flowing during on-state, totals to
current greater than the average input current (being zero during off-state). The
"increase" in average current makes up for the reduction in voltage, and ideally
preserves the power provided to the load. During the off-state, the inductor is

45
discharging its stored energy into the rest of the circuit. If the switch is closed again
before the inductor fully discharges (on-state), the voltage at the load will always be
greater than zero.

Fig 2.24: Two States of Buck Converter

46
CHAPTER 3
FACE DETECTION USING MATLAB

3.1 INTRODUCTION
Face detection is the problem of determining whether a sub-window of an image
contains a face. Several applications, such as face processing (i.e. face, expression,
and gesture recognition), computer human interaction, human crowd surveillance,
biometric, video surveillance, artificial intelligence and content-based image retrieval.
All of these applications, stated above, require face detection, which can be simply
viewed as a pre-processing step, for obtaining the “object”. In other words, many of
the techniques are proposed for these applications assume that, the location of the face
is pre-identified and available for the next step. First problem is come in the way of
face detection, is chosen proper colour model for skin colour segmentation. There are
several colour models and each has specific work field and strength. We used four
colour models for skin colour segmentation, these are RGB, YCbCr , HSV, and LAB
colour models. After skin like pixels detection, we convert this segmented image into
binary form. This binary image contains skin regions, but we don’t know that, where
is human face in segmented image. Next step of face detection after segmentation is
based on knowledge of human face. Work of next step is to remove nonhuman face
skin area from segmented image, by using Knowledge-based methods or human face
features. In this paper, we are describing our algorithm in three section, section 1
presents ‘Skin colour segmentation‟, while section 2 presents ‘Binary image
formation‟ and section 3 presents ‘Rejection of non-face regions. Below figure is
showing the flowchart of our proposed algorithm. Face-detection algorithms focus on
the detection of frontal human faces. It is analogous to image detection in which the
image of a person is matched bit by bit. Image matches with the image stores in
database. Any facial feature changes in the database will invalidate the matching
process.

A reliable face-detection approach based on the genetic algorithm and the Eigen-
face technique

47
Firstly, the possible human eye regions are detected y testing all the valley regions in
the gray-level image. Then the genetic algorithm is used to generate all the possible
face regions which include the eyebrows, the iris, the nostril and the mouth corners.

Each possible face candidate is normalized to reduce both the lightning effect, which
is caused by uneven illumination; and the shirring effect, which is due to head
movement. The fitness value of each candidate is measured based on its projection on
the Eigen-faces. After a number of iterations, all the face candidates with a high
fitness value are selected for further verification. At this stage, the face symmetry is
measured and the existence of the different facial features is verified for each face
candidate.

3.2 METHOD FOR FACE DETECTION


3.2.1 HAAR LIKE FEATURE FOR FACE DETECTION
T Ning Jiang, Wenxin Yu, Shaopeng Tang, Satoshi Gotoet proposed to improve the
performance on Haar feature based cascade detector. First, we define a new feature
for cascade detector. That feature was called Separate Haar Feature. Second, they
defined a new decision algorithm in cascade detection to develop the detection rate.
There are following three key conditions. The first is “Separate Haar Feature”, which
adds a don’t-care area between the rectangles of Haar Feature. The second is the
algorithm for selecting the best width for this don’t care area. Finally, proposed a new
decision algorithm which makes the decision by not only a stage result in cascade
detection process to develop the detection rate. In this cascade algorithm, when an
image was rejected by any stage, it is not calculated in the left stages. This cascade
algorithm can discard the background images rapidly, but once a wrong detection
occurs in one stage, this wrong detection will occurs in the detection. Then we
proposed to use the results of the front stages to extend the current stage threshold.
This cascade algorithm is good for discarding the background images rapidly, but it
also discards the face images when a wrong detection occurs in any stage. They want
to use more information to do the decision. They proposed to save the value distance
between stage value and threshold of the front stages which is detected and accepted
in and using this message together with the threshold and value in the current stage to
do the decision. They have two proposals to improve the detector. In the first

48
proposal, improve the feature extraction part to extract powerful feature value. And
second, improve the cascade decision algorithm by adding more messages from front
stages results to do the stage decision. Area of face to recognize. In this case, the
majority cameras are installed in front of a door and the person to be recognized is
required to stand at a precise position so the face of the person should be acquired
correctly. As a result, the face in the image taken is well positioned and the size is big
enough not only for detection but for recognition. The second case simulates face
detection used for a surveillance system. Detecting faces and analysing the activity is
one of the important functions for intelligent surveillance. In this problem, faces are
relatively far from the camera and the pose and angle of the face can’t be guaranteed
to be at a certain range. In that sense, the face detection should deal with small faces
with arbitrary pose and in-place rotation. Important conditions for the face detection
problem that can be identified easily by users are investigated and the architecture for
the language model based on these conditions was developed. The problem of
selecting algorithms and deciding complicated parameters for algorithms are isolated
from development with the proposed language model.

Fig. 3.1: Haar features used for face detection

49
FLOW CHART OF FACE DETECTION

Fig 3.2: Flow Chart of Face Detection

3.3 HARDWARE/ SOFTWARE USED FOR FACE


DETECTION
WEBCAM:-

A webcam is a video camera that feeds or streams its image in real time to or through
a computer to a computer network. When "captured" by the computer, the video
stream may be saved, viewed or sent on to other networks via systems such as the
internet, and emailed as an attachment. When sent to a remote location, the video
stream may be saved, viewed or on sent there. Unlike an IP camera (which connects
using Ethernet or Wi-Fi), a webcam is generally connected by a USB cable, or similar
cable, or built into computer hardware, such as laptops.

The term "webcam" (a clipped compound) may also be used in its original sense of
a video camera connected to the Web continuously for an indefinite time, rather than
for a particular session, generally supplying a view for anyone who visits its web
page over the Internet. Some of them, for example, those used as online traffic
cameras, are expensive, rugged professional video cameras.

50
Fig 3.3: Webcam used for project

MATLAB:-
MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment.
A proprietary programming language developed by MathWorks, MATLAB allows
matrix manipulations, plotting of functions and data, implementation of algorithms,
creation of user interfaces, and interfacing with programs written in other languages,
including C, C++, C#, Java, Fortran and Python. Although MATLAB is intended
primarily for numerical computing, an optional toolbox uses the MuPAD symbolic
engine, allowing access to symbolic computing abilities. An additional package,
Simulink, adds graphical multi-domain simulation and model-based design for
dynamic and embedded systems.

51
CHAPTER 4

BASIC COMPONENTS USED

4.1 RESISTOR

4.1.1 INTRODUCTION

A resistor is a passive two-terminal electrical component that implements electrical


resistance as a circuit element. In electronic circuits, resistors are used to reduce
current flow, adjust signal levels, to divide voltages, bias active elements, and
terminate transmission lines, among other uses. High-power resistors that can
dissipate many watts of electrical power as heat may be used as part of motor
controls, in power distribution systems, or as test loads for generators. Fixed resistors
have resistances that only change slightly with temperature, time or operating voltage.
Variable resistors can be used to adjust circuit elements (such as a volume control or a
lamp dimmer), or as sensing devices for heat, light, humidity, force, or chemical
activity. Resistors are common elements of electrical networks and electronic circuits
and are ubiquitous in electronic equipment. Practical resistors as discrete components
can be composed of various compounds and forms. Resistors are also implemented
within integrated circuits. The electrical function of a resistor is specified by its
resistance: common commercial resistors are manufactured over a range of more than
nine orders of magnitude. The nominal value of the resistance falls within the
manufacturing tolerance, indicated on the component.

4.1.2 ELECTRONICS SYMBOLS AND NOTATION

Two typical schematic diagram symbols are as follows:

Fig 4.1: (a) resistor, (b) rheostat (variable resistor), and (c) potentiometer)

52
4.1.3 THEORY OF OPERATION

The hydraulic analogy compares electric current flowing through circuits to water
flowing through pipes. When a pipe (left) is clogged with hair (right), it takes a larger
pressure to achieve the same flow of water. Pushing electric current through a large
resistance is like pushing water through a pipe clogged with hair: It requires a larger
push (voltage) to drive the same flow (electric current).

Fig 4.2: Resistance Operation

Ohm's law

The behavior of an ideal resistor is dictated by the relationship specified by Ohm's


law: Ohm's law states that the voltage (V) across a resistor is proportional to the
current (I), where the constant of proportionality is the resistance (R). For example, if
a 300 ohm resistor is attached across the terminals of a 12 volt battery, then a current
of 12 / 300 = 0.04 amperes flows through that resistor. Practical resistors also have
some inductance and capacitance which affect the relation between voltage and
current in alternating current circuits. The ohm (symbol: Ω) is the SI unit of electrical
resistance, named after Georg Simon Ohm. An ohm is equivalent to a volt per
ampere. Since resistors are specified and manufactured over a very large range of
values, the derived units of milliohm (1 mΩ = 10−3 Ω), kilo ohm (1 kΩ = 103 Ω), and
mega ohm (1 MΩ = 106 Ω) are also in common usage.

4.1.4 SERIES AND PARALLEL RESISTORS


The total resistance of resistors connected in series is the sum of their individual
resistance values.

53
Fig 4.3: Resistance in Series

The total resistance of resistors connected in parallel is the reciprocal of the sum of
the reciprocals of the individual resistors.

Fig 4.4: Resistance in Parallel

For example, a 10 ohm resistor connected in parallel with a 5 ohm resistor and a 15
ohm resistor produces 1/1/10 + 1/5 + 1/15 ohms of resistance, or 30/11 = 2.727 ohms.
A resistor network that is a combination of parallel and series connections can be
broken up into smaller parts that are either one or the other. Some complex networks
of resistors cannot be resolved in this manner, requiring more sophisticated circuit
analysis. Generally, the Y-Δ transform, or matrix methods can be used to solve such
problems.

4.2 CAPACITOR

4.2.1 INTRODUCTION

A capacitor is a passive two-terminal electrical component that stores electrical


energy in an electric field. The effect of a capacitor is known as capacitance. While
capacitance exists between any two electrical conductors of a circuit in sufficiently
close proximity, a capacitor is specifically designed to provide and enhance this effect

54
for a variety of practical applications by consideration of size, shape, and positioning
of closely spaced conductors, and the intervening dielectric material. A capacitor was
therefore historically first known as an electric condenser. The physical form and
construction of practical capacitors vary widely and many capacitor types are in
common use. Most capacitors contain at least two electrical conductors often in the
form of metallic plates or surfaces separated by a dielectric medium. A conductor may
be a foil, thin film, sintered bead of metal, or an electrolyte. The non-conducting
dielectric acts to increase the capacitor's charge capacity. Materials commonly used as
dielectrics include glass, ceramic, plastic film, paper, mica, and oxide layers.
Capacitors are widely used as parts of electrical circuits in many common electrical
devices. Unlike a resistor, an ideal capacitor does not dissipate energy.

When two conductors experience a potential difference, for example, when a


capacitor is attached across a battery, an electric field develops across the dielectric,
causing a net positive charge to collect on one plate and net negative charge to collect
on the other plate. No current actually flows through the dielectric, however, there is a
flow of charge through the source circuit. If the condition is maintained sufficiently
long, the current through the source circuit ceases. However, if a time-varying voltage
is applied across the leads of the capacitor, the source experiences an ongoing current
due to the charging and discharging cycles of the capacitor.

Capacitance is defined as the ratio of the electric charge on each conductor to the
potential difference between them. The unit of capacitance in the International System
of Units (SI) is the farad (F), defined as one coulomb per volt (1 C/V). Capacitance
values of typical capacitors for use in general electronics range from about 1 pF
(10−12 F) to about 1 mF (10−3 F).

The capacitance of a capacitor is proportional to the surface area of the plates


(conductors) and inversely related to the gap between them. In practice, the dielectric
between the plates passes a small amount of leakage current. It has an electric field
strength limit, known as the breakdown voltage. The conductors and leads introduce
an undesired inductance and resistance.

Capacitors are widely used in electronic circuits for blocking direct current while
allowing alternating current to pass. In analog filter networks, they smooth the output

55
of power supplies. In resonant circuits they tune radios to particular frequencies. In
electric power transmission systems, they stabilize voltage and power flow. The
property of energy storage in capacitors was exploited as dynamic memory in early
digital computers.

Fig 4.5: Capacitors

4.3 BUZZER

4.3.1 INTRODUCTION

A buzzer is a small yet efficient component to add sound features to our


project/system. It is very small and compact 2-pin structure hence can be easily used
on breadboard, Perf Board and even on PCBs which makes this a widely used
component in most electronic applications.

There are two types are buzzers that are commonly available. The one shown here is a
simple buzzer which when powered will make a Continuous Beep sound, the other
type is called a readymade buzzer which will look bulkier than this and will produce a
Beep. Beep. Beep. Sound due to the internal oscillating circuit present inside it. But,
the one shown here is most widely used because it can be customized with help of
other circuits to fit easily in our application.

This buzzer can be used by simply powering it using a DC power supply ranging from
4V to 9V. A simple 9V battery can also be used, but it is recommended to use a

56
regulated +5V or +6V DC supply. The buzzer is normally associated with a switching
circuit to turn ON or turn OFF the buzzer at required time and require interval.

Fig 4.6: Buzzer

4.3.2 BUZZER PIN CONFIGURATION

Pin
Pin Name Description
Number

Identified by (+) symbol or longer terminal lead.


1 Positive
Can be powered by 6V DC

Identified by short terminal lead. Typically


2 Negative
connected to the ground of the circuit

Table 4.1: Pin Configuration

4.3.3 BUZZER FEATURES

 Rated Voltage: 6V DC
 Operating Voltage: 4-8V DC
 Rated current: <30mA
 Sound Type: Continuous Beep

57
 Resonant Frequency: ~2300 Hz
 Small and neat sealed package
 Breadboard and Perf board friendly

4.3.4 APPLICATIONS OF BUZZER

 Alarming Circuits, where the user has to be alarmed about something


 Communication equipment’s
 Automobile electronics
 Portable equipment’s, due to its compact size

4.4 LM2596 VOLTAGE REGULATOR

4.4.1 INTRODUCTION

The LM2596 series of regulators are monolithic integrated circuits that provide all the
active functions for a step-down (buck) switching regulator, capable of driving a 3-A
load with excellent line and load regulation. These devices are available in fixed
output voltages of 3.3 V, 5 V, 12 V, and an adjustable output version. Requiring a
minimum number of external components, these regulators are simple to use and
include internal frequency compensation, and a fixed frequency oscillator.

The LM2596 series operates at a switching frequency of 150 kHz, thus allowing
smaller sized filter components than what would be required with lower frequency
switching regulators. Available in a standard 7-pin TO-220 package with several
different lead bend options, and a 7-pin TO-263 surface mount package.

Fig 4.7: LM2596 Voltage Regulator IC

58
4.4.2 FEATURES
 3.3-V, 5-V, 12-V, and Adjustable Output Versions

 Adjustable Version Output Voltage Range: 1.2-V to 37-V ± 4% Maximum Over


Line and Load Conditions

 Available in TO-220 and TO-263 Packages

 3-A Output Load Current

 Input Voltage Range Up to 40 V

 150-kHz Fixed-Frequency Internal Oscillator

 High Efficiency

 Uses Readily Available Standard Inductors

4.4.3 APPLICATIONS
• Simple High-Efficiency Step-Down (Buck) Regulator

• On-Card Switching Regulators

• Positive to Negative Converter

59
CHAPTER 5

RESULT & CONCLUSION


5.1 RESULT
Using an Arduino mega2560, we were able to implement some code to ensure proper
function. The code took an analog voltage from the sensor and calculated the distance
of the nearest object based off of this voltage. After running our code and moving
objects in front of sensor, we found the sensor had a 90% accuracy between 6 and 20
inches. Testing the motor operation with every combination of input, we found that the
motors behaved as expected. Each motor was able to turn, change directions, and stop
on command independent to the current operation of the other motor.

We found that the microcontroller program used in the completed project was able to
print what commands were sent to it by the Android device as well as outputs the
corresponding signals to the motor pins on the robot. We verified that the Android app
was able to send commands to the robot, and was able to successfully connect and
disconnect from the microcontroller. Due to the microcontroller’s inability to properly
read the sensor data, the Android app was unable to report correct sensor data. The face
detection using webcam was implemented successfully. However at some time interval
the detection was not possible either due to camera resolution, incomplete face
exposure or improper lights

5.2 CONCLUSION
Accomplishments: The completed project is a small land-based robot that can be
controlled from an Android app using a BLUETOOTH connection. The app allows the
user to send commands to the robot for moving forward and backwards, turning left
and right, and stopping. In addition, we have designed and implemented a well-tested
face detection algorithm in MATLAB.

Ethical Considerations: The original design has some ethical considerations


pertaining to the use of the video camera. It was possible for the camera to be used to
record someone without his/her consent, which could have potentially been used for
damaging a person’s reputation. Since the video camera didn’t make it into the
completed project, there aren’t any ethical considerations relevant to the completed

60
project. A small land-based remote control robot cannot be used to significantly harm
others.

Future Work: The most immediate future work that could be done for the project is
debugging and finishing the implementation of a two-way data connection between the
Android device and the robot. After a reliable connection is established, further
debugging would have to be done to ensure that correct data is coming from the wheel
encoders and the ultrasonic distance sensor. Once that is completed, the mapping
algorithm could be properly tested and debugged using the completed robot. There are
many potential additional features for the project. They include:

• Adding the video camera to the robot and streaming video data to be displayed on
the Android app (as per the original design).
• Fixing the low battery circuit and implementing a low battery warning to be
displayed on the Android app (also as per the original design).
• Implementing basic motion detection when the robot is stationary using the video
data. This could be done with image processing between frames of the video feed.
If a significant difference between the frames is detected, the robot could output a
notification to the user’s Android device.
• Some sort of system to identify friend from foe. This could be in the form of an
RFID tag or a Bluetooth device that an authorized person would wear or keep in
their pocket.
• Two-way voice communication between the robot and the Android app.
• Controls on the Android app to fire NERF darts. This could be expanded to fire
NERF darts at detected intruders.

In future upgradation the robot will be designed to deliver a reasonable level of


efficiency and simplicity, providing each user with a streamlined user experience. The
robot is aimed at providing monitoring inclusive of vision, motion, fire, and carbon
monoxide with limited setup. The surveillance robot can be customized to fuse
seamlessly to any home, apartments or multi-dwelling units apart from military
operations. Based on modular designs and complete scalability, the robot will be
designed to be expandable and allow for future home control, covert operations
upgrades, thus enhancing the protection of our army men and least causalities.

61

You might also like