You are on page 1of 81

A

Mini Project Report on

SMART BLIND STICK

Submitted for partial fulfillment of the requirements for the award of the degree of

BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
by
ALLAMPALLY SAITEJASWINI 19K81A04J3
BHUPATHI RAKESH 19K81A04J5
BORAPUREDDI AJAY KUMAR 19K81A04J6
GATTU VAISHNAVI 19K81A04K1

Under the Guidance of


Mr. G. RAMESH, M. Tech
Assistant Professor

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

St. MARTIN’S ENGINEERING COLLEGE


UGC Autonomous
Affiliated to JNTUH, Approved by AICTE,
Accredited by NBA & NAAC A+, ISO 9001: 2008 Certified
Dhulapally, Secunderabad – 500100.

NOVEMBER-2022
St. MARTIN’S ENGINEERING COLLEGE
An Autonomous Institute
NBA & NAAC A+ Accredited Dhulapally, Secunderabad-500100

DECLARATION

We, the students of Bachelor of Technology in Department of Electronics and


Communication Engineering, session: 2019-2023, St. Martin’s Engineering College,
Dhulapally, Kompally, Secunderabad hereby declare that the work presented in this
project entitled ‘SMART BLIND STICK’ is the outcome of our own bonafide work and it is
correct to the best of our knowledge and this work has been undertaken taking care of
Engineering Ethics. The result embodied in this project report has not been submitted in any
university for award of any degree.

ALLAMPALLY SAITEJASWINI 19K81A04J3


BHUPATHI RAKESH 19K81A04J5
BORAPUREDDI AJAY KUMAR 19K81A04J6
GATTU VAISHNAVI 19K81A04K1
St. MARTIN’S ENGINEERING COLLEGE
An Autonomous Institute
NBA & NAAC A+ Accredited Dhulapally, Secunderabad-500100

CERTIFICATE
This is to certify that the mini project entitled ‘SMART BLIND STICK’ is being
submitted by ALLAMPALLY SAITEJASWINI 19K81A04J3, BHUPATI RAKESH
19K81A04J5, BORAPUREDDI AJAY KUMAR 19K81A04J6, GATTU VAISHNAVI
19K81A04K1 in partial fulfillment of the requirement for the award of degree of
BACHELOR OF TECHNOLOGY in Electronics and Communication
Engineering. It is a record of bonafide work carried out by them. The result embodied in
this report has been verified and found satisfactory.

Project Guide Head of the Department


Mr. G. RAMESH Dr. B. Hari Krishna
Assistant Professor Professor & HOD

Internal Examiner External Examiner


ACKNOWLEDGEMENT

The satisfaction and euphoria that accompanies the successful completion of


any task would be incomplete without the mention of the people who made it
possible and whose encouragement and guidance have crowded our efforts with
success.

We extend our deep sense of gratitude to Principal, Dr. P. SANTOSH


KUMAR PATRA, St. Martin’s Engineering College, Dhulapally,
Secunderabad for permitting us to undertake this project.

We are also thankful to Professor Dr. B. HARI KRISHNA, Head of the


Department, Electronics and Communication Engineering, St. Martin’s
Engineering College, Dhulapally, Secunderabad for his support and guidance
throughout our project as well as Project Coordinator Mr. G. RAMESH,
Assistant Professor, Electronics and Communication Engineering for his
valuable support.

We would like to express our sincere gratitude and indebtedness to our project
guide Mr. G. RAMESH, Associate Professor, Department of Electronics and
Communication Engineering, St. Martins Engineering College, Dhulapally for
his support and guidance throughout our project.

Finally, we express our sincere thanks to all those who have helped us for
successful completion of the project. Furthermore, we would like to thank our
family and friends for their moral support and encouragement.

ALLAMPALLY SAITEJASWINI 19K81A04J3


BHUPATHI RAKESH 19K81A04J5
BORAPUREDDI AJAY KUMAR 19K81A04J6
GATTU VAISHNAVI 19K8A0A04K1

i
ABSTRACT

In this project, we build a smart blind stick for visually impaired students with multiple
Sensors like Ultrasonic sensor for detecting range and object, Fire Sensor which detects the
fire, Water Sensor is for detect drainage. For the alerting purpose we used but voice module
for auto sound detection. These are very useful for blind people. This device automatically
senses the presence of obstacles and water in its path and helps blind people in deviate their
direction of movement through messages using alarm module. The obstacle detection
mechanism is done by an ultrasonic sensor and water sensors to find the presence of an
obstacle in its path. This device is designed in such a way that there is no requirement of
manual attention towards it. It makes use of the obstacle detection sensors, fire sensor and
water sensor to detect the obstacle, fire and water present in its alert through voice messages.
The system provided with a voice module using which messages are announced out.

ii
CONTENTS
i
Acknowledgement ii
v
Abstract
vii
List of figures
List of acronyms and definitions
1
1
1. INTRODCTION TO EMBEDDED SYSTEM
2
1.1. Embedded System Introduction
2
1.2. A Modern example Of Embedded System
3
1.2.1. History
3
1.2.2. Tools 4
1.2.3. Resources 4
1.2.4. Real Time Issues 4
1.3. Need Of Embedded System 5
1.3.1. Debugging 6

1.3.2. Reliability 6
8
1.4. Explanation Of Embedded Systems
8
1.4.1. Software Architecture
9
1.4.2. Stand Alone Embedded System
10
1.4.3. Real time Embedded Systems
11
1.4.4. Network Communication Embedded Systems
11
1.4.5. Different Types Of Processing Units 11
1.5. Applications Of Embedded 11
1.5.1. Consumer Applications 12
1.5.2. Office Application 13
1.5.3. Industrial Automation 14
1.5.4. Computer Networking 14
1.5.5. Tele Communications 15

2. LITERATURE SURVEY 16
2.1. Literature survey 16

iii
2.2. Existing System 18

3. PROPOSED SYSTEM 19
19
3.1. Introduction to Embedded System
3.2. Block diagram
20
20
3.3. Working
20
3.4. Applications
21
4. HARDWARE DESCRIPTION
22
4.1. Micro controller 30
4.1.1.Introduction to Micro controller 32
4.1.2.Crystal oscillator 32
4.2. Architecture 33
4.3. Pin Diagram 44
4.4. Regulated Power Supply 46
4.4.1.Introduction 49
4.4.2.Block Diagram 50
4.5. LED 52
4.6. Ultra Sonic Sensor
54
4.7. Voice Module
54
4.7.1.Notice in Using Self Drive Method
55
4.8. Flame Sensor
60
5. SOFTWARE DESCRPITION
60
5.1. Arduino Software(IDE)
5.1.1.Installation
64
64
6. RESULT
64
6.1. Results Obtained
65
7. CONCLUSION AND FUTURE SCOPE
66
7.1. Conclusion
7.2. Future Scope

REFERENCES
APPENDIX

iv
LIST OF FIGURES

FIGURE NO FIGURE TITLE PAGE NO

1.1 A Modern Example of Embedded System 2

1.2 Network Communication Embedded System 10

1.3 Automatic Coffee Make Equipment 11

1.4 FAX Machine 11

1.5 Printing Machine 11

1.6 Robot 12

1.7 Computer Networking 12

1.8 Cell Phone 13

1.9 Web camera 13

3.1 Proposed system 18

3.2 Detailed design of Smart Blind Stick 19

4.1 Microcontroller 20

4.2 Crystal Oscillator 21

4.3 AVR Architecture 23

4.4 Architecture of Microcontroller 24

4.5 Pin Diagram Of ATMEGA338 30

4.6 Detailed design of pin diagram 30

4.7 Regulated power supply 33

4.8 Circuit diagram of RPS with LED connection 33

4.9 Step Down Transformer 35

v
4.10 Hi-Watt 9V Battery 36

4.11 Pencil Battery of 1.5v 37

4.12 Bridge Rectifier 38

4.13 DB107-IC 39

4.14 Construction of a Capacitor 40

4.15 Electrolytic Capacitor 40

4.16 Voltage Regulator 42

4.17 Resistor 43

4.18 Color Bands in Resistor 43

4.19 Inside a LED 44

4.20 Parts of a LED 44

4.21 Electrical Symbol and Polarities of LED 45

4.22 Ultrasonic Sensor Module 46

4.23 Ultrasonic Sensor Timing Diagram 47

4.24 Pin configuration of Ultrasonic sensor Module 48

4.25 APR Voice Module 50

4.26 Water Sensor 50

4.27 Flame Sensor 52

5.1 USB A-B plug 55

5.2 USB A-Mini B Cable 55

5.3 Arduino IDE 55

5.4 Selecting New File 56

5.5 Selecting Arduino IDE 57

5.6 Selecting Serial Port 57

5.7 Uploading program 58

vi
5.8 Editor Medium 59

6.1 Circuit Setup 60

6.2 when an object has detected 61

6.3 Circuit Setup when an object has detected 61

6.4 when an fire has detected 62

6.5 Circuit Setup when an fire has detected 62

6.6 when an water has detected 63

6.7 Circuit Setup when an water has detected 63

vii
LIST OF ACRONYMS

S.NO ACRONYM DEFINITION

01. GPS Global Positioning System

02. DSP Digital Signal processor

03. USART Universal Asynchronous Synchronous Receiver

Transmitter

04. TWI Tread Wear Indicators

05. LED Light Emitting Diode

06. I2C Inter- Integrated Circuit

07. ADC Analog to Digital Converter

08. UART Universal Asynchronous Receiver and Transmitter

09. SPI Serial Peripheral Interface

10. FPGA Field Programmable Gate array

11 ISP In System Programming

12 VCC Common Collector Voltage

13 MCU Multipoint Control Unit

14 ICD In Circuit Debugger

15 TCB Trusted Computing Base

viii
16 AC Alternating Current

17 DC Direct current

18 APR Apache web Runtime

19 FPU Floating point Processing Unit

20 TTL Transistor -Transistor logic

21 PCB Printed Circuit Board

21 AGC Automatic Gain control

22 GSM Global System for Mobile Communication

ix
CHAPTER 1

INTRODUCTION TO EMBEDDED SYSTEM

1.1. Embedded system:


An embedded system is a computer system designed to perform one or a few
dedicated functions often with real-time computing constraints. It is embedded as part of a
complete device often including hardware and mechanical parts. By contrast, a general-purpose
computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range
of end-user needs. Embedded systems control many devices in common use today.
Embedded systems are controlled by one or more main processing cores that are typically either
microcontrollers or digital signal processors (DSP). The key characteristic, however, is being
dedicated to handle a particular task, which may require very powerful processors. For example,
air traffic control systems may usefully be viewed as embedded, even though they involve
mainframe computers and dedicated regional and national networks between airports and radar
sites. (Each radar probably includes one or more embedded systems of its own.) Since the
embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the
size and cost of the product and increase the reliability and performance. Some embedded
systems are mass-produced, benefiting from economies of scale.
Physically embedded systems range from portable devices such as digital watches and MP3
players, to large stationary installations like traffic lights, factory controllers, or the systems
controlling nuclear power plants. Complexity varies from low, with a single microcontroller
chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or
enclosure.
In general, "embedded system" is not a strictly definable term, as most systems have some
element of extensibility or programmability. For example, handheld computers share some
elements with embedded systems such as the operating systems and microprocessors which
power them, but they allow different applications to be loaded and peripherals to be connected.
Moreover, even systems which don't expose programmability as a primary feature generally need
to support software updates. On a continuum from "general purpose" to "embedded", large
application systems will have subcomponents at most points even if the system as a whole is

1
"designed to perform one or a few dedicated functions", and is thus appropriate to call
"embedded". A modern example of embedded system is shown in fig: 1.1

1.2. A modern example of embedded system:


Labeled parts include microprocessor (4), RAM (6), Flash memory (7).
Embedded Systems programming is not like normal PC programming. In many ways,
programming for an embedded system is like programming PC 15 years ago. The hardware for
the system is usually chosen to make the device as cheap as possible. Spending an extra dollar a
unit in order to make things easier to program can cost millions. Hiring a programmer for an
extra month is cheap in comparison. This means the programmer must make do with slow
processors and low memory, while at the same time battling a need for efficiency not seen in
most PC applications. Below is a list of issues specific to the embedded field.

1.2.1. History

Fig: 1.1: A modern example of embedded system


1.2.1 History:

In the earliest years of computers in the 1930–40s, computers were sometimes


dedicated to a single task, but were far too large and expensive for most kinds of tasks performed

2
by embedded computers of today. Over time however, the concept of  programmable controller
evolved from traditional electromechanical  sequencers, via solid state devices, to the use of
computer technology. One of the first recognizably modern embedded systems was the Apollo
Guidance Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory.
At the project's inception, the Apollo guidance computer was considered the riskiest item in the
Apollo project as it employed the then newly developed monolithic integrated circuits to reduce
the size and weight.

An early mass-produced embedded system was the Autonetics D-17 guidance computer for
the Minuteman missile, released in 1961. It was built from transistor logic and had a hard
disk for main memory. When the Minuteman II went into production in 1966, the D-17 was
replaced with a new computer that was the first high-volume use of integrated circuits

1.2.2. Tools:
Embedded development makes up a small fraction of total programming. There's
also a large number of embedded architectures, unlike the PC world where 1 instruction set rules,
and the Unix world where there's only 3 or 4 major ones. This means that the tools are more
expensive. It also means that they're lower featured, and less developed. On a major embedded
project, at some point you will almost always find a compiler bug of some sort.
Debugging tools are another issue. Since you can't always run general programs on your
embedded processor, you can't always run a debugger on it. This makes fixing your program
difficult. Special hardware such as JTAG ports can overcome this issue in part. However, if you
stop on a breakpoint when your system is controlling real world hardware (such as a motor),
permanent equipment damage can occur. As a result, people doing embedded programming
quickly become masters at using serial IO channels and error message style debugging.

1.2.3. Resources:
To save costs, embedded systems frequently have the cheapest processors that can
do the job. This means your programs need to be written as efficiently as possible. When dealing
with large data sets, issues like memory cache misses that never matter in PC programming can
hurt you. Luckily, this won't happen too often- use reasonably efficient algorithms to start, and
optimize only when necessary. Of course, normal profilers won't work well, due to the same
reason debuggers don't work well. Memory is also an issue. For the same cost savings reasons,

3
embedded systems usually have the least memory they can get away with.
That means their algorithms must be memory efficient (unlike in PC programs, you will
frequently sacrifice processor time for memory, rather than the reverse). It also means you can't
afford to leak memory. Embedded applications generally use deterministic memory techniques
and avoid the default "new" and "malloc" functions, so that leaks can be found and eliminated
more easily. Other resources programmers expect may not even exist. For example, most
embedded processors do not have hardware FPUs (Floating-Point Processing Unit). These
resources either need to be emulated in software, or avoided altogether.

1.2.4. Real Time Issues:


Embedded systems frequently control hardware, and must be able to respond to
them in real time. Failure to do so could cause inaccuracy in measurements, or even damage
hardware such as motors. This is made even more difficult by the lack of resources available.
Almost all embedded systems need to be able to prioritize some tasks over others, and to be able
to put off/skip low priority tasks such as UI in favor of high priority tasks like hardware control.

1.3. Need For Embedded Systems:


The uses of embedded systems are virtually limitless, because every day new
products are introduced to the market that utilizes embedded computers in novel ways. In recent
years, hardware such as microprocessors, microcontrollers, and FPGA chips have become much
cheaper. So when implementing a new form of control, it's wiser to just buy the generic chip and
write your own custom software for it. Producing a custom-made chip to handle a particular task
or set of tasks costs far more time and money. Many embedded computers even come with
extensive libraries, so that "writing your own software" becomes a very trivial task indeed. From
an implementation viewpoint, there is a major difference between a computer and an embedded
system. Embedded systems are often required to provide Real-Time response. The main
elements that make embedded systems unique are its reliability and ease in debugging.

1.3.1. Debugging:
Embedded debugging may be performed at different levels, depending on the
facilities available. From simplest to most sophisticate they can be roughly grouped into the

4
following areas:

 Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)
 External debugging using logging or serial port output to trace operation using either a
monitor in flash or using a debug server like the Remedy Debugger which even works for
heterogeneous multi core systems.
 An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via
a JTAG or Nexus interface. This allows the operation of the microprocessor to be
controlled externally, but is typically restricted to specific debugging capabilities in the
processor.
 An in-circuit emulator replaces the microprocessor with a simulated equivalent,
providing full control over all aspects of the microprocessor.
 A complete emulator provides a simulation of all aspects of the hardware, allowing all of
it to be controlled and modified and allowing debugging on a normal PC.
 Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor, and start or stop its
operation. The view of the code may be as assembly code or source-code.
Because an embedded system is often composed of a wide variety of elements, the debugging
strategy may vary. For instance, debugging a software(and microprocessor) centric embedded
system is different from debugging an embedded system where most of the processing is
performed by peripherals (DSP, FPGA, co-processor). An increasing number of embedded
systems today use more than one single processor core. A common problem with multi-core
development is the proper synchronization of software execution. In such a case, the embedded
system design may wish to check the data traffic on the busses between the processor cores,
which requires very low-level debugging, at signal/bus level, with a logic analyzer, for instance.

1.3.2. Reliability:
Embedded systems often reside in machines that are expected to run continuously
for years without errors and in some cases recover by them if an error occurs. Therefore the
software is usually developed and tested more carefully than that for personal computers, and

5
unreliable mechanical moving parts such as disk drives, switches or buttons are avoided.
Specific reliability issues may include:
 The system cannot safely be shut down for repair, or it is too inaccessible to repair.
Examples include space systems, undersea cables, navigational beacons, bore-hole
systems, and automobiles.
 The system must be kept running for safety reasons. "Limp modes" are less tolerable.
Often backups are selected by an operator. Examples include aircraft navigation, reactor
control systems, safety-critical chemical factory controls, train signals, engines on single-
engine aircraft.
 The system will lose large amounts of money when shut down: Telephone switches,
factory controls, bridge and elevator controls, funds transfer and market making,
automated sales and service.
A variety of techniques are used, sometimes in combination, to recover from
errors—both software bugs such as memory leaks, and also soft errors in the hardware:
 Watchdog timer that resets the computer unless the software periodically notifies the
watchdog Subsystems with redundant spares that can be switched over to software "limp
modes" that provide partial function
 Designing with a Trusted Computing Base (TCB) architecture[6] ensures a highly secure
& reliable system environment
 An Embedded Hyper visor is able to provide secure encapsulation for any subsystem
component, so that a compromised software component cannot interfere with other
subsystems, or privileged-level system software. This encapsulation keeps faults from
propagating from one subsystem to another, improving reliability. This may also allow a
subsystem to be automatically shut down and restarted on fault detection.
 Immunity Aware Programming

1.4. Explanation of Embedded Systems:

1.4.1. Software Architecture:


There are several different types of software architecture in common use.
 Simple Control Loop:

6
In this design, the software simply has a loop. The loop calls subroutines, each
of which manages a part of the hardware or software.

 Interrupt Controlled System:

Some embedded systems are predominantly interrupt controlled. This means that
tasks performed by the system are triggered by different kinds of events. An interrupt could be
generated for example by a timer in a predefined frequency, or by a serial port controller
receiving a byte. These kinds of systems are used if event handlers need low latency and the
event handlers are short and simple.
Usually these kinds of systems run a simple task in a main loop also, but this task
is not very sensitive to unexpected delays. Sometimes the interrupt handler will add longer tasks
to a queue structure. Later, after the interrupt handler has finished, these tasks are executed by
the main loop. This method brings the system close to a multitasking kernel with discrete
processes.
 Cooperative Multitasking:

A non-preemptive multitasking system is very similar to the simple control loop


scheme, except that the loop is hidden in an API. The programmer defines a series of tasks, and
each task gets its own environment to “run” in. When a task is idle, it calls an idle routine,
usually called “pause”, “wait”, “yield”, “nop” (stands for no operation), etc.The advantages and
disadvantages are very similar to the control loop, except that adding new software is easier, by
simply writing a new task, or adding to the queue-interpreter.

 Primitive Multitasking:

In this type of system, a low-level piece of code switches between tasks or threads
based on a timer (connected to an interrupt). This is the level at which the system is generally
considered to have an "operating system" kernel. Depending on how much functionality is
required, it introduces more or less of the complexities of managing multiple tasks running
conceptually in parallel. As any code can potentially damage the data of another task (except in
larger systems using an MMU) programs must be carefully designed and tested, and access to
shared data must be controlled by some synchronization strategy, such as message queues,
semaphores, or a non-blocking synchronization scheme.

7
Because of these complexities, it is common for organizations to buy a real-time
operating system, allowing the application programmers to concentrate on device functionality
rather than operating system services, at least for large systems; smaller systems often cannot
afford the overhead associated with a generic real time system, due to limitations regarding
memory size, performance, and/or battery life.
 Microkernels And Exokernels:

A microkernel is a logical step up from a real-time OS. The usual arrangement


is that the operating system kernel allocates memory and switches the CPU to different threads
of execution. User mode processes implement major functions such as file systems, network
interfaces, etc. In general, microkernels succeed when the task switching and intertask
communication is fast, and fail when they are slow. Exokernels communicate efficiently by
normal subroutine calls. The hardware and all the software in the system are available to, and
extensible by application programmers. Based on performance, functionality, requirement the
embedded systems are divided into three categories:

1.4.2. Stand Alone Embedded System:


These systems take the input in the form of electrical signals from
transducers or commands from human beings such as pressing of a button etc.., process them and
produces desired output. This entire process of taking input, processing it and giving output is
done in standalone mode. Such embedded systems come under stand-alone embedded systems

Eg: microwave oven, air conditioner etc...

1.4.3. Real Time Embedded Systems:


Embedded systems which are used to perform a specific task or operation in a
specific time period those systems are called as real-time embedded systems. There are two types
of real-time embedded systems.
 Hard Real-time embedded systems:

These embedded systems follow an absolute dead line time period i.e.., if the tasking is
not done in a particular time period, then there is a cause of damage to the entire equipment.
Example: consider a system in which we must open a valve within 30 milliseconds. If
this valve is not opened in 30ms this may cause damage to the entire equipment. So, in such

8
cases we use embedded systems for doing automatic operations.

 Soft Real Time embedded systems:

These embedded systems follow a relative dead line time period i.e.., if the task is not
done in a particular time that will not cause damage to the equipment.
Example: Consider a TV remote control system, if the remote control takes a few milliseconds
delay it will not cause damage either to the TV or to the remote control.
These systems which will not cause damage when they are not operated at considerable time
period those systems come under soft real-time embedded systems.

1.4.4. Network Communication Embedded Systems:


A wide range network interfacing communication is provided by using embedded
systems.
Example:
 Consider a web camera that is connected to the computer with internet can be used to
spread communication like sending pictures, images, videos etc.., to another
computer with internet connection throughout anywhere in the world.

 Consider a web camera that is connected at the door lock.

Whenever a person comes near the door, it captures the image of a person and
sends to the desktop of your computer which is connected to internet.
This gives an alerting message with image on to the desktop of your computer, and then
you can open the door lock just by clicking the mouse.
Fig: 1.2 show the network communications in embedded systems.

9
Fig 1.2: Network communication embedded system

1.4.5. Different Types of Processing Units:


The central processing unit (C.P.U.) can be any one of the following
microprocessors, microcontroller, digital signal processing.
 Among these Microcontroller is of low-cost processor and one of the main advantage of
microcontrollers is, the components such as memory, serial communication interfaces,
analog to digital converters etc.., all these are built on a single chip. The numbers of
external components that are connected to it are very less according to the application.

 Microprocessors are more powerful than microcontrollers. They are used in major
applications with several tasking requirements. But the microprocessor requires many
external components like memory, serial communication, hard disk, input output ports
etc.., so the power consumption is also very high when compared to microcontrollers.

 Digital signal processing is used mainly for the applications that particularly involved
with processing of signals.

10
1.5. Applications of Embedded System:

1.5.1. Consumer Applications:


At home we use several embedded systems which include microwave oven, remote
control, vcd players, DVD players, camera etc.….

Fig 1.3: Automatic coffee makes equipment

1.5.2. Office Applications:


We use systems like fax machine, modem, printer etc.…

Fig 1.4: Fax machine Fig 1.5: Printing machine

1.5.3. Industrial Automation:


Today a lot of industries are using embedded systems for process control. In
industries we design the embedded systems to perform a specific operation like monitoring
temperature, pressure, humidity, voltage, current etc.., and basing on these monitored levels we
do control other devices, we can send information to a centralized monitoring station.

11
Fig 1.6: Robot

In critical industries where human presence is avoided there, we can use robots which are
programmed to do a specific operation.

1.5.4. Computer Networking:


Embedded systems are used as bridges routers etc...

Fig 1.7: Computer networking

1.5.5. Tele communication:

12
Cell phones, web cameras etc

Fig 1.8: Cell Phone Fig 1.9: Web camera

13
CHAPTER 2

LITERATURE SURVEY
2.1 Literature Survey:
1. A Survey of Voice Aided Electronic Stick for Visually Impaired People. Author Name-
Young Ho, Sung Jae Kang. Description- From this paper we got idea about latest technology
like Graphics Positioning System (GPS) & Graphics System Messaging (GSM).Which will help
for tracking the location & used for making module of smart stick for visually impaired people
and it gives us idea about Voice message get from Android Phone to that blind person.
2. Blind Navigation System Using Image Processing and Embedded System Author Name-
Sacinah Jamaludin, Zul Azizi Hailani Description- We got idea from this paper for Navigation
system has been developed which help to enhance mobility of blindness. This paper gives us idea
for capturing live video of that person & grab video feed in front of blind person & this live
video can be observed by admin itself.
3. Smart Cane: Assistive Cane for Visually-impaired People. Author Name- Amirul A_Talib,
Mohd Helmy Wahab Description- We got idea from this paper for Voice message & Vibration
when person detect obstacle with help of smart stick then blind person get aware to it by
understanding Vibration alert & Voice message which comes from smart phone.
4. Electronic Path Guidance for Visually Impaired People Author Name-Iwan Ulrich and Johann
Borenstein Description- From this paper we got idea about the how range which is required for
detecting obstacle or object from location of smart stick specific range is there we need to set
threshold value if obstacle comes into that threshold range, then it can detect successfully
otherwise cannot.
5. Use of Ultrasonic Sensors in the Development of an Electronic Travel Aid Author Name-
Alex Harold and Chris Gearhart Description- From this paper we got idea about for capturing
video image processing is required by making use of some algorithm & method we make some
processes on image for capturing it. and also, live monitoring of that person is seen at admin
side. All the processing data is stored on server side in serialized format.

14
2.2 Existing System:
Nowadays, the wearable health monitoring system is the main application of Internet of
things Likewise, lots of wearable devices are designed for visually impaired people. Few systems
are discussed here.

[1] In Sensor Assisted Stick for the blind people describes about a wearable equipment which
consists of a light weight blind stick and the obstacle detection circuit based on a sensor. It is
mainly developed to help the blind person to move alone safely from one place to another and to
avoid any obstacles that may be encountered. The device detects the fixed as well as moving
objects and thus it may help to avoid accidents. The main component for the working of this
system is the infrared sensor which is used to scan a predetermined area around the blind person
by emitting-reflecting waves. The reflected signals are received from the objects are used as
inputs to the microcontroller and then used for determining the direction and distance of the
objects around the blind person. The main objective of this is to provide an application for blind
people to detect the obstacles in various directions, detecting pits and manholes on the ground to
make free to walk.

[2] In an Innovative Stick is designed for the visually disabled people for their easy navigation.
The blind stick can detect the water by integrating with water and ultrasonic sensor. In this
system, the ultrasonic sensors are used to detect obstacles by using ultrasonic waves. By sensing
the obstacles, the sensor passes the received data to the microcontroller. The microcontroller
processes the data and calculates if the obstacle is close enough to the person. If the obstacle is
not close to the microcontroller, the circuit does not do anything. If the obstacle is close enough
to the microcontroller, it sends a signal to Buzzer. The system detects water and obstacles
commands and alerts the blind person.

15
CHAPTER 3

PROPOSED SYSTEM
3.1 Introduction:
In this project is to build an Obstacle detection device with obstacle detection Sensors
that is very useful for blind people. This device automatically senses the presence of
obstacles in its path and helps blind people in deviate their direction of movement. The obstacle
detection mechanism is done by an Ultrasonic sensor to find the presence of an obstacle in its
path. This consists of a Microcontroller based control system, voice module (8-ohms) and
Ultrasonic Sensor, water sensor, flame sensor. This device senses the obstacles in its path by
continuously transmitting the ULTRASONIC rays from ULTRASONIC transmitter. If any
obstacle comes in its vicinity, then the rays are destructed and give this input to the
Microcontroller. The ULTRASONIC receiver fitted on the device senses these obstacles and this
information is passed onto the Microcontroller. This device is designed in such a way that there
is no requirement of manual attention towards it. It makes use of the obstacle detection sensors
to detect the obstacle present in its expected trajectory and dynamically changes the trajectory to
be followed. An Embedded System is a combination of software and hardware to perform a
dedicated task. Some of the main devices used in embedded products are Microprocessors and
Microcontrollers. Microprocessors are commonly referred to as general purpose processors as
they simply accept the inputs, process it and give the output. In contrast, a Microcontroller not
only accepts the data as inputs but also manipulates it, interfaces the data with various devices,
controls the data and thus finally gives the result. The “Obstacle detection sensor-based travel
assistant for blind” using ARDUINO microcontroller is an exclusive project which detects the
presence of any obstacle near to the blind people and alerts him with a voice module through
commands.
Blindness is a very common disability among the peoples throughout the world.
According to the World Health Organization (WHO) 285 million people are visually impaired
worldwide, 39 million are blind and 246 million people have low vision. About 90% of the
world’s visually impaired live in developing countries. For the indigents blindness is a curse.
They need help to walk outside and all other daily essential works. So, the project glows a
system that tries to remove the curse of blindness and make them self- dependent to do their

16
daily chores.
Blind stick is a walking stick, normally used by the blinds. But it is fully automated as
well as manually operated, easy to maintain, cheap and it is very comfortable to use. The power
consumption is low and it can be operated easily. Above All the Blind stick is very economic
over the conventional one. The walking stick mentioned above is a stick that consists of a circuit
board that contains an ARDUINO micro controller, different sensors, and voice module. The
entire project is designed using micro-controller based upon its reliability. The micro-controller
is code protected so its security bridge cannot be override except the vendor or owner. Here one
micro-controller is used, that is ARDUINO. All Sensors data are taken by the micro-controller
and it produces the sensors output.
Visually impaired persons have difficulty to interact and feel their environment. They
have little contact with surroundings. Physical movement is a challenge for visually impaired
persons, because it can become tricky to distinguish obstacles appearing in front of them, and
they are not able to move from one place to another.
They depend on their families for mobility and financial support. Their mobility opposes
them from interacting with people and social activities. In the past, different systems are
designed with limitations without a solid understanding of the nonvisual perception. Researchers
have spent the decades to develop an intelligent and smart stick to assist and alert visually
impaired persons from obstacles and give information about their location.
Over the last decades, research has been conducted for new devices to design a good and
reliable system for visually impaired persons to detect obstacles and warn them at danger places.

17
3.2 Block diagram:

3.1:Proposed system

Blind stick is an innovative stick designed for visually disabled people for improved navigation.
We here propose an advanced blind stick that allows visually challenged people to navigate with
ease using advanced technology. The blind stick is integrated with ultrasonic sensor along with
ldr, fire, water detection modules. Our proposed project first uses ultrasonic sensors to detect
obstacles ahead using ultrasonic waves. On sensing obstacles, the sensor passes this data to the
microcontroller. The microcontroller then processes this data and calculates if the obstacle is
close enough. If the obstacle is not that close the circuit does nothing. If the obstacle is close the
microcontroller sends a signal to rotate the motor which finally is connected to the wheels which
drives the stick. It also detects and sounds trough voice module. if it is lost and alerts the blind.
The system has one more advanced feature integrated to help the blind find their stick if they
forget where they kept it. Thus, this system allows for obstacle detection as well as finding stick
if misplaced by visually disabled people.

18
3.2 : Detailed design of smart blind stick

3.3 Working:
Blind stick is used for navigation for the impaired students. In This project we use
Ultrasonic sensor for objects detection and range, flame sensor for fire detection, water level
sensor for water detection. All are integrated to the micro controller ARDUINO with the help of
ARDUINO ide. For any alert we use the voice module for voice alert.
3.4 Applications:
This system can be practically in real time, which helps the blind to know the obstacles in
their way through voice commands so that, the person can have a clear idea about what kind of
obstacle it is

19
CHAPTER 4
HARDWARE DESCRIPTION
4.1 Microcontroller:

Fig: 4.1: Microcontroller

4.1.1 Introduction of Microcontroller:


Circumstances that we find ourselves in today in the field of microcontrollers had
their beginnings in the development of technology of integrated circuits. This development has
made it possible to store hundreds of thousands of transistors into one chip. That was a
prerequisite for production of microprocessors, and the first computers were made by adding
external peripherals such as memory, input-output lines, timers and other. Further increasing of
the volume of the package resulted in creation of integrated circuits. These integrated circuits
contained both processor and peripherals. That is how the first chip containing a microcomputer,
or what would later be known as a microcontroller came about.
Microprocessors and microcontrollers are widely used in embedded systems products.
Microcontroller is a programmable device. A microcontroller has a CPU in addition to a fixed
amount of RAM, ROM, I/O ports, and a timer embedded all on a single chip. The fixed amount
of on-chip ROM, RAM, and number of I/O ports in microcontrollers makes them ideal for many
applications in which cost and space are critical. The AVR is a modified Harvard architecture 8-
bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one
of the first microcontroller families to use on-chip flash memory for program storage, as opposed
to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the
time.

20
4.1.2 Crystal Oscillator:
XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier
which can be configured for use as an On-chip Oscillator, Either a quartz Crystal or a ceramic
resonator may be used. The CKOPT Fuse selects between two different Oscillator amplifier
modes. When CKOPT is programmed, the Oscillator output will oscillate a full rail-to-rail swing
on the output. This mode is suitable when operating in a very noisy environment or when the
output from XTAL2 drives a second clock buffer. This mode has a wide frequency range. When
CKOPT is unprogrammed, the Oscillator has a smaller output swing. This reduces power
consumption considerably.

Fig: 4.2: Crystal Oscillator

This mode has a limited frequency range and it cannot be used to drive other clock buffers. For
resonators, the maximum frequency is 8 MHz with CKOPT unprogrammed and 16 MHz with
CKOPT programmed. C1 and C2 should always be equal for both crystals and resonators. The
optimal value of the capacitors depends on the crystal or resonator in use, the amount of stray
capacitance, and the electromagnetic noise of the environment. For ceramic resonators, the
capacitor values given by the manufacturer should be used.The Oscillator can operate in three
different modes, each optimized for a specific frequency range. The operating mode is selected
by the fuses CKSEL3.1

21
4.2 Architecture:
Memory: It has 8Kb of Flash program memory (10,000 Write/Erase cycles durability), 512
Bytes of EEPROM (100,000 Write/Erase Cycles).  1Kbyte Internal SRAM
I/O Ports: 23 I/ line can be obtained from three ports; namely Port B, Port C and Port D.
Interrupts:  Two External Interrupt source, located at port D. 19 different interrupt vectors
supporting 19 events generated by internal peripherals.
Timer/Counter: Three Internal Timers are available, two 8 bit, one 16 bit, offering various
operating modes and supporting internal or external clocking.
SPI (Serial Peripheral interface): ATmega8 holds three communication devices integrated.
One of them is Serial Peripheral Interface. Four pins are assigned to Atmega8 to implement this
scheme of communication.
USART: One of the most powerful communication solutions is USART and ATmega8 supports
both synchronous and asynchronous data transfer schemes. It has three pins assigned for that. In
many projects, this module is extensively used for PC-Micro controller communication.
TWI (Two Wire Interface): Another communication device that is present in ATmega8 is Two
Wire Interface. It allows designers to set up a commutation between two devices using just two
wires along with a common ground connection, As the TWI output is made by means of open
collector outputs, thus external pull up resistors are required to make the circuit.
Analog Comparator: A comparator module is integrated in the IC that provides comparison
facility between two voltages connected to the two inputs of the Analog comparator via External
pins attached to the micro controller.
Analog to Digital Converter: Inbuilt analog to digital converter can convert an analog input
signal into digital data of 10bit resolution. For most of the low-end application, this much
resolution is enough.

22
Fig: 4.3: AVR Architecture

Microcontroller: Microcontroller can be termed as a single on chip computer which includes


number of peripherals like RAM, EEPROM, Timers etc., required to perform some predefined
task.The computer on one hand is designed to perform all the general purpose tasks on a single
machine like you can use a computer to run a software to perform calculations or you can use a
computer to store some multimedia file or to access internet through the browser, whereas the
microcontrollers are meant to perform only the specific tasks, for e.g., switching the AC off
automatically when room temperature drops to a certain defined limit and again turning it ON
when temperature rises above the defined limit.
 There are number of popular families of microcontrollers which are used in different
applications as per their capability and feasibility to perform the desired task, most common of
these are 8051, AVR and PIC microcontrollers. In this article we will introduce you
with AVR family of microcontrollers.AVR was developed in the year 1996 by Atmel
Corporation. The architecture of AVR was developed by Alf-Egil Bogen and Vegard Wollan.
AVR derives its name from its developers and stands for Alf-Egil Bogen Vegard Wollan RISC
microcontroller, also known as Advanced Virtual RISC. The AT90S8515 was the first
microcontroller which was based on AVR architecture however the first microcontroller to hit
the commercial market was AT90S1200 in the year 1997.
 AVR microcontrollers are available in three categories:
1. TinyAVR – Less memory, small size, suitable only for simpler applications
2. MegaAVR – These are the most popular ones having good amount of memory (upto 256
KB), higher number of inbuilt peripherals and suitable for moderate to complex applications.

23
3. XmegaAVR – Used commercially for complex applications, which require large
program memory and high speed.

Fig: 4.4: Architecture Of Microcontroller


Device architecture: Flash, EEPROM, and SRAM are all integrated onto a single chip,
removing the need for external memory in most applications. Some devices have a parallel
external bus option to allow adding additional data memory or memory-mapped devices. Almost
all devices (except the smallest TinyAVR chips) have serial interfaces, which can be used to
connect larger serial EEPROMs or flash chips.

Program memory: Program instructions are stored in non-volatile flash memory. Although the
MCUs are 8-bit, each instruction takes one or two 16-bit words.The size of the program memory
is usually indicated in the naming of the device itself (e.g., the ATmega64x line has 64 kB of
flash while the ATmega32x line has 32 kB).There is no provision for off-chip program memory;
all code executed by the AVR core must reside in the on-chip flash. However, this limitation
does not apply to the AT94 FPSLIC AVR/FPGA chips.

24
Internal data memory: The data address space consists of the register file, I/O registers,
and SRAM.

Internal registers The AVRs have 32 single-byte registers and are classified as 8-bit RISC
devices.

In most variants of the AVR architecture, the working registers are mapped in as the first 32
memory addresses (000016–001F16) followed by the 64 I/O registers (002016–005F16).

Actual SRAM starts after these register sections (address 0060 16). (Note that the I/O register
space may be larger on some more extensive devices, in which case the memory mapped
I/O registers will occupy a portion of the SRAM address space.)Even though there are separate
addressing schemes and optimized opcodes for register file and I/O register access, all can still
be addressed and manipulated as if they were in SRAM. In the XMEGA variant, the working
register file is not mapped into the data address space; as such, it is not possible to treat any of
the XMEGA's working registers as though they were SRAM. Instead, the I/O registers are
mapped into the data address space starting at the very beginning of the address space.
Additionally, the amount of data address space dedicated to I/O registers has grown substantially
to 4096 bytes (000016–0FFF16).

As with previous generations, however, the fast I/O manipulation instructions can only reach the
first 64 I/O register locations (the first 32 locations for bitwise instructions). Following the I/O
registers, the XMEGA series sets aside a 4096-byte range of the data address space which can be
used optionally for mapping the internal EEPROM to the data address space (1000 16–1FFF16).
The actual SRAM is located after these ranges, starting at 200016.

EEPROM: Almost all AVR microcontrollers have internal EEPROM for semi-permanent data


storage. Like flash memory, EEPROM can maintain its contents when electrical power is
removed.In most variants of the AVR architecture, this internal EEPROM memory is not
mapped into the MCU's addressable memory space. It can only be accessed the same way an
external peripheral device is, using special pointer registers and read/write instructions which
makes EEPROM access much slower than other internal RAM.

However, some devices in the SecureAVR (AT90SC) family use a special EEPROM mapping to
the data or program memory depending on the configuration. The XMEGA family also allows
the EEPROM to be mapped into the data address space.

25
Since the number of writes to EEPROM is not unlimited — Atmel specifies 100,000 write cycles
in their datasheets — a well-designed EEPROM write routine should compare the contents of an
EEPROM address with desired contents and only perform an actual write if the contents need to
be changed.

Note that erase and write can be performed separately in many cases, byte-by-byte, which may
also help prolong life when bits only need to be set to all 1s (erase) or selectively cleared to 0s
(write).

Program execution: Atmel's AVRs have a two stage, single level pipeline design. This means
the next machine instruction is fetched as the current one is executing. Most instructions take just
one or two clock cycles, making AVRs relatively fast among eight-bit microcontrollers.

The AVR processors were designed with the efficient execution of compiled C code in mind and
have several built-in pointers for the task.

MCU speed: The AVR line can normally support clock speeds from 0 to 20 MHz, with some
devices reaching 32 MHz. Lower powered operation usually requires a reduced clock speed. All
recent (Tiny, Mega, and Xmega, but not 90S) AVRs feature an on-chip oscillator, removing the
need for external clocks or resonator circuitry. Some AVRs also have a system clock prescaler
that can divide down the system clock by up to 1024. This prescaler can be reconfigured by
software during run-time, allowing the clock speed to be optimized.

Since all operations (excluding literals) on registers R0 - R31 are single cycle, the AVR can
achieve up to 1 MIPS per MHz, i.e. an 8 MHz processor can achieve up to 8 MIPS. Loads and
stores to/from memory take two cycles, branching takes two cycles. Branches in the latest "3-
byte PC" parts such as ATmega2560 are one cycle slower than on previous devices

Features:
High-performance, Low-power Atmel®AVR® 8-bit Microcontroller
• Advanced RISC Architecture

 130 Powerful Instructions – Most Single-clock Cycle Execution

 32 × 8 General Purpose Working Registers

 Fully Static Operation

26
 Up to 16MIPS Throughput at 16MHz

 On-chip 2-cycle Multiplier


• High Endurance Non-volatile Memory segments

 8Kbytes of In-System Self-programmable Flash program memory

 512Bytes EEPROM

 1Kbyte Internal SRAM

 Write/Erase Cycles: 10,000 Flash/100,000 EEPROM

 Data retention: 20 years at 85°C/100 years at 25°C(1)

 Optional Boot Code Section with Independent Lock Bits

 In-System Programming by On-chip Boot Program

 True Read-While-Write Operation

 Programming Lock for Software Security


• Peripheral Features

 Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode

 One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode

 Real Time Counter with Separate Oscillator

 Three PWM Channels

 8-channel ADC in TQFP and QFN/MLF package Eight Channels 10-bit Accuracy

 6-channel ADC in PDIP package Six Channels 10-bit Accuracy

 Byte-oriented Two-wire Serial Interface

 Programmable Serial USART

 Master/Slave SPI Serial Interface

 Programmable Watchdog Timer with Separate On-chip Oscillator

27
 On-chip Analog Comparator
• Special Microcontroller Features

 Power-on Reset and Programmable Brown-out Detection

 Internal Calibrated RC Oscillator

 External and Internal Interrupt Sources

 Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and Standby
• I/O and Packages

 23 Programmable I/O Lines

 28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF


• Operating Voltages

 2.7V - 5.5V (ATmega8L)

 4.5V - 5.5V (ATmega8)


• Speed Grades

 0 - 8MHz (ATmega8L)

 0 - 16MHz (ATmega8)
• Power Consumption at 4Mhz, 3V, 25oC

 Active: 3.6mA

 Idle Mode: 1.0mA

 Power-down Mode: 0.5µA


Brown-out Detector: If the Brown-out Detector is not needed in the application, this module
should be turned off. If the Brown-out Detector is enabled by the BODEN Fuse, it will be
enabled in all sleep modes, and hence, always consume power. In the deeper sleep modes, this
will contribute significantly to the total current consumption. Refer to “Brown-out Detection” on
page 38 for details on how to configure the Brown-out Detector.

Internal Voltage Reference the Internal Voltage Reference will be enabled when needed by the
Brown-out Detector, the Analog Comparator, or the ADC. If these modules are disabled as

28
described in the sections above, the internal voltage reference will be disabled and it will not be
consuming power. When turned on again, the user must allow the reference to start up before the
output is used. If the reference is kept on in sleep mode, the output can be used immediately.
Refer to “Internal Voltage Reference” on page 40 for details on the start-up time. Watchdog
Timer If the Watchdog Timer is not needed in the application, this module should be turned
off.If the Watchdog Timer is enabled, it will be enabled in all sleep modes, and hence, always
consume power. In the deeper sleep modes, this will contribute significantly to the total current
consumption. Refer to “Watchdog Timer” on page 41 for details on how to configure the
Watchdog Timer. Port Pins When entering a sleep mode, all port pins should be configured to
use minimum power.

The most important thing is then to ensure that no pins drive resistive loads. In sleep modes
where the both the I/O clock (clkI/O) and the ADC clock (clkADC) are stopped, the input
buffers of the device will be disabled. This ensures that no power is consumed by the input logic
when not needed. In some cases, the input logic is needed for detecting wake-up conditions, and
it will then be enabled. Refer to the section “Digital Input Enable and Sleep Modes” on page 53
for details on which pins are enabled. If the input buffer is enabled and the input signal is left
floating or have an analog signal level close to VCC/2, the input buffer will use excessive power.

Power-on Reset: A Power-on Reset (POR) pulse is generated by an On-chip detection circuit.
The detection level is defined in Table 15. The POR is activated whenever VCC is below the
detection level. The POR circuit can be used to trigger the Start-up Reset, as well as to detect a
failure in supply voltage.
A Power-on Reset (POR) circuit ensures that the device is reset from Power-on. Reaching the
Power-on Reset threshold voltage invokes the delay counter, which determines how long the
device is kept in RESET after VCC rise. The RESET signal is activated again, without any
delay, when VCC decreases below the detection level.
External Reset: An External Reset is generated by a low level on the RESET pin. Reset pulses
longer than the minimum pulse width (see Table 15) will generate a reset, even if the clock is not
running. Shorter pulses are not guaranteed to generate a reset. When the applied signal reaches
the Reset Threshold Voltage – VRST on its positive edge, the delay counter starts the MCU after
the time-out period has expired.

29
4.3 Pin Diagram:

Fig.4.5: Pin diagram Of Atmega328.

Fig. 4.6: Detailed design of pin diagram

30
VCC: Digital supply voltage magnitude of the voltage range between 4.5 to 5.5 V for the
ATmega8 and 2.7 to 5.5 V for ATmega8L
GND: Ground Zero reference digital voltage supply.
PORTB (PB7..PB0): PORTB is a port I / O two-way (bidirectional) 8-bit with internal pull-up
resistor can be selected. This port output buffers have symmetrical characteristics when used as a
source or sink.  When used as an input, the pull-pin low externally will emit a current if the pull-
up resistor is activated it. PORTB pins will be in the condition of the tri-state when RESET is
active, although the clock is not running.
PORTC (PC5.. PC0): PORTC is a port I / O two-way (bidirectional) 7-bit with internal pull-up
resistor can be selected. This port output buffers have symmetrical characteristics when used as a
source or sink. When used as an input, the pull-pin low externally will emit a current if the pull-
up resistor is activated it. PORTC pins will be in the condition of the tri-state when RESET is
active, although the clock is not running.
PC6/RESET: If RSTDISBL Fuse programmed, PC6 then serves as a pin I / O but with different
characteristics. PC0 to PC5 If Fuse RSTDISBL not programmed, then serves as input Reset
PC6. LOW signal on this pin with a minimum width of 1.5 microseconds will bring the
microcontroller into reset condition, although the clock is not running.
PORTD (PD7.. PD0): PORTD is a port I / O two-way (bidirectional) 8-bit with internal pull-up
resistor can be selected. This port output buffers have symmetrical characteristics when used as a
source or sink. When used as an input, the pull-pin low externally will emit a current if the pull-
up resistor is activated it. PORTD pins will be in the condition of the tri-state when RESET is
active, although the clock is not running.
RESET: Reset input pin. LOW signal on this pin with a minimum width of 1.5 microseconds
will bring the microcontroller into reset condition, although the clock is not running. Signal with
a width of less than 1.5 microseconds does not guarantee a Reset condition.
AVCC: AVCC is the supply voltage pin for the ADC, PC3 .. PC0, and ADC7..ADC6. This pin
should be connected to VCC, even if the ADC is not used. If the ADC is used, AVCC should be
connected to VCC through a low-pass filter to reduce noise.
AREF: Analog Reference pin for the ADC.
ADC7- ADC6: ADC analog input there is only on ATmega8 with TQFP and QFP packages /
MLF.

31
PORTS: Term "port" refers to a group of pins on a microcontroller which can be accessed
simultaneously, or on which we can set the desired combination of zeros and ones, or read from them an
existing status. Physically, port is a register inside a microcontroller which is connected by wires to the
pins of a microcontroller. Ports represent physical connection of Central Processing Unit with an outside
world. Microcontroller uses them The ATmega8 has 23 I/O ports Which are organized into 3 groups:

 Port B(PBO TO PB7)

 Port C(PCO TO PC6)

 Port D(PDO TO PD7)


We will use mainly 3 registers known as DDRX, PORTX & PINX. We have total four PORTs on my
ATmega16. They are PORTA, PORTB, PORTC and PORTD. They are multifunctional pins. Each of
the pins in each port (total 32) can be treated as input or output pin.
Applications:

AVR microcontroller perfectly fits many uses, from automotive industries and
controlling home appliances to industrial instruments, remote sensors, electrical door locks and
safety devices. It is also ideal for smart cards as well as for battery supplied devices because of
its low consumption. EEPROM memory makes it easier to apply microcontrollers to devices
where permanent storage of various parameters is needed (codes for transmitters, motor speed,
receiver frequencies, etc.). Low cost, low consumption, easy handling and flexibility make
ATmega8 applicable even in areas where microcontrollers had not previously been considered
(example: timer functions, interface replacement in larger systems, coprocessor applications,
etc.).In System Programmability of this chip (along with using only two pins in data transfer)
makes possible the flexibility of a product, after assembling and testing have been completed.
This capability can be used to create assembly-line production, to store calibration data available
only after final testing, or it can be used to improve programs on finished products.

4.4 Regulated Power Supply:

4.4.1 Introduction:
Power supply  is a supply of electrical power. A device or system that supplies electrical
or other types of energy to an output load or group of loads is called a power supply unit or PSU. The
term is most applied to electrical energy supplies, less often to mechanical ones, and rarely to others.
A power supply may include a power distribution system as well as primary or secondary

32
sources of energy such as

 Conversion of one form of electrical power to another desired form and voltage, typically
involving converting AC line voltage to a well-regulated lower-voltage  DC for electronic
devices. Low voltage, low power DC power supply units are commonly integrated with
the devices they supply, such as computers and household electronics.

 Batteries.

 Chemical fuel cells and other forms of energy storage systems.

 Solar power.

 Generators or alternators

4.4.2 Block Diagram of Regulated Power Supply:

Fig 4.7: Regulated Power Supply

The basic circuit diagram of a regulated power supply (DC O/P) with led connected as load is shown in
fig:4.8

Fig 4.8: Circuit diagram of Regulated Power Supply with Led connection

33
The components mainly used in above figure are
 230V AC MAINS
 TRANSFORMER
 BRIDGE RECTIFIER(DIODES)
 CAPACITOR
 VOLTAGE REGULATOR (IC 7805)
 RESISTOR
 LED (LIGHT EMITTING DIODE)
The detailed explanation of every component mentioned above is as follows:

Transformation: The process of transforming energy from one device to another is called
transformation. For transforming energy, we use transformers.

Transformers: A transformer is a device that transfers electrical energy from one circuit to


another through inductively coupled conductors without changing its frequency. A
varying current in the first or primary winding creates a varying magnetic flux in the
transformer's core, and thus a varying magnetic field through the secondary winding. This
varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the
secondary winding. This effect is called mutual induction. If a load is connected to the
secondary, an electric current will flow in the secondary winding and electrical energy will be
transferred from the primary circuit through the transformer to the load. This field is made up
from lines of force and has the same shape as a bar magnet. If the current is increased, the lines
of force move outwards from the coil. If the current is reduced, the lines of force move inwards.

If another coil is placed adjacent to the first coil, then, as the field moves out or in, the moving
lines of force will "cut" the turns of the second coil.As it does this, a voltage is induced in the
second coil. With the 50 Hz AC mains supply, this will happen 50 times a second. This is called
MUTUAL INDUCTION and forms the basis of the transformer. The input coil is called the
PRIMARY WINDING; the output coil is the SECONDARY WINDING. Fig: 3.3.4 shows step-
down transformer.

34
Fig 4.9: Step-Down Transformer

The voltage induced in the secondary is determined by the TURNS RATIO.

For example, if the secondary has half the primary turns; the secondary will have half the
primary voltage.

Another example is if the primary has 5000 turns and the secondary has 500 turns, then
the turn’s ratio is 10:1.

If the primary voltage is 240 volts, then the secondary voltage will be x 10 smaller = 24
volts. Assuming a perfect transformer, the power provided by the primary must equal the power
taken by a load on the secondary. If a 24-watt lamp is connected across a 24-volt secondary, then
the primary must supply 24 watts.

To aid magnetic coupling between primary and secondary, the coils are wound on a metal
CORE. Since the primary would induce power, called EDDY CURRENTS, into this core, the
core is LAMINATED. This means that it is made up from metal sheets insulated from each
other. Transformers to work at higher frequencies have an iron dust core or no core at all.

Note that the transformer only works on AC, which has a constantly changing current and
moving field. DC has a steady current and therefore a steady field and there would be no
induction.

35
Some transformers have an electrostatic screen between primary and secondary. This is
to prevent some types of interference being fed from the equipment down into the mains supply,
or in the other direction. Transformers are sometimes used for IMPEDANCE MATCHING.

We can use the transformers as step up or step down.

Step Up transformer: In case of step-up transformer, primary windings are every less compared
to secondary winding. Because of having more turns secondary winding accepts more energy,
and it releases more voltage at the output side.

Step down transformer: In case of step-down transformer, Primary winding induces more flux
than the secondary winding, and secondary winding is having less number of turns because of
that it accepts less number of flux, and releases less amount of voltage.

Battery power: A battery is a type of linear power supply that offers benefits that traditional
line-operated power supplies lack: mobility, portability, and reliability. A battery consists of
multiple electrochemical cells connected to provide the voltage desired. Fig: 3.3.5 shows Hi-
Watt 9V battery

Fig 4.10: Hi-Watt 9V Battery

The most commonly used dry-cell battery is the carbon-zinc dry cell battery. Dry-cell batteries


are made by stacking a carbon plate, a layer of electrolyte paste, and a zinc plate alternately until
the desired total voltage is achieved. The most common dry-cell batteries have one of the
following voltages: 1.5, 3, 6, 9, 22.5, 45, and 90. During the discharge of a carbon-zinc battery,
the zinc metal is converted to a zinc salt in the electrolyte, and magnesium dioxide is reduced at
the carbon electrode. These actions establish a voltage of approximately 1.5 V.

36
The lead-acid storage battery may be used. This battery is rechargeable; it consists of lead
and lead/dioxide electrodes which are immersed in sulfuric acid. When fully charged, this type of
battery has a 2.06-2.14 V potential (A 12 volt car battery uses 6 cells in series). During
discharge, the lead is converted to lead sulfate and the sulfuric acid is converted to water. When
the battery is charging, the lead sulfate is converted back to lead and lead dioxide A nickel-
cadmium battery has become more popular in recent years. This battery cell is completely sealed
and rechargeable. The electrolyte is not involved in the electrode reaction, making the voltage
constant over the span of the batteries long service life. During the charging process, nickel
oxide is oxidized to its higher oxidation state and cadmium oxide is reduced. The nickel-
cadmium batteries have many benefits. They can be stored both charged and uncharged. They
have a long service life, high current availabilities, constant voltage, and the ability to be
recharged. Fig: 3.3.6 shows pencil battery of 1.5V.

Fig 4.11: Pencil Battery of 1.5V

Rectification: The process of converting an alternating current to a pulsating direct current is


called as rectification. For rectification purpose we use rectifiers.

Rectifiers: A rectifier is an electrical device that converts alternating current (AC) to direct
current (DC), a process known as rectification. Rectifiers have many uses including as
components of power supplies and as detectors of radio signals. Rectifiers may be made of solid-
state diodes, vacuum tube diodes, mercury arc valves, and other components. A device that it can
perform the opposite function (converting DC to AC) is known as an inverter. When only one
diode is used to rectify AC (by blocking the negative or positive portion of the waveform), the

37
difference between the term diode and the term rectifier is merely one of usage, i.e., the term
rectifier describes a diode that is being used to convert AC to DC. Almost all rectifiers comprise
a number of diodes in a specific arrangement for more efficiently converting AC to DC than is
possible with only one diode. Before the development of silicon semiconductor rectifiers,
vacuum tube diodes and copper (I) oxide or selenium rectifier stacks were used.

Bridge full wave rectifier: The Bridge rectifier circuit is shown in fig: 5.3.7, which converts an
ac voltage to dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit
is shown in the figure. The circuit has four diodes connected to form a bridge. The ac input
voltage is applied to the diagonally opposite ends of the bridge. The load resistance is connected
between the other two ends of the bridge.

For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas
diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load
resistance RL and hence the load current flows through RL.

For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas, D1
and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load resistance
RL and hence the current flows through R L in the same direction as in the previous half cycle.
Thus, a bi-directional wave is converted into a unidirectional wave.

Input Output

Fig 4.12: Bridge rectifier: a full-wave rectifier using 4 diodes

38
DB107: Now -a -days Bridge rectifier is available in IC with a number of DB107. In our project
we are using an IC in place of bridge rectifier. The picture of DB 107 is shown in fig: 3.3.8.

Features:

 Good for automation insertion


 Surge overload rating - 30 amperes peak
 Ideal for printed circuit board
 Reliable low cost construction utilizing molded
 Glass passivated device
 Polarity symbols molded on body
 Mounting position: Any
 Weight: 1.0 gram

Fig 4.13: DB107-IC

Filtration: The process of converting a pulsating direct current to a pure direct current using
filters is called as filtration.

Filters: Electronic filters are electronic circuits, which perform signal-processing functions,
specifically to remove unwanted frequency components from the signal, to enhance wanted ones.

Introduction to Capacitors: The Capacitor or sometimes referred to as a Condenser is a passive


device, and one which stores energy in the form of an electrostatic field which produces a
potential (static voltage) across its plates. In its basic form a capacitor consists of two parallel
conductive plates that are not connected but are electrically separated either by air or by an
insulating material called the Dielectric. When a voltage is applied to these plates, a current flow
charging up the plates with electrons giving one plate a positive charge and the other plate an
equal and opposite negative charge this flow of electrons to the plates is known as the Charging

39
Current and continues to flow until the voltage across the plates (and hence the capacitor) is
equal to the applied voltage Vcc. At this point the capacitor is said to be fully charged and this is
illustrated below. The construction of capacitor and an electrolytic capacitor are shown in
figures 4.13and 4.14 respectively.

Fig 4.14 :Construction Of a Capacitor Fig 4.15:Electrolytic Capaticor

Units of Capacitance:

Microfarad (μF) 1μF = 1/1,000,000 = 0.000001 = 10-6 F

 Nanofarad (nF) 1nF = 1/1,000,000,000 = 0.000000001 = 10-9 F

 Pico farad (pF) 1pF = 1/1,000,000,000,000 = 0.000000000001 = 10-12 F

Operation of Capacitor: Think of water flowing through a pipe. If we imagine a capacitor as


being a storage tank with an inlet and an outlet pipe, it is possible to show approximately how an
electronic capacitor works.

First, let us consider the case of a "coupling capacitor" where the capacitor is used to
connect a signal from one part of a circuit to another but without allowing any direct current to
flow. 

40
If the current flow is alternating between zero and a
maximum, our "storage tank" capacitor will allow the
current waves to pass through.

However, if there is a steady current, only the initial short


burst will flow until the "floating ball valve" closes and
stops further flow.

So, a coupling capacitor allows "alternating current" to pass through because the ball valve
doesn't get a chance to close as the waves go up and down. However, a steady current quickly
fills the tank so that all flow stops.

A capacitor will pass alternating current but (apart from an initial surge) it will not pass d.c.

Where a capacitor is used to decouple a circuit, the effect is


to "smooth out ripples". Any ripples, waves or pulses of
current are passed to ground while d.c. Flows smoothly.

Regulation: The process of converting a varying voltage to a constant regulated voltage is called
as regulation. For the process of regulation, we use voltage regulators.

Voltage Regulator: A voltage regulator (also called a ‘regulator’) with only three terminals
appears to be a simple device, but it is in fact a very complex integrated circuit. It converts a
varying input voltage into a constant ‘regulated’ output voltage. Voltage Regulators are available

41
in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage regulators
are designed for positive input. For applications requiring negative input, the LM79XX series is
used. Using a pair of ‘voltage-divider’ resistors can increase the output voltage of a regulator
circuit.

It is not possible to obtain a voltage lower than the stated rating. You cannot use a 12V
regulator to make a 5V power supply. Voltage regulators are very robust. These can withstand
over-current draw due to short circuits and over-heating. In both cases, the regulator will cut off
before any damage occurs. The only way to destroy a regulator is to apply reverse voltage to its
input. Reverse polarity destroys the regulator almost instantly. Fig: 4.15 shows voltage regulator.

Fig 4.16: Voltage Regulator

Resistors: A resistor is a two-terminal electronic component that produces a voltage across its
terminals that is proportional to the electric current passing through it in accordance with Ohm's
law: V = IR

Resistors are elements of electrical networks and electronic circuits and are ubiquitous in
most electronic equipment. Practical resistors can be made of various compounds and films, as
well as resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).

The primary characteristics of a resistor are the resistance, the tolerance, maximum
working voltage and the power rating. Other characteristics include temperature coefficient,
noise, and inductance. Less well-known is critical resistance, the value below which power

42
dissipation limits the maximum permitted current flow, and above which the limit is applied
voltage. Critical resistance is determined by the design, materials, and dimensions of the resistor.

Resistors can be made to control the flow of current, to work as Voltage dividers, to
dissipate power and it can shape electrical waves when used in combination of other
components. Basic unit is ohms.

Theory of operation:

Ohm's law: The behavior of an ideal resistor is dictated by the relationship specified in Ohm's
law: V = IR

Ohm's law states that the voltage (V) across a resistor is proportional to the current (I) through it
where the constant of proportionality is the resistance (R).

Power dissipation: The power dissipated by a resistor (or the equivalent resistance of a resistor
network) is calculated using the following:

Fig 4.17: Resistor Fig 4.18: Color Bands In Resistor

43
4.5 LED:

A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps
in many devices, and are increasingly used for lighting. Introduced as a practical electronic component in
1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible,
ultraviolet, and infrared wavelengths, with very high brightness. The internal structure and parts of a led
are shown below.

Fig 4.19: Inside a LED Fig 4.20: Parts of a LED

Working:

The structure of the LED light is completely different than that of the light bulb.
Amazingly, the LED has a simple and strong structure. The light-emitting semiconductor
material is what determines the LED's color. The LED is based on the semiconductor diode.

When a diode is forward biased (switched on), electrons can recombine with holes within the
device, releasing energy in the form of photons. This effect is called electroluminescence and the
color of the light (corresponding to the energy of the photon) is determined by the energy gap of
the semiconductor. An LED is usually small in area (less than 1 mm2), and integrated optical
components are used to shape its radiation pattern and assist in reflection. LED’s present many
advantages over incandescent light sources including lower energy consumption, longer lifetime,
improved robustness, smaller size, faster switching, and greater durability and reliability.

44
However, they are relatively expensive and require more precise current and heat management
than traditional light sources. Current LED products for general lighting are more expensive to
buy than fluorescent lamp sources of comparable output. They also enjoy use in applications as
diverse as replacements for traditional light sources in automotive lighting (particularly
indicators) and in traffic signals. The compact size of LED’s has allowed new text and video
displays and sensors to be developed, while their high switching rates are useful in advanced
communications technology. The electrical symbol and polarities of led are shown in fig: 5.4.3.

Fig 4.21: Electrical Symbol &


Polarities of LED

LED lights have a variety of


advantages over other light sources:

 High-levels of brightness and intensity


 High-efficiency
 Low-voltage and current requirements
 Low radiated heat
 High reliability (resistant to shock and vibration)
 No UV Rays
 Long source life
 Can be easily controlled and programmed

Applications of LED fall into three major categories:

 Visual signal application where the light goes more or less directly from the LED to the
human eye, to convey a message or meaning.
 Illumination where LED light is reflected from object to give visual response of these
objects.

45
 Generate light for measuring and interacting with processes that do not involve the
human visual system.

4.6 Ultrasonic Sensor:


Ultrasonic principle: Ultrasonic sensors emit short, high-frequency sound pulses at regular
intervals. These propagate in the air at the velocity of sound. If they strike an object, then they
are reflected as echo signals to the sensor, which itself computes the distance to the target based
on the time-span between emitting the signal and receiving the echo.As the distance to an object
is determined by measuring the time of flight and not by the intensity of the sound, ultrasonic
sensors are excellent at suppressing background interference. Virtually all materials which reflect
sound can be detected, regardless of their color. Even transparent materials or thin foils represent
no problem for an ultrasonic sensor.
Microsonic ultrasonic sensors are suitable for target distances from 30 mm to 10 m and as
they measure the time of flight, they can ascertain a measurement with pinpoint accuracy. Some
of our sensors can even resolve the signal to an accuracy of less than 0.18 mm. Ultrasonic
sensors can see through dust-laden air and ink mists. Even thin deposits on the sensor membrane
do not impair its function. Sensors with a blind zone of just 30 mm and an extremely narrow
beam spread are finding totally new applications these days: measuring levels in yoghurt pots
and test tubes as well as scanning small bottles in the packaging sector - no trouble for our
sensors. Even thin wires are reliably detected.

Fig.4.22: Ultrasonic sensor module.

Specification: The ultrasonic range sensor detects objects in its path and can be used to calculate
the range to the object. It is sensitive enough to detect a 3cm diameter broom handle at over 2m.

46
Voltage - 5v
Current - 0mA Type. 50mA Max.
Frequency - 40 KHz
Max Range - 3 m
Min Range - 3 cm
Sensitivity - Detect 3cm diameter broom handle at > 2 m
Input Trigger - 10uS Min. TTL level pulse

Echo Pulse - Positive TTL level signal, width proportional to range.

Small Size - 43mm x 20mm x 17mm height

Fig.4.23: Ultrasonic sensor timing diagram

Electrical connection: The SRF004 ultrasonic range finder has 5 connections pins. The power
supply is connected to the 5V and 0V ground connections on the SRF004. (Note that BOTH the
‘Mode’ (hole 4) and ‘0V Ground’ (hole 5) connections MUST be connected to 0V for correct
operation with the PICAXE system).
Take care not to overheat, and therefore damage, the solder connection pads whilst making

47
connections.
The SRF004 Trigger Input is connected to a PICAXE output pin.

The SRF004 Echo Output is connected to a PICAXE input pin.


Ultrasonic sensors have set new standards in automation
Connection: The SRF004 must be mounted above the buggy (e.g. by using a small home-made
aluminum bracket (not supplied)). The SRF004 has five solder connections which must be
connected via wires to the solder joints on the bottom of the buggy PCB.
1. Hole 1 – 5v Supply – to ARDUINO chip leg 14 (V+ Supply)
2. Hole 2 – Echo Output – to ARDUINO chip leg 15 (input 6)
3. Hole 3 – Trigger Input – to ARDUINO chip leg 9 (output 3)
4. Hole 4 – Mode – to ARDUINO chip leg 5 (0V Ground)
5. Hole 5 – 0V Ground – to ARDUINO chip leg 5 (0V Ground)
Note that both holes 4 and 5 must both be connected to 0V. It is recommended that the wire
links across the bottom of the
Buggy are secured in place using a glue-gun or similar.

Fig.4.24: Pin configuration of ultrasonic sensor module

4.7 Voice Module:

48
APR9600 is a low-cost high performance sound record/replay IC incorporating flash
analogue storage technique. Recorded sound is retained even after power supply is removed from
the module. The replayed sound exhibits high quality with a low noise level. Sampling rate for a
60 second recording period is 4.2 kHz that gives a sound record/replay bandwidth of 20Hz to 2.1
kHz. However, by changing an oscillation resistor, a sampling rate as high as 8.0 kHz can be
achieved. This shortens the total length of sound recording to 32 seconds. Total sound recording
time can be varied from 32 seconds to 60 seconds by changing the value of a single resistor.
The IC can operate in one of two modes: serial mode and parallel mode. In serial access mode,
sound can be recorded in 256 sections. In parallel access mode, sound can be recorded in 2, 4 or
8 sections. The IC can be controlled simply using push button keys. It is also possible to control
the IC using external digital circuitry such as micro-controllers and computers. The APR9600
has a 28 pin DIP package. Supply voltage is between 4.5V to 6.5V. During recording and
replaying, current consumption is 25 mA. In idle mode, the current drops to 1 mA.

The APR9600 experimental board is an assembled PCB board consisting of an APR9600 IC, an
electret microphone, support components and necessary switches to allow users to explore all
functions of the APR9600 chip. The oscillation resistor is chosen so that the total recording
period is 60 seconds with a sampling rate of 4.2 kHz. The board measures 80mm by 55mm.

SPECIFICATIONS
 Total 11 Minutes duration selectable into 1,2,4,8 messages.
 Single chip high quality solution.
 Direct speaker drives no need of external amplifier
 +5 vdc power supply
 Onboard high-quality mic for audio recording.
To switch on voice module -high 1
To switch off voice module -low 1

4.7.1 Notice in Using Self Drive Method:


There are various types of voice processing chip (IC) with various features for

49
speech compression and processing is readily available. Here are projects called Voice recording
and play back using chip (APR9600). An APR9600 is a single chip voice recorder and playback
device from A plus integrated circuits. This chip used flash nonvolatile memory to store up to
256 voltage levels. That is for 32 to 60 seconds.
This chip has many features like, one can select sample rates with consequent quality and
recording times.

4.25: Figure of APR VOICE MODULE:

4.26: Figure Water sensor


 
Brick is designed for water detection, which can be widely used in sensing the rainfall,
water level, even the liquate leakage. The brick is mainly comprised of three parts: An Electronic

50
brick connector, a 1 MΩ resistor, and several lines of bare conducting wires.This sensor works
by having a series of exposed traces connected to ground and interlaced between the grounded
traces are the sens traces. The sensor traces have a weak pull-up resistor of 1 MΩ. The resistor
will pull the sensor trace value high until a drop of water shorts the sensor trace to the grounded
trace. Believe it or not this circuit will work with the digital I/O pins of your Arduino or you can
use it with the analog pins to detect the amount of water induced contact between the grounded
and sensor traces.
This item can judge the water level through with a series of exposed parallel wires stitch
to measure the water droplet/water size.This High Sensitivity Water Sensor can easily change the
water size to analog signal, and output analog value can directly be used in the program function,
then to achieve the function of water level alarm.This item have low power consumption, and
high sensitivity, which are the biggest characteristics of this module.The High Sensitivity Water
Sensor can be compatible with Arduino UNO,Arduino mega2560,Arduino ADK etc.
Features:
 Working voltage: 5V

 Working Current: <20ma

 Interface: Analog

 Width of detection: 40mm×16mm

 Working Temperature: 10°C~30°C

 Weight: 3g

 Size: 65mm×20mm×8mm

 Arduino compatible interface

 Low power consumption

 High sensitivity

 Output voltage signal: 0~4.2V

Pin definition:

51
 "S" stands for signal input

 "+" stands for power supply

 "-" stands for GND

Applications:
 Rainfall detecting

 Liquid leakage

 Tank overflow detector

4.8 FLAME SENSOR:

4.27: Figure Flame Sensor

Introduction: This module is sensitive to the flame and radiation. It also can detect ordinary
light source in the range of of a wavelength 760nm-1100 nm. The detection distance is up to 100
cm. The Flame sensor can output digital or analog signal. It can be used as a flame alarm or in
firefighting robots. Future Electronics Egypt Ltd. (Arduino Egypt).This type of flame detector
works by detecting the UV radiation at the point of ignition. Almost entirely all fires emit UV
radiations, so in case of the flame, the sensor would become aware of it and produce a series of
the pulses that are converted by detector electronics into an alarm output.Fire Sensor module is a
small size electronics device that can detect a fire source or any other bright light sources. This
sensor basically detects IR (Infrared) light wavelength between 760 nm – 1100 nm that is
emitted from the fire flame or light source.

52
Description:

• Detects a flame or a light source of a wavelength in the range of 760nm-1100 nm

• Detection distance: 20cm (4.8V) ~ 100cm (1V) • Detection angle about 60 degrees, it is
sensitive to the flame spectrum.

• Comparator chip LM393 makes module readings stable.

• Adjustable detection range.

• Operating voltage 3.3V-5V

• Digital and Analog Output DO digital switch outputs (0 and 1) AO analog voltage output

• Power indicator and digital switch output indicator Interface Description (4-wire) 1) VCC --
3.3V-5V voltage 2) GND -- GND 3) DO -- board digital output interface (0 and 1) 4) AO --
board analog output interface.

CHAPTER 5
SOFTWARE DESCRIPTION

53
5.1 Arduino Software (IDE):

Arduino is an open-source prototyping platform based on easy-to-use hardware and


software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or
a Twitter message - and turn it into an output - activating a motor, turning on an LED,
publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do soyou use the Arduino
programming language (based on Wiring), and the Arduino Software (IDE), based on
Processing. Over the years Arduino has been the brain of thousands of projects, from
everyday objects to complex scientific instruments.

It has gathered around this open-source platform, their contributions have added up
to an incredible amount of accessible knowledge that can be of great help to novices and
experts alike. Arduino was born at the Ivrea Interaction Design Institute as an easy tool for
fast prototyping, aimed at students without a background in electronics and programming

• How to download Arduino software (IDE):

Get the latest version from the download page. You can choose between the
Installer (.exe) and the Zip packages. We suggest you use the first one that installs directly
everything you need to use the Arduino Software (IDE), including the drivers. With the
Zip package you need to install the drivers manually. When the download finishes, proceed
with the installation and please allow the driver installation process when you get a
warning from the operating system.

5.1.1 Installation:

In this section, we will learn in easy steps, how to set up the Arduino IDE on our
computer and prepare the board to receive the program via USB cable.

Step1. Setup Arduino board:

First you must have your Arduino board (you can choose your favorite board) and a
USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega
2560, or Diecimila, you will need a standard USB cable (A plug to B plug), the kind you
would connect to a USB printer as shown in the following image.

54
Fig.5.1.USB A-B plug

In case you use Arduino Nano, you will need an A to Mini-B cable instead as shownin the
following image.

Fig.5.2 USB A-Mini B cable

Step2. Download Arduino IDE Software:

You can get different versions of Arduino IDE from the Download page onthe
Arduino Official website. You must select your software, which is compatible with your
operating system (Windows, IOS, or Linux). After your file download is complete, unzip
the file.

Fig.5.3 Arduino IDE

Step3. Power up your board:

The Arduino Uno, Mega, NODEMCU and Arduino Nano automatically draw
power from either, the USB connection to the computer or an external power supply. If you
are using an Arduino Diecimila, you have to make sure that the board is configured to draw
power from the USB connection. The power source is selected with a jumper, a small piece
of plastic that fits onto two of the three pins between the USB and power jacks. Check that
it is on the two pins closest to the USB port. Connect the Arduino board to your computer

55
using the USB cable. The green power LED (labeled PWR) should glow.

Step4. Launch Arduino IDE:

After your Arduino IDE software is downloaded, you need to unzip the folder.
Inside the folder, you can find the application icon with an infinity label (application.exe).
Double-click the icon to start the IDE.

Step5. Open your first project:

Once the software starts, you have two options − • Create a new project. • Open an
existing project example. To create a new project, select File → New.

Fig.5.4 Selecting new file

Step6. Select your Arduino board:

To avoid any error while uploading your program to the board, you must select the
correct Arduino board name, which matches with the board connected to your computer.
Go to Tools → Board and select your board

56
Fig.5.5 Selecting Arduino UNO boar

Here, we have selected Arduino Uno board according to our tutorial, but you must select
the name matching the board that you are using.

Step7. Select your serial port:

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

Fig.5.6 Selecting serial port

Step8. Upload the program to your board:

Before explaining how we can upload our program to the board, we must
demonstrate the function of each symbol appearing in the Arduino IDE toolbar.

57
Fig.5.7 Uploading program

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

• B − Used to upload a program to the Arduino board.

• C − Shortcut used to create a new sketch.

• D − Used to directly open one of the examples sketch.

• E − Used to save your sketch.

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

Now, simply click the "Upload" button in the environment. Wait a few seconds; you will
see the RX and TX LEDs on the board, flashing. If the upload is successful, the message
"Done uploading" will appear in the status bar. Note − If you have an Arduino Mini, NG,
or other board, you need to press the reset button physically on the board, immediately
before clicking the upload button on the Arduino Software.

• Connecting a Battery:

For stand-alone operation, the board is powered by a battery rather than through the
USB connection to the computer. While the external power can be anywhere in the range
of 6 to 24 V (for example, you could use a car battery), a standard 9 V battery is
convenient. While you could jam the leads of a battery snap into the Vin and Gnd
connections on the board, it is better to solder the battery snap leads to a DC power plug
and connect to the power jack on the board.

58
Disconnect your Arduino from the computer. Connect a 9 V battery to the Arduino power
jack using the battery snap adapter. Confirm that the blinking program runs. This shows
that you can power the Arduino from a battery and that the program you download runs
without needing a connection to the host PC.

Moving On Connect your Arduino to the computer with the USB cable. You do not need
the battery for now. The green PWR LED will light. If there was already a program burned
into the Arduino, it will run. Start the Arduino development environment. In Arduino-
speak, programs are called ―sketches‖, but here we will just call them programs.

In the editing window that comes up, enter the following program, paying attention to
where semi-colons appear at the end of command lines.

void setup()

Serial.begin(9600); Serial.println("Hello World");

Void loop() {}

Fig.5.8 Editor window

59
CHAPTER 6
RESULT

6.1 Results obtained:

The below hardware setup gives us the Brief idea about the whole system .The Smart Blind
Stick Setup is shown in the fig:6

Fig 6.1: Circuit Setup

The figure shows the circuit setup of the project which consists of Regulated Power Supply,
Arduino UNO Micro controller ,16*2 LCD display , Ultrasonic sensor ,Water Sensor, Fire
Sensor ,Voice Module for giving an voice alert on the type of obstacle.

60
The fig shows the initial circuit setup when initially the kit is ON. The LCD displays the Title of
the project like “Smart Blind Stick”. And it also displays the information regarding which sensor
is activated with the help of commands like ON and OFF.

Fig 6.2: when an object has Detected

Fig 6.3: Circuit Setup when an object has Detected

The above fig 6.3 represents when an obstacle has detected. The LCD Displays the range of the
obstacle. And as a result it gives a voice command as ”Object has detected” .And the remaining

61
sensors will display the command like OFF(which represents no fire and water has
detected).when two sensors activated at a same time the voice command is given to the first
sensed sensor

Fig 6.4: when an fire is detected

Fig 6.5: Circuit setup when an fire is detected

The above fig 6.5 represents when Fire has detected. The LCD displays the command like
fire :”ON”.The result of the water sensor is in OFF condition. And the result of ultrasonic sensor
is ON when it detects any object .or else it displays OFF.When fire sensor and ultrasonic sensor
are activated at a time firstly it gives voice alert to fire sensor like “Fire has detected” and next it

gives the voice command like “object has detected

62
Fig 6.6:Circuit setup when water has detected

Fig 6.7: Circuit setup when water has detected

The above fig 6.7 represents when water has detected. The LCD displays the command Water
”ON”. The result of the fire sensor is in OFF condition. And the result of ultrasonic sensor is
ON when it detects any object .or else it displays OFF

When water sensor and ultrasonic sensor are activated at a time firstly it gives voice alert to
water sensor like “Drinage/Water has detected” and next it gives the voice command like “object
has detected.

63
CHAPTER 7

CONCLUSION AND FUTURE SCOPE

7.1 Conclusion:

The project Smart blind stick is implemented using the sensors like Ultrasonic sensor
used to calculate the range of an object, water sensor use to find the water level /Drainage level
whose temperature approximately equals to10 to 30 degree Celsius, Fire sensor used to detect the
fire in the range of 760nm to 1100nm.Voice module for giving the alert on the obstacle that they
are facing. Using of this Smart Blind Stick is very much helpful for the visually impaired people
in order to find the obstacle which they are going to facing and giving a voice alert which
makes them to Distract their path.

7.2 Future Scope:

In extension for this project, we can assign a GPS module is Attached to system.
whenever a person falls or stuck anywhere for a long time it sends the person location
automatically to an authorized person.

64
REFERENCES

1. Duraisamy Sathya & Pugalendhi Ganesh Kumar, ‘Secured Remote Health Monitoring System,
IET Healthcare Technology Letters’, vol. 4, issue. 6, pp. 228-232, 2017.
2. A. Dodds, D. Clark-Carter, and C. Howarth, The sonic PathFinder: an evaluation, Journal of
Visual Impairment and Blindness, vol. 78, no. 5, pp. 206–207, 1984.
3. G. Balakrishnan, G. Sainarayanan, R. Nagarajan and S. Yaacob, Wearable RealTime Stereo
Vision for the VisuallyImpaired, Engineering Letters, vol. 14, no. 2, 2007.
4. R. L. A. Kuranov and V. Pisarevsky, An empirical analysis of boosting algorithms for rapid
objects with an extended set of Haarlike features, Intel Technical Report MRLTR-July 02-01,
2002.
5. R. Lienhart and J. Maydt, An extended set of Haar-like features for rapid object detection,
presented at the IEEE International Conference on Image Processing, 2002
6. Y. Freund and R. E. Schapire, Experiments with a new boosting algorithm, in Proc. 13th
International Conference on Machi.

65
APPENDIX

CODE:

===== DECLARATION===============

#include <stdio.h>

#include <SoftwareSerial.h>

#include <LiquidCystal_I2C.h>

int lcdColumns = 16;

int lcdRows= 2;

LiquidCrystal_I2C lcd(0x27,lcd Columns,lcdRows);

const int trigPin = A2;

const int echoPin = A1;

int fire = 8;

int lvl1 = A3;

int voice1 = 10;

int voice2 = 11;

int voice3 = 12;

====== SETUP==================

void setup()

pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output

66
pinMode(echoPin, INPUT); // Sets the echoPin as an Input

pinMode(lvl1, INPUT);

pinMode(fire, INPUT);

pinMode(voice1, OUTPUT);

pinMode(voice2, OUTPUT);

pinMode(voice3,OUTPUT);

====== LOGIC================

void loop()

// distance//

dist1 = ultra_dist();

if(dist < 100)

lcd.println(“ distance detected”);

digitalWrite(voice1,HIGH);delay(500);

lcd.println(no distance detected”);

else{digitalWrite(voice1,LOW);}

67
// fire//

if(digitalRead(fire) == HIGH)

lcd.println(“fire detected”);

digitalWrite(voice2,HIGH);delay(500);

if(digitalRead(fire) == LOW)

lcd.println(“ no fire detected”);

digitalWrite(voice2,LOW);}

//water //

if(digitalRead(lvl1) == HIGH)

lcd.println(“water detected”);

digitalWrite(voice3,HIGH);delay(500);

if(digitalRead(lvl1) == LOW)

68
lcd.println(“ no water detected”);

digitalWrite(voice2,LOW);}

unsigned int ultra_dist()

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distanceCm= duration*0.034/2;

//distanceInch = duration*0.0133/2;

//lcd.setCursor(2,0);

//convertl(distanceCm);

dist1 = distanceCm;

return dist1;

69

You might also like