Professional Documents
Culture Documents
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
NOVEMBER-2022
St. MARTIN’S ENGINEERING COLLEGE
An Autonomous Institute
NBA & NAAC A+ Accredited Dhulapally, Secunderabad-500100
DECLARATION
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.
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.
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
1.6 Robot 12
4.1 Microcontroller 20
v
4.10 Hi-Watt 9V Battery 36
4.13 DB107-IC 39
4.17 Resistor 43
vi
5.8 Editor Medium 59
vii
LIST OF ACRONYMS
Transmitter
viii
16 AC Alternating Current
17 DC Direct current
ix
CHAPTER 1
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.1. History
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.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
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.
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:
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:
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.
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.
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
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:
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.
12
Cell phones, web cameras etc
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:
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.
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
23
3. XmegaAVR – Used commercially for complex applications, which require large
program memory and high speed.
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.
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
26
Up to 16MIPS Throughput at 16MHz
512Bytes EEPROM
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode
8-channel ADC in TQFP and QFN/MLF package Eight Channels 10-bit Accuracy
27
On-chip Analog Comparator
• Special Microcontroller Features
Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, and Standby
• I/O and Packages
0 - 8MHz (ATmega8L)
0 - 16MHz (ATmega8)
• Power Consumption at 4Mhz, 3V, 25oC
Active: 3.6mA
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:
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:
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.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.
Solar power.
Generators or alternators
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.
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
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.
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
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.
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
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:
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.
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.
Units of Capacitance:
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.
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.
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.
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:
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.
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.
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.
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
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.
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
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.
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
Interface: Analog
Weight: 3g
Size: 65mm×20mm×8mm
High sensitivity
Pin definition:
51
"S" stands for signal input
Applications:
Rainfall detecting
Liquid leakage
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:
• Detection distance: 20cm (4.8V) ~ 100cm (1V) • Detection angle about 60 degrees, it is
sensitive to the flame spectrum.
• 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):
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
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.
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.
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.
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.
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.
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.
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.
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.
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
• 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()
Void loop() {}
59
CHAPTER 6
RESULT
The below hardware setup gives us the Brief idea about the whole system .The Smart Blind
Stick Setup is shown in the fig:6
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.
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
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
62
Fig 6.6: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
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.
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 lcdRows= 2;
int fire = 8;
====== SETUP==================
void setup()
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();
digitalWrite(voice1,HIGH);delay(500);
else{digitalWrite(voice1,LOW);}
67
// fire//
if(digitalRead(fire) == HIGH)
lcd.println(“fire detected”);
digitalWrite(voice2,HIGH);delay(500);
if(digitalRead(fire) == LOW)
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);}
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
distanceCm= duration*0.034/2;
//distanceInch = duration*0.0133/2;
//lcd.setCursor(2,0);
//convertl(distanceCm);
dist1 = distanceCm;
return dist1;
69