You are on page 1of 55

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

CHAPTER 1
OVERVIEW OF THE PROJECT
1.1

INTRODUCTION
Since sometimes blind people collide against high and moving obstacles, we need

obstacle-sensing function in front of the blind people. This paper proposes a method of
point-to-point distance measurement using ultrasonic for cap in order to detect moving
and high obstacles.
In this method, we apply ultrasonic wave technique to measure distance to obstacles,
since it does not disturb other people. By setting two ultrasonic sensors on the cap, one
for transmission and the other for reception, the moving and high obstacles are detected
before colliding. Moreover, embedded systems are employed in the system in order to
reduce system size and cost, as well as saving energy.
In experiments (with wood, concrete, plastic, etc. as obstacles), the results reveal
distance measurement accuracy 95 % approximately. In this project we are using an IR
transmitter and Receiver circuit based path clearing assist stick. Path clearing assist stick
is used to detect any obstacles. If any obstacle is found, the IR light will be reflected back
and sensed by IR receiver and sends a signal to the buzzer driver circuit, which produces
buzzer sound near hand.
The project works very well even in night and day timings, irrespective of the
lighting intensity. The project is reliable and effective. This project uses regulated 5V,
750mA power supply. Unregulated 12V DC is used for relay. 7805 three terminal voltage
regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify
the ac output of secondary of 230/12V step down transformer. This project can be
powered by a simple 9V battery also for portability.

1.2 OBJECTIVE
The objective of this project is to help Blind people in their daily commute. As Blind
people are given less importance in the society, we took the initiate to help them in their
day to day life with this project.

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

1.3 TOOLS REQUIRED


1.3.1 HARDWARE REQUIREMENTS:
1.
2.
3.
4.
5.
6.

AT89S52 Micro Controller


Power Supply
16 X 2 LCD
Ultrasonic Sensor
APR33A3
Speaker

1.3.2 SOFTWARE REQUIREMENTS:


1. Programming in embedded C
2. Keil Micro vision
3. Flash Magic

1.4 THESIS ORGANIZATION


The rest of the thesis is organized as follows:
Chapter 2 Micro-Controller Introduction.
Chapter 3 Block diagram of the project is explained and mode of operation and
also their function in detail.
Chapter 4 Discuss about Circuit Diagram, Operation and also the code.
Chapter 5 Checking the Result and also analyzing it.
Chapter 6 Conclusion of the project and Future Scope.

CHAPTER 2
Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

MICROCONTROLLER
2.1 INTRODUCTION
An Embedded System is a combination of computer hardware and software, and
perhaps additional mechanical or other parts, designed to perform a specific function. A
good example is the microwave oven. Almost every household has one, and tens of
millions of them are used every day, but very few people realize that a processor and
software are involved in the preparation of their lunch or dinner.
This is in direct contrast to the personal computer in the family room. It too is
comprised of computer hardware and software and mechanical components (disk drives,
for example). However, a personal computer is not designed to perform a specific
function rather; it is able to do many different things. Many people use the term generalpurpose computer to make this distinction clear. As shipped, a general-purpose computer
is a blank slate; the manufacturer does not know what the customer will do wish it. One
customer may use it for a network file server another may use it exclusively for playing
games, and a third may use it to write the next great American novel.
Frequently, an embedded system is a component within some larger system. For
example, modern cars and trucks contain many embedded systems. One embedded
system controls the anti-lock brakes, other monitors and controls the vehicle's emissions,
and a third displays information on the dashboard. In some cases, these embedded
systems are connected by some sort of a communication network, but that is certainly not
a requirement.
At the possible risk of confusing you, it is important to point out that a generalpurpose computer is itself made up of numerous embedded systems. For example, my
computer consists of a keyboard, mouse, video card, modem, hard drive, floppy drive,
and sound card-each of which is an embedded system. Each of these devices contains a
processor and software and is designed to perform a specific function. For example, the
modem is designed to send and receive digital data over analog telephone line. That's it
and all of the other devices can be summarized in a single sentence as well.

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

If an embedded system is designed well, the existence of the processor and


software could be completely unnoticed by the user of the device. Such is the case for a
microwave oven, VCR, or alarm clock. In some cases, it would even be possible to build
an equivalent device that does not contain the processor and software. This could be done
by replacing the combination with a custom integrated circuit that performs the same
functions in hardware. However, a lot of flexibility is lost when a design is hard-cooled in
this way. It is much easier, and cheaper, to change a few lines of software than to redesign
a piece of custom hardware.

2.2 Real Time Systems


One subclass of embedded is worthy of an introduction at this point. As
commonly defined, a real-time system is a computer system that has timing constraints.
In other words, a real-time system is partly specified in terms of its ability to make
certain calculations or decisions in a timely manner. These important calculations are said
to have deadlines for completion. And, for all practical purposes, a missed deadline is just
as bad as a wrong answer.
The issue of what if a deadline is missed is a crucial one. For example, if the realtime system is part of an airplane's flight control system, it is possible for the lives of the
passengers and crew to be endangered by a single missed deadline. However, if instead
the system is involved in satellite communication, the damage could be limited to a single
corrupt data packet. The more severe the consequences, the more likely it will be said that
the deadline is "hard" and thus, the system is a hard real-time system. Real-time systems
at the other end of this discussion are said to have "soft" deadlines.
All of the topics and examples presented in this book are applicable to the
designers of real-time system who is more delight in his work. He must guarantee reliable
operation of the software and hardware under all the possible conditions and to the degree
that human lives depend upon three system's proper execution, engineering calculations
and descriptive paperwork.

2.3 Application Areas

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Nearly 99 per cent of the processors manufactured end up in embedded systems.


The embedded system market is one of the highest growth areas as these systems are
used in very market segment- consumer electronics, office automation, industrial
automation, biomedical engineering, wireless communication, data communication,
telecommunications, transportation, military and so on.
2.3.1 Consumer Appliances
At home we use a number of embedded systems which include digital camera,
digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and
air-conditioner, VCO player, video game consoles, video recorders etc. Todays high-tech
car has about 20 embedded systems for transmission control, engine spark control, airconditioning, navigation etc. Even wristwatches are now becoming embedded systems.
The palmtops are powerful embedded systems using which we can carry out many
general-purpose tasks such as playing games and word processing.
2.3.2 Office Automation
The office automation products using embedded systems are copying machine,
fax machine, key telephone, modem, printer, scanner etc.
2.3.3 Industrial Automation
Today a lot of industries use embedded systems for process control. These include
pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and
transmission. The embedded systems for industrial use are designed to carry out specific
tasks such as monitoring the temperature, pressure, humidity, voltage, current etc., and
then take appropriate action based on the monitored levels to control other devices or to
send information to a centralized monitoring station. In hazardous industrial environment,
where human presence has to be avoided, robots are used, which are programmed to do
specific jobs. The robots are now becoming very powerful and carry out many interesting
and complicated tasks such as hardware assembly.
2.3.4 Medical Electronics

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Almost every medical equipment in the hospital is an embedded system. These


equipments include diagnostic aids such as ECG, EEG, blood pressure measuring
devices, X-ray scanners; equipment used in blood analysis, radiation, colonoscopy,
endoscopy etc. Developments in medical electronics have paved way for more accurate
diagnosis of diseases.
2.3.5 Computer Networking
Computer networking products such as bridges, routers, Integrated Services
Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay
switches are embedded systems which implement the necessary data communication
protocols. For example, a router interconnects two networks. The two networks may be
running different protocol stacks. The routers function is to obtain the data packets from
incoming pores, analyse the packets and send them towards the destination after doing
necessary protocol conversion. Most networking equipments, other than the end systems
(desktop computers) we use to access the networks, are embedded systems
2.3.6 Tele-communications
In the field of telecommunications, the embedded systems can be categorized as
subscriber terminals and network equipment. The subscriber terminals such as key
telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The
network equipment includes multiplexers, multiple access systems, Packet Assemblers
Dissemblers (PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are
the latest embedded systems that provide very low-cost voice communication over the
Internet.
2.3.7 Wireless Technologies
Advances in mobile communications are paving way for many interesting
applications using embedded systems. The mobile phone is one of the marvels of the last
decade of the 20h century. It is a very powerful embedded system that provides voice
communication while we are on the move. The Personal Digital Assistants and the
palmtops can now be used to access multimedia services over the Internet. Mobile

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

communication infrastructure such as base station controllers, mobile switching centres


are also powerful embedded systems.
2.3.8 Security
Security of persons and information has always been a major issue. We need to
protect our homes and offices; and also the information we transmit and store.
Developing embedded systems for security applications is one of the most lucrative
businesses nowadays. Security devices at homes, offices, airports etc. for authentication
and verification are embedded systems. Encryption devices are nearly 99 per cent of the
processors that are manufactured end up in~ embedded systems. Embedded systems find
applications in. every industrial segment- consumer electronics, transportation, avionics,
biomedical engineering, manufacturing, process control and industrial automation, data
communication, telecommunication, defence, security etc. Used to encrypt the data/voice
being transmitted on communication links such as telephone lines. Biometric systems
using fingerprint and face recognition are now being extensively used for user
authentication in banking applications as well as for access control in high security
buildings.
2.3.9 Finance
Financial dealing through cash and cheques are now slowly paving way for
transactions using smart cards and ATM (Automatic Teller Machine, also expanded as
Any Time Money) machines. Smart card, of the size of a credit card, has a small microcontroller and memory; and it interacts with the smart card reader! ATM machine and
acts as an electronic wallet. Smart card technology has the capability of ushering in a
cashless society. Well, the list goes on. It is no exaggeration to say that eyes wherever you
go, you can see, or at least feel, the work of an embedded system.

2.4 Microcontroller
2.4.1 Definition
Like all good things, this powerful component is basically very simple. It is made
by mixing tested and high- quality "ingredients" (components) as per following receipt:

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

1. The simplest computer processor is used as the "brain" of the future system.
2. Depending on the taste of the manufacturer, a bit of memory, a few A/D
converters, timers, input/output lines etc. are added
3. All that is placed in some of the standard packages.
4. A simple software able to control it all and which everyone can easily learn about
has been developed.
On the basis of these rules, numerous types of microcontrollers were designed and
they quickly became man's invisible companion. Their incredible simplicity and
flexibility conquered us a long time ago and if you try to invent something about them,
you should know that you are probably late, someone before you has either done it or at
least has tried to do it.
The following things have had a crucial influence on development and success of
the microcontrollers:
1.

Powerful and carefully chosen electronics embedded in the microcontrollers can


independently or via input/output devices (switches, push buttons, sensors, LCD
displays, relays etc.), control various processes and devices such as industrial

automation, electric current, temperature, engine performance etc.


2. Very low prices enable them to be embedded in such devices in which, until
recent time it was not worthwhile to embed anything. Thanks to that, the world is
3.

overwhelmed today with cheap automatic devices and various smart appliances.
Prior knowledge is hardly needed for programming. It is sufficient to have a PC
(software in use is not demanding at all and is easy to learn) and a simple device
(called the programmer) used for loading ready-to-use programs into the
microcontroller.
So, if you are infected with a virus called electronics, there is nothing left for you

to do but to learn how to use and control its power.

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

2.4.2 Operation
Even though there is a large number of different types of microcontrollers and
even more programs created for their use only, all of them have many things in common.
Thus, if you learn to handle one of them you will be able to handle them all. A typical
scenario on the basis of which it all functions is as follows:
1.

Power supply is turned off and everything is stillthe program is loaded into the
microcontroller, nothing indicates what is about to come

2.

Power supply is turned on and everything starts to happen at high speed! The
control logic unit keeps everything under control. It disables all other circuits
except quartz crystal to operate. While the preparations are in progress, the first
milliseconds go by.

3.

Power supply voltage reaches its maximum and oscillator frequency becomes
stable. SFRs are being filled with bits reflecting the state of all circuits within the
microcontroller. All pins are configured as inputs. The overall electronics starts
operation in rhythm with pulse sequence. From now on the time is measured in
micro and nanoseconds.

4.

Program Counter is set to zero. Instruction from that address is sent to instruction
decoder which recognizes it, after which it is executed with immediate effect.

5.

The value of the Program Counter is incremented by 1 and the whole process is
repeated...several million times per second.

Department of ECE, MRITS

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Fig 2.1: Microcontroller Architecture

2.5 Inside Microcontroller


As you can see, all the operations within the microcontroller are performed at
high speed and quite simply, but the microcontroller itself would not be so useful if there
are not special circuits which make it complete. In continuation, we are going to call your
attention to them.

Department of ECE, MRITS

10

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

2.5.1 Read Only Memory (ROM)


Read Only Memory (ROM) is a type of memory used to permanently save the
program being executed. The size of the program that can be written depends on the size
of this memory. ROM can be built in the microcontroller or added as an external chip,
which depends on the type of the microcontroller. Both options have some disadvantages.
If ROM is added as an external chip, the microcontroller is cheaper and the program can
be considerably longer. At the same time, a number of available pins is reduced as the
microcontroller uses its own input/output ports for connection to the chip. The internal
ROM is usually smaller and more expensive, but leaves more pins available for
connecting to peripheral environment. The size of ROM ranges from 512B to 64KB.
2.5.2 Random Access Memory (RAM)
Random Access Memory (RAM) is a type of memory used for temporary storing
data and intermediate results created and used during the operation of the
microcontrollers. The content of this memory is cleared once the power supply is off. For
example, if the program performs an addition, it is necessary to have a register standing
for what in everyday life is called the sum. For that purpose, one of the registers in
RAM is called the "sum" and used for storing results of addition. The size of RAM goes
up to a few KBs.
2.5.3 Electrically Erasable Programmable ROM (EEPROM)
The EEPROM is a special type of memory not contained in all microcontrollers.
Its contents may be changed during program execution (similar to RAM), but remains
permanently saved even after the loss of power (similar to ROM). It is often used to store
values, created and used during operation (such as calibration values, codes, values to
count up to etc.), which must be saved after turning the power supply off. A disadvantage
of this memory is that the process of programming is relatively slow. It is measured in
milliseconds.

Department of ECE, MRITS

11

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

2.5.4 Special Function Registers (SFR)


Special function registers are part of RAM memory. Their purpose is predefined
by the manufacturer and cannot be changed therefore. Since their bits are physically
connected to particular circuits within the microcontroller, such as A/D converter, serial
communication module etc., any change of their state directly affects the operation of the
microcontroller or some of the circuits. For example, writing zero or one to the SFR
controlling an input/output port causes the appropriate port pin to be configured as input
or output. In other words, each bit of this register controls the function of one single pin.
2.5.5 Program Counter
Program Counter is an engine running the program and points to the memory
address containing the next instruction to execute. After each instruction execution, the
value of the counter is incremented by 1. For this reason, the program executes only one
instruction at a time just as it is written. Howeverthe value of the program counter can
be changed at any moment, which causes a jump to a new memory location. This is
how subroutines and branch instructions are executed. After jumping, the counter
resumes even and monotonous automatic counting +1, +1, +1

2.6 Block Diagram of project


Block diagram consists of a micro-controller (AT89S52), Power Supply, LCD
Display (16X2 Display), APR33A3 (Voice module), Ultrasonic Sensor, Speaker. The
Block Diagram is shown below to get a better understanding of the project

Department of ECE, MRITS

12

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Fig 2.2: Block Diagram of Project

Department of ECE, MRITS

13

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

CHAPTER 3
HARDWARE DESCRIPTION
3.1 AT89S52
3.1.1 Introduction to AT89S52
The system requirements and control specifications clearly rule out the use of 16, 32
or 64 bit micro controllers or microprocessors. Systems using these may be earlier to
implement due to large number of internal features. They are also faster and more reliable
but, the above application is satisfactorily served by 8-bit micro controller. Using an
inexpensive 8-bit Microcontroller will doom the 32-bit product failure in any competitive
market place. Coming to the question of why to use 89S52 of all the 8-bit Microcontroller
available in the market the main answer would be because it has 8kB Flash and 256 bytes
of data RAM32 I/O lines, three 16-bit timer/counters, a Eight-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry.
In addition, the AT89S52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system
to continue functioning. The Power down Mode saves the RAM contents but freezes the
oscillator, disabling all other chip functions until the next hardware reset. The Flash
program memory supports both parallel programming and in Serial In-System
Programming (ISP). The 89S52 is also In-Application Programmable (IAP), allowing the
Flash program memory to be reconfigured even while the application is running.
By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89S52 is a powerful microcomputer which provides a highly flexible and cost
effective solution to many embedded control applications

Department of ECE, MRITS

14

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.1.2 PIN DIAGRAM

Fig 3.1: Pin Diagram of AT89S52

3.1.3 PIN DESCRIPTION


Pins 1-8: Port 1 Each of these pins can be configured as an input or an output.
Department of ECE, MRITS

15

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Pin 9: RS A logic one on this pin disables the microcontroller and clears the contents of
most registers. In other words, the positive voltage on this pin resets the microcontroller.
By applying logic zero to this pin, the program starts execution from the beginning.
Pins10-17: Port 3 Similar to port 1, each of these pins can serve as general input or
output. Besides, all of them have alternative functions:
Pin 10: RXD Serial asynchronous communication input or Serial synchronous
communication output.
Pin 11: TXD Serial asynchronous communication output or Serial synchronous
communication clock output.
Pin 12: INT0 Interrupt 0 input.
Pin 13: INT1 Interrupt 1 input.
Pin 14: T0 Counter 0 clock input.
Pin 15: T1 Counter 1 clock input.
Pin 16: WR Write to external (additional) RAM.
Pin 17: RD Read from external RAM.
Pin 18, 19: X2, X1 Internal oscillator input and output. A quartz crystal which specifies
operating frequency is usually connected to these pins. Instead of it, miniature ceramics
resonators can also be used for frequency stability. Later versions of microcontrollers
operate at a frequency of 0 Hz up to over 50 Hz.
Pin 20: GND Ground.
Pin 21-28: Port 2 If there is no intention to use external memory then these port pins are
configured as general inputs/outputs. In case external memory is used, the higher address
byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity
of 64Kb is not used, which means that not all eight port bits are used for its addressing,
the rest of them are not available as inputs/outputs.
Pin 29: PSEN If external ROM is used for storing program then a logic zero (0) appears
on it every time the microcontroller reads a byte from memory.

Department of ECE, MRITS

16

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Pin 30: ALE Prior to reading from external memory, the microcontroller puts the lower
address byte (A0-A7) on P0 and activates the ALE output. After receiving signal from the
ALE pin, the external register (usually 74HCT373 or 74HCT375 add-on chip) memorizes
the state of P0 and uses it as a memory chip address. Immediately after that, the ALU pin
is returned its previous logic state and P0 is now used as a Data Bus. As seen, port data
multiplexing is performed by means of only one additional (and cheap) integrated circuit.
In other words, this port is used for both data and address transmission.
Pin 31: EA By applying logic zero to this pin, P2 and P3 are used for data and address
transmission with no regard to whether there is internal memory or not. It means that
even there is a program written to the microcontroller, it will not be executed. Instead, the
program written to external ROM will be executed. By applying logic one to the EA pin,
the microcontroller will use both memories, first internal then external (if exists).
Pin 32-39: Port 0 Similar to P2, if external memory is not used, these pins can be used as
general inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when the
ALE pin is driven high (1) or as data output (Data Bus) when the ALE pin is driven low
(0).
Pin 40: VCC +5V power supply.

Department of ECE, MRITS

17

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.1.4 RAM MEMORY

Fig 3.2: RAM Memory of AT89S52

3.1.5 Special Function Registers (SFRs)


Special Function Registers (SFRs) are a sort of control table used for running and
monitoring the operation of the microcontroller. Each of these registers as well as each bit
they include, has its name, address in the scope of RAM and precisely defined purpose
such as timer control, interrupt control, serial communication control etc. Even though
there are 128 memory locations intended to be occupied by them, the basic core, shared
by all types of 8051 microcontrollers, has only 21 such registers. Rest of locations are
intentionally left unoccupied in order to enable the manufacturers to further develop
microcontrollers keeping them compatible with the previous versions. It also enables
programs written a long time ago for microcontrollers which are out of production now to
be used today.

Department of ECE, MRITS

18

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

(i) A Register (Accumulator)

Fig 3.3: Accumulator Register of AT89S52


A register is a general-purpose register used for storing intermediate results obtained
during operation. Prior to executing an instruction upon any number or operand it is
necessary to store it in the accumulator first. All results obtained from arithmetical
operations performed by the ALU are stored in the accumulator. Data to be moved from
one register to another must go through the accumulator. In other words, the A register is
the most commonly used register and it is impossible to imagine a microcontroller
without it. More than half instructions used by the 8051 microcontroller use somehow the
accumulator.
(ii) B Register
Multiplication and division can be performed only upon numbers stored in the A and
B registers. All other instructions in the program can use this register as a spare
accumulator (A).

Fig 3.4: B Register of AT89S52

Department of ECE, MRITS

19

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

(iii) R Registers (R0-R7)

Fig 3.5: Register Set (R0-R7)


This is a common name for 8 general-purpose registers (R0, R1, R2 ...R7). Even
though they are not true SFRs, they deserve to be discussed here because of their
purpose. They occupy 4 banks within RAM. Similar to the accumulator, they are used for
temporary storing variables and intermediate results during operation. Which one of these
banks is to be active depends on two bits of the PSW Register. Active bank is a bank the
registers of which are currently used.
(iv) Program Status Word (PSW) Register

Fig 3.6: Program Status Word (PSW) Register


PSW register is one of the most important SFRs. It contains several status bits that
reflect the current state of the CPU. Besides, this register contains Carry bit, Auxiliary
Carry, two register bank select bits, Overflow flag, parity bit and user-definable status
flag.
1.

P - Parity bit. If a number stored in the accumulator is even then this bit will be
automatically set (1), otherwise it will be cleared (0). It is mainly used during data
transmit and receive via serial communication.

Department of ECE, MRITS

20

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

2.

Bit 1. This bit is intended to be used in the future versions of microcontrollers.

3.

OV - Overflow occurs when the result of an arithmetical operation is larger than


255 and cannot be stored in one register. Overflow condition causes the OV bit to
be set (1). Otherwise, it will be cleared (0).

4.

RS0, RS1 - Register bank select bits. These two bits are used to select one of
four register banks of RAM. By setting and clearing these bits, registers R0-R7
are stored in one of four banks of RAM.
Table 3.1: Register Bank Select Bits
RS1

RS2

S PAC E I N R A M

Bank0 00h-07h

Bank1 08h-0Fh

Bank2 10h-17h

Bank3 18h-1Fh

1.

F0 - Flag 0. This is a general-purpose bit available for use.

2.

AC - Auxiliary Carry Flag is used for BCD operations only.

3.

CY - Carry Flag is the (ninth) auxiliary bit used for all arithmetical operations
and shift instructions.

(v) Data Pointer Register (DPTR)


DPTR register is not a true one because it doesn't physically exist. It consists of two
separate registers: DPH (Data Pointer High) and (Data Pointer Low). For this reason it
may be treated as a 16-bit register or as two independent 8-bit registers. Their 16 bits are
primarily used for external memory addressing. Besides, the DPTR Register is usually
used for storing data and intermediate results.

Department of ECE, MRITS

21

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Fig 3.7: Data Pointer Register (DPTR)


(vi) Stack Pointer (SP) Register

Fig 3.8: Stack Pointer (SP) Register


A value stored in the Stack Pointer points to the first free stack address and permits
stack availability. Stack pushes increment the value in the Stack Pointer by 1. Likewise,
stack pops decrement its value by 1. Upon any reset and power-on, the value 7 is stored
in the Stack Pointer, which means that the space of RAM reserved for the stack starts at
this location. If another value is written to this register, the entire Stack is moved to the
new memory location.

Department of ECE, MRITS

22

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

(vii) P0, P1, P2, P3 - Input/output Registers

Fig 3.9: Input/output Registers


If neither external memory nor serial communication system are used then 4 ports
within total of 32 input/output pins are available for connection to peripheral
environment. Each bit within these ports affects the state and performance of appropriate
pin of the microcontroller. Thus, bit logic state is reflected on appropriate pin as a voltage
(0 or 5 V) and vice versa, voltage on a pin reflects the state of appropriate port bit.
As mentioned, port bit state affects performance of port pins, i.e. whether they will be
configured as inputs or outputs. If a bit is cleared (0), the appropriate pin will be
configured as an output, while if it is set (1), the appropriate pin will be configured as an
input. Upon reset and power-on, all port bits are set (1), which means that all appropriate
pins will be configured as inputs.
3.1.6 Counters and Timers
As you already know, the microcontroller oscillator uses quartz crystal for its
operation. As the frequency of this oscillator is precisely defined and very stable, pulses it
generates are always of the same width, which makes them ideal for time measurement.
Such crystals are also used in quartz watches. In order to measure time between two
events it is sufficient to count up pulses coming from this oscillator. That is exactly what
the timer does. If the timer is properly programmed, the value stored in its register will be
incremented (or decremented) with each coming pulse, i.e. once per each machine cycle.
A single machine-cycle instruction lasts for 12 quartz oscillator periods, which means
that by embedding quartz with oscillator frequency of 12MHz, a number stored in the
timer register will be changed million times per second, i.e. each microsecond.
The 8051 microcontroller has 2 timers/counters called T0 and T1. As their names
suggest, their main purpose is to measure time and count external events. Besides, they
can be used for generating clock pulses to be used in serial communication, so called
Baud Rate.

Department of ECE, MRITS

23

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.1.7 Timer T0
As seen in figure below, the timer T0 consists of two registers TH0 and TL0
representing a low and a high byte of one 16-digit binary number.

Fig 3.10: Timer T0


Accordingly, if the content of the timer T0 is equal to 0 (T0=0) then both registers it
consists of will contain 0. If the timer contains for example number 1000 (decimal), then
the TH0 register (high byte) will contain the number 3, while the TL0 register (low byte)
will contain decimal number 232.

Fig 3.11: TH0 and TL0


Formula used to calculate values in these two registers is very simple:
TH0 256 + TL0 = T
Matching the previous example it would be as follows:
3 256 + 232 = 1000

Department of ECE, MRITS

24

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Fig 3.12:TH0 and TL0


Since the timer T0 is virtually 16-bit register, the largest value it can store is 65 535.
In case of exceeding this value, the timer will be automatically cleared and counting
starts from 0. This condition is called an overflow. Two registers TMOD and TCON are
closely connected to this timer and control its operation.
3.1.8 TMOD Register (Timer Mode)
The TMOD register selects the operational mode of the timers T0 and T1. As seen in
figure below, the low 4 bits (bit0 - bit3) refer to the timer 0, while the high 4 bits (bit4 bit7) refer to the timer 1. There are 4 operational modes and each of them is described
here.

Fig 3.13: TMOD Register (Timer Mode)


Bits of this register have the following function:
1) GATE1 enables and disables Timer 1 by means of a signal brought to the
INT1 pin (P3.3):
i) 1 - Timer 1 operates only if the INT1 bit is set.
ii) 0 - Timer 1 operates regardless of the logic state of the INT1 bit.

2) C/T1 selects pulses to be counted up by the timer/counter 1:


i) 1 - Timer counts pulses brought to the T1 pin (P3.5).
ii) 0 - Timer counts pulses from internal oscillator.

3) T1M1, T1M0 these two bits select the operational mode of the Timer 1.
Department of ECE, MRITS

25

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Table 3.2: TIM1 and TIM0 Modes


T1M1

T1M0

MODE

DESCRIPTION

13-bit timer

16-bit timer

8-bit auto-reload

Split mode

1) GATE0 enables and disables Timer 1 using a signal brought to the INT0 pin

(P3.2):
a) 1 - Timer 0 operates only if the INT0 bit is set.
b) 0 - Timer 0 operates regardless of the logic state of the INT0 bit.
2) C/T0 selects pulses to be counted up by the timer/counter 0:
a) 1 - Timer counts pulses brought to the T0 pin (P3.4).
b) 0 - Timer counts pulses from internal oscillator.
3) T0M1, T0M0 these two bits select the operational mode of the Timer 0.

3.1.9 Timer Control (TCON) Register


TCON register is also one of the registers whose bits are directly in control of timer
operation. Only 4 bits of this register are used for this purpose, while rest of them is used
for interrupt control to be discussed later.

Fig 3.14: Timer Control (TCON) Register

1)

TF1 bit is automatically set on the Timer 1 overflow.

2)

TR1 bit enables the Timer 1.


a)

1 - Timer 1 is enabled.

Department of ECE, MRITS

26

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

b)

0 - Timer 1 is disabled.

3)

TF0 bit is automatically set on the Timer 0 overflow.

4)

TR0 bit enables the timer 0.


a)

1 - Timer 0 is enabled.

b)

0 - Timer 0 is disabled.

3.1.10 TIMER T1
Timer 1 is identical to timer 0, except for mode 3 which is a hold-count mode. It means
that they have the same function, their operation is controlled by the same registers
TMOD and TCON and both of them can operate in one out of 4 different modes.

Fig 3.15: TIMER 1

Fig 3.16: TIMER 1 Format


3.1.11 Serial communication
UART (Universal Asynchronous Receiver and Transmitter)
One of the microcontroller features making it so powerful is an integrated UART,
better known as a serial port. It is a full-duplex port, thus being able to transmit and
receive data simultaneously and at different baud rates. Without it, serial data send and
receive would be an enormously complicated part of the program in which the pin state is
constantly changed and checked at regular intervals. When using UART, all the
programmer has to do is to simply select serial port mode and baud rate. When it's done,
Department of ECE, MRITS

27

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

serial data transmit is nothing but writing to the SBUF register, while data receive
represents reading the same register. The microcontroller takes care of not making any
error during data transmission.

Fig 3.17: SBUF Register


Serial port must be configured prior to being used. In other words, it is necessary to
determine how many bits is contained in one serial word, baud rate and
synchronization clock source. The whole process is in control of the bits of the SCON
register (Serial Control).
(viii) Serial Port Control (SCON) Register

Fig 3.18: Serial Port Control (SCON) Register


1.

SM0 - Serial port mode bit 0 is used for serial port mode selection.

2.

SM1 - Serial port mode bit 1.

3.

SM2 - Serial port mode 2 bit, also known as multiprocessor communication


enable bit. When set, it enables multiprocessor communication in mode 2 and 3,
and eventually mode 1. It should be cleared in mode 0.

4.

REN - Reception Enable bit enables serial reception when set. When cleared,
serial reception is disabled.

5.

TB8 - Transmitter bit 8. Since all registers are 8-bit wide, this bit solves the
problem of transmitting the 9th bit in modes 2 and 3. It is set to transmit a logic 1
in the 9th bit.

6.

RB8 - Receiver bit 8 or the 9th bit received in modes 2 and 3. Cleared by
hardware if 9th bit received is a logic 0. Set by hardware if 9th bit received is a
logic 1.

Department of ECE, MRITS

28

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

7.

TI - Transmit Interrupt flag is automatically set at the moment the last bit of one
byte is sent. It's a signal to the processor that the line is available for a new byte
transmit. It must be cleared from within the software.

8.

RI - Receive Interrupt flag is automatically set upon one byte receive. It signals
that byte is received and should be read quickly prior to being replaced by a new
data. This bit is also cleared from within the software.

As seen, serial port mode is selected by combining the SM0 and SM2 bits:
SM0

SM1

MODE

DESCRIPTION

B A U D R ATE

8-bit Shift Register

1/12 the quartz frequency

8-bit UART

Determined by the timer 1

9-bit UART

9-bit UART

1/32 the quartz frequency


(1/64
the
quartz
frequency)
Determined by the timer 1

Table 3.3: SM0 and SM1 Mode selection


In mode 0, serial data are transmitted and received through the RXD pin, while
the TXD pin output clocks. The bout rate is fixed at 1/12 the oscillator frequency. On
transmit, the least significant bit (LSB bit) is sent/received first.
3.2 POWER SUPPLY
All digital circuits require regulated power supply. In this article we are going to
learn how to get a regulated positive supply from the mains supply.

Fig 3.19: Power Supply Block Diagram


Figure 3.19 shows the basic block diagram of a fixed regulated power supply. Let
us go through each block.

Department of ECE, MRITS

29

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Fig 3.24 Circuit Diagram of power supply


3.2.1 TRANSFORMER

Fig 3.20: Transformer Types


A transformer consists of two coils also called as WINDINGS namely
PRIMARY & SECONDARY.
They are linked together through inductively coupled electrical conductors also
called as CORE. A changing current in the primary causes a change in the Magnetic Field
in the core & this in turn induces an alternating voltage in the secondary coil. If load is
applied to the secondary then an alternating current will flow through the load. If we
consider an ideal condition then all the energy from the primary circuit will be transferred
to the secondary circuit through the magnetic field.

Department of ECE, MRITS

30

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

So

The secondary voltage of the transformer depends on the number of turns in the
Primary as well as in the secondary.

3.2.2 Rectifier
A rectifier is a device that converts an AC signal into DC signal. For rectification
purpose we use a diode, a diode is a device that allows current to pass only in one
direction i.e. when the anode of the diode is positive with respect to the cathode also
called as forward biased condition & blocks current in the reversed biased condition.
Bridge Rectifier

Fig 3.21: Bridge Rectifier


As the name suggests it converts the full wave i.e. both the positive & the
negative half cycle into DC thus it is much more efficient than Half Wave Rectifier & that

Department of ECE, MRITS

31

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

too without using a center tapped transformer thus much more cost effective than Full
Wave Rectifier.
Full Bridge Wave Rectifier consists of four diodes namely D1, D2, D3 and D4.
During the positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle
diodes D2 & D3 conduct thus the diodes keep switching the transformer connections so
we get positive half cycles in the output.
3.2.3 FILTER CAPACITOR
Even though half wave & full wave rectifier give DC output, none of them
provides a constant output voltage. For this we require to smoothen the waveform
received from the rectifier. This can be done by using a capacitor at the output of the
rectifier this capacitor is also called as FILTER CAPACITOR or SMOOTHING
CAPACITOR or RESERVOIR CAPACITOR. Even after using this capacitor a small
amount of ripple will remain.
We place the Filter Capacitor at the output of the rectifier the capacitor will charge
to the peak voltage during each half cycle then will discharge its stored energy slowly
through the load while the rectified voltage drops to zero, thus trying to keep the voltage
as constant as possible.

Fig 3.22: Filter Capacitor Input/output

Department of ECE, MRITS

32

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

If we go on increasing the value of the filter capacitor then the Ripple will
decrease. But then the costing will increase. The value of the Filter capacitor depends on
the current consumed by the circuit, the frequency of the waveform & the accepted
ripple.

Where,
Vr= accepted ripple voltage. (Should not be more than 10% of the voltage)
I= current consumed by the circuit in Amperes.
F= frequency of the waveform. A half wave rectifier has only one peak in one
cycle so F=25Hz
3.2.4 VOLTAGE REGULATOR
A Voltage regulator is a device which converts varying input voltage into a
constant regulated output voltage. Voltage regulator can be of two types
1)

Linear Voltage Regulator


Also called as Resistive Voltage regulator because they dissipate the excessive

voltage resistively as heat.


2)

Switching Regulators

They regulate the output voltage by switching the Current ON/OFF very rapidly.
Since their output is either ON or OFF it dissipates very low power thus achieving higher
efficiency as compared to linear voltage regulators. But they are more complex &
generate high noise due to their switching action. For low level of output power
switching regulators tend to be costly but for higher output wattage they are much
cheaper than linear regulators.

Department of ECE, MRITS

33

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

The most commonly available Linear Positive Voltage Regulators are the 78XX
series where the XX indicates the output voltage. And 79XX series is for Negative
Voltage Regulators.

Fig 3.23: Switching Regulators


After filtering the rectifier output the signal is given to a voltage regulator. The
maximum input voltage that can be applied at the input is 35V.Normally there is a 2-3
Volts drop across the regulator so the input voltage should be at least 2-3 Volts higher
than the output voltage. If the input voltage gets below the Vmin of the regulator due to
the ripple voltage or due to any other reason the voltage regulator will not be able to
produce the correct regulated voltage.
3.2.5 IC 7805
7805 is an integrated three-terminal positive fixed linear voltage regulator. It
supports an input voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a
current rating of 1 amp although lower current models are available. Its output voltage is
fixed at 5.0V. The 7805 also has a built-in current limiter as a safety feature. 7805 is
manufactured by many companies, including National Semiconductors and Fairchild
Semiconductors.
The 7805 will automatically reduce output current if it gets too hot. The last two
digits represent the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series
of regulators is designed to work in complement with the 79xx series of negative voltage
regulators in systems that provide both positive and negative regulated voltages, since the
78xx series can't regulate negative voltages in such a system.

Department of ECE, MRITS

34

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

The 7805 & 78 is one of the most common and well-known of the 78xx series
regulators, as it's small component count and medium-power regulated 5V make it useful
for powering TTL devices.
Table 3.4: Specifications of IC7805
SPECIFICATIONS

IC 7805

Vout

5V

Vein - Vout Difference

5V - 20V

Operation Ambient Temp

0 - 125C

Output Imax

1A

3.3 LCD MODULE


3.3.1 DESCRIPTION
To display interactive messages we are using LCD Module. We examine an
intelligent LCD display of two lines, 16 characters per line that is interfaced to the
controllers. The protocol (handshaking) for the display is as shown. Whereas D0 to D7th
bit is the Data lines, RS, RW and EN pins are the control pins and remaining pins are
+5V, -5V and GND to provide supply. Where RS is the Register Select, RW is the Read
Write and EN is the Enable pin.
The display contains two internal byte-wide registers, one for commands (RS=0)
and the second for characters to be displayed (RS=1). It also contains a user-programmed
RAM area (the character RAM) that can be programmed to generate any desired
character that can be formed using a dot matrix. To distinguish between these two data
areas, the hex command byte 80 will be used to signify that the display RAM address 00h
will be chosen.Port1 is used to furnish the command or data type, and ports 3.2 to3.4
furnish register select and read/write levels.

Department of ECE, MRITS

35

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

The display takes varying amounts of time to accomplish the functions as listed.
LCD bit 7 is monitored for logic high (busy) to ensure the display is overwritten. Liquid
Crystal Display also called as LCD is very helpful in providing user interface as well as
for debugging purpose. The most common type of LCD controller is HITACHI 44780
which provides a simple interface between the controller & an LCD. These LCD's are
very simple to interface with the controller as well as are cost effective.

2x16 Line Alphanumeric LCD Display


Fig 3.25: LCD Display
The most commonly used ALPHANUMERIC displays are 1x16 (Single Line &
16 characters), 2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty
characters per line).
The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The
number on data lines depends on the mode of operation. If operated in 8-bit mode then 8
data lines + 3 control lines i.e. total 11 lines are required. And if operated in 4-bit mode
then 4 data lines + 3 control lines i.e. 7 lines are required. How do we decide which mode
to use? Its simple if you have sufficient data lines you can go for 8 bit mode & if there is
a time constrain i.e. display should be faster than we have to use 8-bit mode because
basically 4-bit mode takes twice as more time as compared to 8-bit mode.

Department of ECE, MRITS

36

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Table 3.4: PINS of LCD


Pin

Symbol

Function

Vss

Ground

Vdd

Supply Voltage

Vo

Contrast Setting

RS

Register Select

R/W

Read/Write Select

En

Chip Enable Signal

7-14

DB0-DB7

Data Lines

15

A/Vee

Gnd for the backlight

16

Vcc for backlight

When RS is low (0), the data is to be treated as a command. When RS is high (1), the
data being sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD.
When RW is high (1), the program is effectively reading from the LCD. Most of the
times there is no need to read from the LCD so this line can directly be connected to Gnd
thus saving one controller line.
The ENABLE pin is used to latch the data present on the data pins. A HIGH LOW signal is required to latch the data. The LCD interprets and executes our command
at the instant the EN line is brought low. If you never bring EN low, your instruction will
never be executed.

Department of ECE, MRITS

37

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Fig 3.26: Controller to LCD Interface

3.3.2 COMMANDS USED IN LCD

Fig 3.27: Commands Used In LCD

3.4 ULTRASONIC RANGE FINDER


Department of ECE, MRITS

38

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.4.1 DESCRIPTION

Fig 3.28: Ultrasonic Sensor


A guide to using the Arduino Ultrasonic Range Detection Sensor with Arduino in
order to calculate distances from objects. In this case I'm also altering the output of an
LED with PWM according to how close an object is to the sensor. So the nearer you are
the brighter the LED. So if we start with the Arduino Ultrasonic Range Detection Sensor,
it's an IC that works by sending an ultrasound pulse at around 40 KHz. It then waits and
listens for the pulse to echo back, calculating the time taken in microseconds (1
microsecond = 1.0 x 10-6 seconds). You can trigger a pulse as fast as 20 times a second
and it can determine objects up to 3 meters away and as near as 3cm. It needs a 5V power
supply to run.
Adding the Arduino Ultrasonic Range Detection Sensor to the Arduino is very
easy, only 4 pins to worry about. Power, Ground, Trigger and Echo. Since it needs 5V
and Arduino provides 5V I'm obviously going to use this to power it. Below is a diagram
of my Arduino Ultrasonic Range Detection Sensor, showing the pins. There are 2 sets of
5 pins, 1 set you can use, the other is for programming the PIC chip so don't touch them!
3.4.2 Specification:
1.

Working Voltage : 5V(DC) Working

2.

Current: max 15 ma

Department of ECE, MRITS

39

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.

Working frequency : 40HZ

4.

Output Signal: 0-5V (Output high when obstacle in range)

5.

Sentry Angle : max 15 degree

6.

Sentry Distance: 2cm - 500cm

7.

High-accuracy: 0.3cm

8.

Input trigger signal: l0us

9.

TTL impulse Echo signal: output TTL PWL signal

10.

Size: 45*20* 15mm

Fig 3.29: Trigger and Echo Radius

Department of ECE, MRITS

40

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

Note: This module is not suitable to connect with electric power, if you need to
connect this module with electronic power, then let the GND terminal of this module to
be connected first, otherwise, it will affect the normal work of the module
3.4.3 Interface:

1: VCC; 2: trig (T); 3: echo (R); 4: GND


Fig 3.30: Ultrasonic Sensor Pins

Department of ECE, MRITS

41

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.4.4 Usage
Supply module with 5 V, the output will be 5 V while obstacle in range, or OV
if not. The out pin of this module is used as a switching output when anti-theft
module, and without the feet when ranging modules,
Note: the module should be inserted in the circuit before been power, which
avoid producing high level of miss operation; if not, then power again.
3.4.5 Module Working Principle
1.

Adopt 10 trigger through supplying at least l0us sequence of high level signal,

2.

The module automatically send eight 40khz square wave and automatically
detect whether receive the returning pulse signal,

3.

If there is signals returning, through outputting high level

Test distance = (high level time * sound velocity (340M/S) / 2,


3.4.6 The circuit

Very, very simple circuit, I've used the breadboard to share the GND
connection and to add the LED which I could probably have done without the
breadboard. You'll see the most complex thing is the code later on.

3.5 APR33A3
3.5.1 DESCRIPTION
Todays consumers demand the best in audio/voice. They want crystal-clear
sound wherever they are in whatever format they want to use. APLUS delivers the
technology to enhance a listeners audio/voice experience.
The APR33A3 series are powerful audio processor along with high
performance audio analog-to-digital converters (ADCs) and digital-to-analog
converters (DACs). The aPR33A series are a fully integrated solution offering high
performance and unparalleled integration with analog input, digital processing and
analog output functionality. The APR33A3 series incorporates all the functionality
Department of ECE, MRITS

42

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

required to perform demanding audio/voice applications. High quality audio/voice


systems with lower bill-of-material costs can be implemented with the APR33A3
series because of its integrated analog data converters and full suite of qualityenhancing features such as sample-rate convertor.
The aPR33A series C2.0 is specially designed for simple key trigger, user can
record and playback the message averagely for 1, 2, 4 or 8 voice message(s) by
switch, It is suitable in simple interface or need to limit the length of single message,
e.g. toys, leave messages system, answering machine etc. Meanwhile, this mode
provides the power-management system. Users can let the chip enter power-down
mode when unused. It can effectively reduce electric current consuming to 15uA and
increase the using time in any projects powered by batteries.
3.5.2 FEATURES
1.

Operating Voltage Range: 3V ~ 6.5V

2.

Single Chip, High Quality Audio/Voice Recording & Playback Solution

3.

No External ICs Required

4.

Minimum External Components

5.

User Friendly, Easy to Use Operation

6.

Powerful 16-Bits Digital Audio Processor.

7.

Non-volatile Flash Memory Technology

8.

No Battery Backup Required

9.

Very Low Standby Current: 1uA

10.

Low Power-Down Current: 15uA

11.

Supports Power-Down Mode for Power Saving

12.

Built-in Audio-Recording Microphone Amplifier

13.

Resolution up to 16-bits

14.

Simple And Direct User Interface

15.

Averagely 1,2,4 or 8 voice messages record & playback

Department of ECE, MRITS

43

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.5.3 PIN CONFIGURATION

Fig 3.31: PIN CONFIGURATION of APR33A3

Department of ECE, MRITS

44

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

3.5.4 PIN DESCRIPTION

Fig 3.32: PIN Description of APR33A3

Department of ECE, MRITS

45

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

CHAPTER 4
CIRCUIT DIAGRAM AND OPERATION
4.1 CIRCUIT DIAGRAM

Fig 4.1: Circuit Diagram of Project

Department of ECE, MRITS

46

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

4.2 OPERATION
The existing range finders measure the distance to the object using ultrasound
beam and represent it via variable tone sound signals.
This approach has limitations because the individual must remember the
lookup table between sound tone and the distance. In addition, these range finders are
incapable of detecting moving objects such as cars or people which reduce safety.
This contest entry describes the vision system which helps the blind orienting in the
surround space. As contrasted to existing systems, the proposed device combines the
usefulness, simplicity to use together with low cost. Device measures the distance to
the object and visualizes the measurement results as special slider position which
can be easily touched by blind people. Moreover, the device estimates the
neighboured objects speed using Doppler and generates the proportional to the objects
speed number of sound signals. As result, the blind individual with the proposed
system can travel efficiently and safely.
The system consist of the ultrasound transmitter TX and receiver RX, the
CPU-controlled carrier generator to form the ultrasound carrier signal, the transmitter
driver to amplify the carrier signal to the piezoelectric transmitter acceptable levels,
the signal mixer to select the Doppler frequency shift during speed measurements,
synchronous rectifier to rectify the incoming signal during distance measurements,
multiplexer, low-pass filter to suppress the high frequency mixer/rectifier products,
CPU for system control, an buzzer.

4.3 OBSTACLE DETECTION AND DISTANCE CALCULATION


4.3.1 Obstacle detection
Ultrasonic sensors are used for obstacle detection and calculation of its
adaptive distance from the visually impaired person. Ultrasonic sensors are used in
pair as transceivers. One device which emits sound waves is called as transmitter and
other who receives echo is known as receiver. These sensors work on a principle
similar to radar or sonar which detects the object with the help of echoes from sound
waves. An algorithm is implemented in C-language on AT89S52 microcontroller. The
time interval between sending the signal and receiving the echo is calculated to
Department of ECE, MRITS

47

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

determine the distance to an object. As these sensors use sound waves rather than light
for object detection, so can be comfortably used in ambient outdoor application. Five
ultrasonic sensor pairs are used in this system.
Input Requirement: A Working Voltage: 5V (DC) A Working Current:
15mA .A Input trigger signal: 10us impulse TTL
Output Signals: An Echo signal: PWM signal. Time required for sound signal
to travel twice between source and obstacle. A Range: 5 meters.
4.3.2 Distance calculation
For distance calculation following equation is used:
D= [(EPWHT) * (SV)/2]

(1)

Where,
D = Distance in cm
EPWHT = Echo pulse width high time
SV = Sound velocity in cm/s
Before concluding the obstacle distance from the subject, repeated information
sampling and averaging is performed. As ambient light conditions do not affect
ultrasonic sensors, object detection and distance calculation can be performed
accurately.

4.4 COMMUNICATION BETWEEN SYSTEM AND SUBJECT


This system can understand 500 meters distant object / obstacle in any
direction. This system announces calculated real time distance as it is in meters or
centimetres using speech messages. To make distance understanding more appealing
to the subject, speech messages can be stored in a universal language.
4.4.1 Speech warning messages for conveying detected conditions to subject
Many researchers [10, 11, 12] used vibration array, buzzer based audio
frequency clips or text to speech conversion for announcing any detected condition to
the subject. This system uses pre-recorded speech messages for conveying any
Department of ECE, MRITS

48

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

detected condition to the subject. It uses APR33A3 audio recording and playback
flash memory. It can store variable duration speech messages up to 60 sec. duration.
Number of messages can be increased by reducing the duration of each message.
AT89S52 microcontroller processes real-time data collected by ultrasonic sensor array
and takes the correct decision. Based on processed data, correct decision is taken and
relevant message is invoked from the flash memory and conveyed to the subject
through earphone. Sample speech messages stored in flash memory are shown in table
1.
Table 4.1: Sample obstacle distance speech messages
SR.NO

AUDIO OUPUT

D I S TAN C E
IN METERS
Less than 50cm

50cm to 100cm

Object is less than 100cm

100cm to 150cm

Object is less than 150cm

150cm to 200cm

Object is less than 200cm

200cm to 250cm

Object is less than 250cm

250cm to 300m

Object is less than 300cm

Object is less than 50cm

Formal distance scaling (with speech message) 1 Less than 70 cm Object is


very close 2 70 cm to 99 cm Object is at 1 meter distance 3 100 cm to 199 cm Object
is at 2 meter distance 4 200 cm to 299 cm Object is at 3 meter distance 5 300 cm to
399 cm Object is at 4 meter distance 6 400 cm to 499 cm Object is at 5 meter
distance.
4.4.2 Flexibility to use any language for speech warning messages
For speech assisted navigation, many researchers are using text to speech
conversion. In such cases researchers are converting text into English language only.
As this system uses APR33A3 flash memory to store the pre-recorded speech
messages, there is no barrier for usage of any language. Any appealing universal
language can be used for recording speech warning messages. This system offers a
simple mechanism for recording and storing such speech warning messages.
Department of ECE, MRITS

49

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

CHAPTER 5
RESULT AND ANALYSIS
5.1 Test Methodology
Ultrasonic sensors, AT89S52 and APR9600 are tested individually as well as
an integrated system. As ultrasonic sensors work on principle of echo, study of its
reflection properties on different object surfaces is very important. Four such tests are
carried on concrete wall, static human body, wood and metal. Surface smoothness
plays key role in obstacle detection. Smooth surface object can be detected from
maximum detection range of ultrasonic sensors.
Metal surface gives highest reflections and then concrete wall, wood and
human body. These four surfaces are considered for testing as subject can come across
any of them during navigation. All these tests are carried out in laboratory
environment and their readings are recorded. Details of test carried and their distance
range outcomes are given in table 5.1.

Table 5.1: Response of ultrasonic sensor to different object surface


O B S TA C L E
S U R FAC E

DETECTION RANGE IN CM
Test 1

Test 2

Test 3

Test 4

Metal

490

485

476

480

Concrete wall

412

446

437

450

Wood

400

402

412

406

Human Body

392

380

401

394

Department of ECE, MRITS

50

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

5.2 RESULT

Figure 5.1 Final output snap shot

Department of ECE, MRITS

51

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

A wearable system prototype is developed by integration five ultrasonic sensor


pairs on customized spectacles & waist belt, APR33A3 flash memory, earphone with
AT89S52 microcontroller. After blindfolding the person, he was asked to walk
through the corridor where different type of obstacles has been placed within 10 meter
range. During the experiment, users walking motion is recorded. Time taken by the
users (trained and novice) for successfully walking through the obstacles is measured
and travel speed for each test has been calculated. It is that average speed of a trained
and novice users are 0.76 and 0.38 m/s respectively. In comparison with the traveling
speed of the sighted people (1.4 m/s), this result is acceptable. The accuracy of the
device in finding out obstacles is also very good. This result shows that training of the
user is one of the important factors for gaining high traveling speed and also to
increase the user confidence to choose obstacle free path.

Department of ECE, MRITS

52

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

CHAPTER 6
CONCLUSION AND FUTURE SCOPE
6.1 CONCLUSION
This wearable electronic navigation system is successfully tested on blind
folded subjects in indoor environment. Less training time is required to use this
system. With rigorous training, system can be used for outdoor navigation also.
Considering the expectations and requirements of the visually impaired and
blind people, this system offers a low cost, reliable, portable, low power and robust
solution for smooth navigation. Though the system is light weight, but hard wired
with sensors and other components. Further wearable aspect of this system can be
improved using wireless connectivity between the system components. This system is
developed considering visually impaired and blind people in developing countries.

6.2 FUTURE SCOPE


In future we would see more compact and more user friendly devices which
can be operated with ease and comfort. We are presently using this application in
various projects like Automated parking systems, Velocity meter, Automatic door
systems and other applications.
By adding more sensors and appropriate technology we can make it more
compatible and mobile. We would see the future tech more user friendly in terms of
size and material.

Department of ECE, MRITS

53

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

REFFERENCES
[1] Margrain, TH. Helping blind and partially sighted people to read: the
effectiveness of low vision aids. British Journal of Ophthalmology. Pp.919-922,
2000.
[2] Blindness and Visual Impairment: Global Facts.http://www.vision202 -0.org. [3]
A. Dodds, D. Clark-Carter, and C. Howarth, The sonic Pathfinder: an evaluation,
Journal of Visual Impairment and Blindness, vol. 78, no. 5, pp. 206207, 1984.
[4] A. Heyes, A polaroid ultrasonic travel aid for the blind, Journal of Visual
Impairment and Blindness, vol. 76, pp. 199 201, 1982.
[5] I. Ulrich, and J. Borenstein, The guide cane-Applying mobile robot
technologies to assist the visually impaired, IEEE Transaction on Systems, Man, and
Cybernetics-Part A: Systems and Humans, vol. 31, no.2, pp. 131-136, 2001. [6] J.
Barth, and E. Foulhe, Preview: A neglected variable in orientation and mobility,
Journal of Visual Impairment and Blindness, vol. 73, no.2, pp. 4148, 1979.
[7] S. Shoval, J. Borenstein, and Y. Koren, The NavBelt- A computerized travel aid
for the blind based on mobile robotics technology, IEEE Transactions on Biomedical
Engineering, vol. 45, no 11, pp. 1376-1386,1998.
[8] P. Meijer, An Experimental System for Auditory Image Representations, IEEE
Transactions on Biomedical Engineering, vol.39, no 2, pp. 112-121, Feb 1991.
[9] G. Sainarayanan, On Intelligent Image Processing Methodologies Applied to
Navigation Assistance for Visually Impaired, Ph. D. Thesis,University Malaysia
Sabah, 2002.
[10] G. Balakrishnan, G. Sainarayanan, R. Nagarajan and S. Yaacob,Wearable RealTime Stereo Vision for the Visually Impaired, Engineering Letters, vol. 14, no. 2,
2007.
[11] G. P. Fajarnes, L. Dunai, V. S. Praderas and I. Dunai, CASBLiP- a new
cognitive

object

detection

and

orientation

system

for

impaired

people,

Proceedings of the 4th International Conference on Cognitive Systems,ETH Zurich,


Switzerland, 2010.
Department of ECE, MRITS

54

ULTRASONIC NAVIGATION FOR BLIND WITH AUDIO INTERFACE

[12] Amit kumar, M. Manjunatha and J. Mukhopadhyay, An Electronic Travel Aid


for Navigation of Visually Impaired Person, Proceeding of the 3rd International
Conference on Communication Systems and Networks, pp.1-5, 2011.

Department of ECE, MRITS

55

You might also like