Beruflich Dokumente
Kultur Dokumente
ABSTRACT
Generally, journey in a bus is a safe and comfort factor, but due to increase in number
of buses and passenger its going be tough now a days and it will be more difficult for blind
people to travel in bus so with this project, we can make a system which can help blind people
to find the bus at the bus stop as they cannot able to see which bus is coming on the bus stop.
Generally, journey in a bus is a safe and comfort factor, but due to increase in number
of busses and passenger its going be tough now a days and it will be more difficult for blind
people to travel in bus so with this project, we can make a system which can help blind people
to find the bus at the bus stop as they
This project presents a bus detection system using RFID technology that aims to ease
the travelling and movement of blind people. The proposed system consists of two detection
subsystems, one on the buses and the other on the bus stations, database system and a
website. In the bus detection subsystem, the nearby stations will be easily detected and then
announced through a voice message inside the bus. Moreover, any existing blind person in
the surrounding area of the station will be detected by the bus subsystem to alert the bus
driver about the number of blind persons.
In the bus station subsystem, the coming buses will be detected and then announced
in the station in order to alert the blind people. A complete system prototype system. The
archived results show that the system performance is promising in terms of system
functionality, safety and cost. This bus detection device for the blind using RFID project
demonstrates the concept of bus detection using RFID. In which the blind people having RFID
reader with some microcontroller module which gives the buzzer sound whenever the
specific bus comes, the bus is equipped with RFID tag. Whenever bus comes at the bus stop
the blind person who is provided with RFID reader gets signal as it reads tag.
CHAPTER 1 – INTRODUCTION
EMBEDDED SYSTEMS
1.1Embedded Systems:
Since the embedded system is dedicated to specific tasks, design engineers can optimize it,
reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.
Physically, embedded systems range from portable devices such as digital watches and MP3
players, to large stationary installations like traffic lights, factory controllers, or the systems
controlling nuclear power plants. Complexity varies from low, with a single microcontroller
chip, to very high with multiple units, peripherals and networks mounted inside a large chassis
or enclosure.
In general, "embedded system" is not an exactly defined term, as many systems have some
element of programmability. For example, Handheld computers share some elements with
embedded systems — such as the operating systems and microprocessors which power them
— but are not truly embedded systems, because they allow different applications to be
loaded and peripherals to be connected.
An embedded system is some combination of computer hardware and software, either fixed
in capability or programmable, that is specifically designed for a particular kind of application
device. Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, and toys (as well as the more obvious cellular phone
and PDA) are among the myriad possible hosts of an embedded system. Embedded systems
that are programmable are provided with a programming interface, and embedded systems
programming is a specialized occupation.
Certain operating systems or language platforms are tailored for the embedded market, such
as Embedded Java and Windows XP Embedded. However, some low-end consumer products
use very inexpensive microprocessors and limited storage, with the application and operating
system both part of a single program. The program is written permanently into the system's
memory in this case, rather than being loaded into RAM (random access memory), as
programs on a personal computer are.
The uses of embedded systems are virtually limitless, because every day new products are
introduced to the market that utilizes embedded computers in novel ways. In recent years,
hardware such as microprocessors, microcontrollers, and FPGA chips have become much
cheaper. So, when implementing a new form of control, it' s wiser to just buy the generic
chip and write your own custom software for it. Producing a custom-made chip to handle a
particular task or set of tasks costs far more time and money. Many embedded computers
even come with extensive libraries, so that &out writing your own software & quote; becomes
a very trivial task indeed. From an implementation viewpoint, there is a major difference
between a computer and an embedded system. Embedded systems are often required to
provide Real-Time response. The main elements that make embedded systems unique are its
reliability and ease in debugging.
1.1.2Debugging:
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. 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
analyser , for instance.
1.1.3Reliability:
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
unreliable mechanical moving parts such as disk drives, switches or buttons are avoded.
Specific reliability issues may include:
•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
• Designing with a Trusted Computing Base (TCB) architecture [6] ensures a highly
secure & reliable system environment
We are living in the Embedded World. You are surrounded with many embedded products
and your daily life largely depends on the proper functioning of these gadgets. Television,
Radio, CD player of your living room, Washing Machine or Microwave Oven in your kitchen,
Card readers, Access Controllers, Palm devices of your workspace enable you to do many of
your tasks very effectively. Apart from all these, many controllers embedded in your car take
care of car operations between the bumpers and most of the times you tend to ignore all
these controllers. In recent days, you are showered with variety of information about these
embedded controllers in many places. All kinds of magazines and journals regularly dish out
details about latest technologies, new devices; fast applications which make you believe that
your basic survival is controlled by these embedded products. Now you can a agree to the
fact that these embedded products have successfully invaded into our world. You must be
wondering about these embedded controllers or systems. What is this Embedded System?
The computer you use to compose your mails, or create a document or analyze the database
is known as the standard desktop computer. These desktop computers are manufactured to
serve many purposes and applications. You need to install the relevant software to get the
required processing facility. So, these desktop computers can do many things. In contrast,
embedded controllers’ carryout a specific work for which they are designed. Most of the time,
engineers design these embedded controllers with a specific goal in mind. So, these
controllers cannot be used in any other place.
From in-orbit embedded systems to jumbo jets to vital battlefield networks, designers of
mission critical aerospace and defines systems requiring real-time performance, scalability,
and high availability facilities consistently turn to the Lynx OS® RTOS and the LynxOS-178 RTOS
for software certification to DO-178B.Rich in system resources and networking services, Lynx
OS provides an off-the-shelf software platform with hard real-time response backed by
powerful distributed computing (CORBA), high reliability, software certification, and long-
term support options.
The LynxOS-178 RTOS for software certification, based on the RTCA DO-178B
standard, assists developers in gaining certification for their mission- and safety-critical
systems. Real-time systems programmers get a boost with Lynx Works' DO-178B RTOS
training courses.
"e; Five-nine& quot; availability, Compact PCI hot swap support, and hard real-time
response— Lynx OS delivers on these key requirements and more for today' s carrier-
class systems. Scalable kernel configurations, distributed computing capabilities, integrated
communications stacks, and fault-management facilities make Lynx OS the ideal choice for
companies looking for a single operating system for all embedded telecommunications
applications—from complex central controllers to simple line/trunk cards.
Lynx Works Jumpstart for Communications package enables OEMs to rapidly develop mission-
critical communications equipment, with pre-integrated, state-of-the-art, data networking
and porting software components—including source code for easy customization.
The Lynx Certifiable Stack (LCS) is a secure TCP/IP protocol stack designed especially for
applications where standards certification is required.
As the number of powerful embedded processors in consumer devices continues to rise, the
Blue Cat® Linux® operating system provides a highly reliable and royalty-free option for
systems designers. And as the wireless appliance revolution rolls on, web-enabled navigation
systems, radios, personal communication devices, phones and PDAs all benefit from the cost-
effective dependability, proven stability and full product life-cycle support opportunities
associated with Blue Cat embedded Linux. Blue Cat has teamed up with industry leaders to
make it easier to build Linux mobile phones with Java integration. for makers of low-cost
consumer electronic devices who wish to integrate the Lynx OS Seal-time operating system
into their products, we offer special MSRP-based pricing to reduce royalty fees to a negligible
portion of the device' s MSRP.
Designers of industrial and process control systems know from experience that Lynx Works
operating systems provide the security and reliability that their industrial*applications
require. From ISO 9001 certification to fault-tolerance, POSIX conformance, secure
partitioning and high availability, we' vet got it all. Take advantage of our 20 years of
experience conformance, secure partitioning and high availability, we' vet got it all. Take
advantage of our 20 years of experience.
80386, 80486, and the Pentium) or Motorola' s 680X0 family (68000, 68010, 68020,
68030, 68040, etc.). These microprocessors contain no RAM, no ROM, and no I/O ports on
the chip itself. For this reason, they are commonly referred to as general-purpose
Microprocessors. A system designer using a general-purpose microprocessor such as the
Pentium or the 68040 must add RAM, ROM, I/O ports, and timers externally to make them
functional. Although the addition of external RAM, ROM, and I/O ports makes these systems
bulkier and much more expensive, they have the advantage of versatility such that the
designer candecide on the amount of RAM, ROM and I/O ports needed to fit the task at hand.
This is not the case with Microcontrollers. A Microcontroller has a CPU (a microprocessor) in
addition to a fixed amount of RAM, ROM, I/O ports, and a timer all on a single chip. In other
words, the processor, the RAM, ROM, I/O ports and the timer are all embedded together on
one chip; therefore, the designer cannot add any external memory, I/O ports, or timer to it.
The fixed amount of on- chip ROM, RAM, and number of I/O ports in Microcontrollers makes
them ideal for many applications in which cost and space are critical. In many applications,
for example a TV remote control, there is no need for the computing power of a 486 or even
an 8086 microprocessor. These applications most often require some I/O operations to read
signals and turn on and off certain bits.
The term microcontroller and microprocessor have always been confused with each other.
Both of them have been designed for real time application. They share many common
features and at the same time they have they have significant difference. Both the IC’s i.e.,
the microprocessor and microcontroller cannot be distinguished by looking at them. They are
available in different version starting from 6 pin to as high as 80 to 100 pins or even higher
depending on the features.
But this is not the case with microcontrollers. Microcontroller has a CPU,in addition with a
fixed amount of RAM,ROM and other peripherals all embedded on a single chip. Depending
on the input , some processing needs to be done and output is delivered. In, such cases the
relationship between input and output is not defined they need high amount of resources like
RAM,ROM, I/0 ports etc. Microprocessor cannot be used stand alone . Comparing
microcontroller and microprocessor in terms of cost is not justified. Undoubtedly a
microcontroller is far cheaper then a microprocessor. The clock speed of the microprocessor
is quite high as the compared to the microcontroller.
The EM-18 RFID Reader module operating at 125 kHz is an inexpensive solution for your
RFID based application. The Reader module comes with an on-chip antenna and can be
powered up with a 5V power supply. Power-up the module and connect the transmit pin of
the module to receive pin of your microcontroller. Show your card within the reading distance
and the card number is thrown at the output. Optionally the module can be configured for
also a Wigand output.
Typical Applications
• e- Payment
• Access Control
• PC Access
• Authentication
• Printer / Production
Features
Current Consumption 50 mA
Antenna Integrated
1.3 PIC: -
PIC is a Peripheral Interface Microcontroller which was developed in the year 1993 by the
General Instruments Microcontrollers. It Is controlled by software and programmed in such a
way that it performs different tasks and controls a generation line. PIC microcontrollers are
used in different new applications such as smart phones, audio accessories and advanced
medical devices. There are many PICs available in the market ranging from PIC16C84 to
PIC16C84. These types of PICs are affordable flash PICs
PIC16F1789
The PIC microcontroller is based on RISC architecture. Its memory architecture follows the
Harvard pattern of separate memories for program and data, separate buses.
The hardware capabilities of PIC devices range from 6 -pin SMD , to 8-pin DIP chips up to
144- pin SMD chips , with discrete I/O pins ,ADC and DAC modules ,and communications. The
manufacturer supplies computers software for developing now as MPLAB X, assemblers and
C/C++ compilers, and programmer by debugger hardware Under the MPLAB and PICK it
series.
2.1 Description:-
Generally, journey in a bus is a safe and comfort factor, but due to increase in number of
busses and passenger its going be tougher now a days and it will be more difficult for blind
people to travel in bus so with this project, we can make a system which can help blind people
to find the bus at the bus stop as they cannot able to see which bus is coming on the bus stop.
By providing a device which can help them to know which bus is coming on bus stop. In
the project we have microcontroller, RFID reader and voice IC for voice announcement with
Speaker as basic blocks. Whenever the bus come to stop the RFID reader will be
reading the tag (which is given to every bus for particular route) and depending upon the tag
it will give voice intimation by using speaker the blind person can know the bus number.
The system is designed to provide information system for the visually impaired
assisting with voice command signals that utilizes RFID technology for task of identification as
shown in block diagram. In this system a RFID reader is installed at every bus stop which is
integrated with microcontroller and voice assistance equipment’s. The buses are equipped
with a unique RFID tag. When a bus approaches a bus stop the RFID reader receives the
information of the bus through a unique identification number of the bus and its route map
and trigger a signal to voice-based playback system. The voice-based play back system is
already fed the information and is transmitted out through speaker.
PIC stands for peripheral interface controller. PIC microcontroller was developed by
microchip technology in 1993. It was developed for supporting PDP computers to control its
peripheral devices and that’s why it was named peripheral interface controller.PIC
microcontroller are of low cost, very fast and easy for the programming and execution of
program . Their interfacing with other peripheral is also very easy.
Microchip company are divided into four large families. In this PIC microcontroller
architecture article, I will explain step by step about PIC microcontroller architecture and
compounds. The transfer of one bit of data at a time consecutively over a communication
channel is called serial communication . There are three protocols of serial communication.
USART: It stands for universal synchronous and asynchronous receiver and transmitter which
provides a serial communication in two devices. In this protocol data is transmitter and
received bit by bit through a single wire according to the clock pulses . To send and receive
data serially the PIC microcontroller has two pins TXD and RXD. SPI stands for serial peripheral
interface. It is used to send data between PIC microcontroller and other peripherals like
sensors, shift register and SD cards. Three wire SPI communication is supported in PIC
microcontroller between two devices on a common clock source.
2.2.1 Microcontroller:
1. LPC2148 microcontroller: -
with minimal performance penalty. The meaning of LPC IS Low Power Low-Cost
microcontroller. This is 32-bit microcontroller manufactured by Philips semiconductors (NXP).
Due to their tiny size and low power consumption. LPC2148 is ideal for applications where
miniaturization is a key requirement, such as access control and point – of – sale.
2.2.2 LCD: -
Liquid Crystal Display (LCD) consists of rod – shaped tiny molecules sandwiched between a
flat piece of glass on an opaque substrate. These rod – shaped molecules in between the
plates align into two different physical positions based on different physical positions based
on the electric charge is applied they align to block the light entering through them, whereas
when no – charge is applied they become transparent.
Features of LCD:
2.2.3 RFID:
The reader write is used to communicate with tags that may pass within range. The RFID
reader writer will normally be located in a fixed position and will be used to interrogate an
RFID tag. Dependent upon the application and the format of the system and the RFID reader
/ writer, data may also be written to the RFID tag.
RFID tag:
RFID tags may also be called RFID transponders and are typically located on items that are
mobile. They are small and generally cheap so that they can be attached to low cost items
that need to have information associated with them. They are also generally considered as
being disposable. The RFID tag contains data that is relayed to the reader, and in some
systems, it may also be possible to update the data within the tag to indicate that the tag and
hence the item has undergone a specific stage in a process, etc.
Like all system these days, RFID systems need application software to run the overall system.
With many systems there will be a number of different reader / writers and the data to and
from these needs to be coordinated and analyzed. Application software will be required for
these.
Although these RFID systems will vary according to its requirements, these are the main
elements which can be found. RFID technology has become widespread in its use. It offers
may advantages and RFID is a particularly versatile system, being able to be used in many
areas from shops
3.1.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 commonly 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 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 computer sand household electronics.
• 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:
Figure 3.1.3: Circuit diagram of Regulated Power Supply with Led connection
• 230v AC mains
• Transformer
• Bridge rectifier(diodes)
• Resistor
3.1.4 Transformation:
The process of transforming energy from one device to another is called transformation. For
transforming energy, we use transformers.
Transformers:
A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled conductors without changing its frequency. A varying current in the first
or primary winding creates a varying magnetic flux in the transformer's core, and thus a
varying magnetic field through the secondary winding. This varying magnetic field induces a
varying electromotive force (EMF) or "voltage" in the secondary winding. This effect is called
mutual induction.
If a load is connected to the secondary, an electric current will flow in the secondary winding
and electrical energy will be transferred from the primary circuit through the transformer to
the load. This field is made up from lines of force and has the same shape as a bar magnet.
If 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.
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.
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 a smaller number of turns
because of that it accepts a smaller number of fluxes, and releases less amount of voltage.
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.1.5 shows Hi-
Watt 9V battery
The most commonly used dry-cell battery is the carbon-zinc dry cell battery .Dry-cell
batteries are made by stacking a carbon plate, a layer of electrolyte paste, and a zinc plate
alternately until the desired total voltage is achieved. The most common dry-cell batteries
have one of the following voltages: 1.5, 3, 6, 9, 22.5, 45, and 90. During the discharge of a
carbon-zinc battery, the zinc metal is converted to a zinc salt in the electrolyte, and
magnesium dioxide is reduced at the carbon electrode. These actions establish a voltage of
approximately 1.5 V.
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 volar battery uses 6 cells in series). During
discharge, the lead is converted to lead sulphate and the sulphuric acid is converted to water.
When the battery is charging, the lead sulphate is converted back to lead and lead dioxide
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.9 shows pencil battery of 1.5V.
3.1.6 Rectification:
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.
When only one diode is used to rectify AC (by blocking the negative or positive portion of
the waveform), the 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.
The Bridge rectifier circuit is shown in fig: 3.10, 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.
Like wave circuit , the half a full wave rectifier circuit produces an output voltage or current
which is purely DC or has some specified DC component . Fullwave rectifiers has some
fundamentals advantages over their half wave rectifier counter parts.
Power diodes can be connected together to form a full wave rectifier that convert AC voltage
in to pulsating DC voltage for using power supplies . The previous power diodes tutorial were
In a full wave rectifiers circuit two diodes are used, one for each half of the cycle. A multiple
winding transformer is used whose secondary winding is split equally in to two halves with a
common centre tapped connection. This configuration results in each diode conducting in
turn when its anode terminal is positive with respect to the transformer centre point C
producing an output during both half cycles , twice that for the half wave rectifier so it is 100%
efficient.
The full wave rectifier consists of two power diodes connected to a single load resistances
with each diode taking in term to supply current to the load. When the point A of the
transformer is positive with respect to point C, diode D1 conducts in the forward direction as
indicated by the arrows. When point B is positive with respect to pointC , the diode D2
conducts in the forward direction and the current flowing through the resistor R is in the same
direction for both half cycles .
As the output voltage across the resistor R is the phase sum of the two waveforms combined,
this type of full wave rectifiers circuit is known as bi-phase circuit . We can see this effect quite
clearly if we run the circuit in the partsim simulator circuit with the smoothing capacitor
removed.
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 RL in the same direction as in the previous half cycle.
Thus, a bidirectional wave is converted into a unidirectional wave.
Input Output
3.1.7 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.
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 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 also 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: 3.11 shows
voltage regulator.
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 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
Micro amp.
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.
This voice recording module offers true single chip solid state storage capability and requires
no software or microcontroller support. It provides high quality recording and play back with
single 20 sec message .One button is pushed down to record the message through the on
board electret microphone. A LED turns on during this time. The other button just has to be
momentarily pressed to replay the message . A second momentary press during play back
will stop the play back.
1. APR9600
Pin-out of the APR9600 is given in Figure 1. A typical connection of the chip is given in
Figure 2 (This is the circuit diagram of the module). Pin functions of the
It 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 micro amp.
1 -M1 Select 1st section of sound or serial 15 SP- Speaker, negative end
2 -M2 Select 2nd section or fast forward 16 VCCA Analogue circuit power supply
3 -M3 Select 3 rd. section of sound 17 MICIN Microphone input (electret type
microphone)
6 -M6 Select 6th section of sound 20 ANA-IN Audio input (accept a signal of
100 mV p-to-p)
7 OSCR Resistor to set clock frequency. See 21 ANA-OUT Audio output from the
signal
9 -M8 Select 8th section of sound or select 23 CE Reset sound track counter to
11 BE =1, beep when a key is pressed 25 MSEL2 Mode selection 2 (see Table 2)
During sound replaying, the IC’s control circuit reads analogue data from flash RAMs. The
signal then passes through a low-pass filter, a power amplifier and output to an 8 to 16 Ohm
speaker.
There are different sound recording and replaying modes (see Table 2). These modes are
selected using MSEL1 (Pin 24), MSEL2 (Pin 25) and –M8 (Pin 9). –M1 to –M7 keys have
different functions in different modes.
track, CE to stop
track, CE to stop
-M1 to –M8 to select a Pressing and hold down a key from –M1
1 1 1 sound to M8 to
Notes:
0 Press -M1 to -M8 once to replay a sound track. Press the key again to stop replaying the
track
0 Press and hold –M1 to -M8 continuously, the corresponding track will be replayed
repeatedly
0 During recording, -M1 to M8 should be pressed while the sound is being recorded.
Releasing the key terminates recording.
2. APR9600 module
The circuit diagram of the module is shown in Figure 2. The module consists of an APR9600
chip, an electret microphone, support components, a mode selection switch (-RE, MSEL1,
MSEL2 and – M8) and 9 keys (-M1 to –M8 and CE). The oscillation resistor is chosen so that
the total recording period is 60 seconds with a sampling rate of 4.2 kHz. Users can change the
value of the ROSC to obtain other sampling frequencies. It should be noted that if the
sampling rate is increased, the length of recording time is decreased. Table 3 gives the details.
An 8-16 Ohm speaker is to be used with the module. Users can select different modes using
the mode selection switch. The module is measured 80mm 55mm.
Connection points (0-8, C and B) can connect to other switches or external digital circuits. In
this case, on-board keys M1 to M8 and CE are by-passed.
This is an example of recording 8 sound tracks. The mode switch should have the following
pattern: MSEL1=1(switched to left-hand side of the mode selection switch), MSEL2=1 (left-
hand side). –M8=1 (left-hand side). RE=0 (right-hand side). The maximum length of the 8
tracks is 7.5 seconds. Press –M1 continuously and you will see BUZY LED illuminates. You can
now speak to the microphone. Recording will terminate if –M1 is released or if the recording
time exceeds 7.5 seconds. Similarly, press –M2 to -M8 to record other sound tracks.
Now makewitches at the same losoundPress otherM1 to CE to stop playing the sound trackis
playing, press the same-M8 is pressed continuously, the particular sound track will be played
continuously. Press RE=1 (switckey while a sound is being played causes a new sound track to
be playIf a key from atiod to Left. Togglek .-y again or presh–nd sideM1 t –of thM8 (press key
and retrack to re CE key mode selection switch) whilewill terminate the current sound track.
once. Whilkeepother the –
This is an example of recording sequential sound tracks. The mode switch should have the
following pattern: MSEL1=0(switched to right-hand side of the mode selection switch),
MSEL2=0 (right-hand side). –M8=1 (left-hand side). RE=0 (right-hand side). Press CE first to
reset the sound track counter to zero. Press and hold –M1 down and you will see BUZY LED
illuminates. You can now speak to the microphone. Recording will terminate if –M1 is released
or if the recording time exceeds 60 seconds (in this case you will run out the memory for your
next sound track). Press –M1 again and again to record 2nd, 3rd, 4th and other consecutive
sound tracks. Each sound track may have different lengths, but the accumulated length of all
sound tracks will not exceed 60 seconds.
Now make RE=1 (switched to Left-hand side of the mode selection switch) while keep other
switches at the same location. Toggle –M1 (press key and release) causes the 1s t sound track
to be played once. Toggle –M1 again and again will play the 2nd, 3rd, 4th and other
consecutive sound tracks. Press CE to reset the sound track counter to zero.
This is an example of recording sound tracks with forward control. The mode switch should
have the following pattern: MSEL1=0(switched to right-hand side of the mode selection
switch), MSEL2=0 (right-hand side). –M8=0 (right-hand side). RE=0 (right-hand side). Press CE
first to reset the sound track counter to zero. This mode is rather similar to the above
sequential sound recording. The only difference is that after –M1 is pressed and released, the
sound track counter does not increment itself to the next sound track location. To move to
the next sound track, –M2 should be toggled. So, if –M1 is not toggled again and again without
toggling –M2, sound will be recorded at the same sound track location.
Now make RE=1 (switched to Left-hand side of the mode selection switch) while keep other
switches at the same location. Toggle –M1 (press key and release) causes the 1s t sound track
to be played once. Toggle –M1 again and again will still play the 1s t sound track. Once –M2
is toggled,the sound track counter is incremented and the next sound can be played. Press CE
to reset the sound track count.
The total sound recording time can be varied from 32sec to 60sec 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 microcontrollers and
computers .
The APR9600 has a 28 pin DIP package . Supply voltage is between 4.5 volts to 6.5 volts.
During recording and replaying , current consumption is 25mA.In idle mode the current drops
to one micro amp .
The sampling rate is determined by the value of the OSC resistor (R8 in the circuit diagram).
It can be adjusted by users to suit their specific requirements. The relationships amongst the
resistance, sampling rate, bandwidth and recording period are shown in Table
44 4.2 2.1 60
38 6.4 3.2 40
24 8.0 4.0 32
1.Use a good quality 8 Ohm speaker with a cavity such as speakers for computer sound
systems. Do not use a bare speaker which gives you degraded sound.
2.For better sound replay quality, speak with a distance to the on-board microphone and
speak clearly. Also keep the background noise as low as possible.For even better sound replay
quality, use microphone input or Audio Line In input. If Audio Line In is used, the amplitude
of input signal should be < 100 mV p-p.
Unlike, say, a Raspberry Pi, it’s designed to attach all kinds of sensors, LEDs, small motors and
speakers, servos, etc. directly to these pins, which can read in or output digital or analog
voltages between 0 and 5 volts. The Arduino connects to your computer via USB, where you
program it in a simple language (C/C++, similar to Java) from inside the free Arduino IDE by
uploading your compiled code to the board. Once programmed, the Arduino can run with the
USB link back to your computer, or stand-alone without it — no keyboard or screen needed,
just power.
Looking at the board from the top down, this is an outline of what you will see (parts of the
board you might interact with in the course of normal use are highlighted)
Fig 4.2 Adriano Board Starting clockwise from the top centre:
➢ Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for digital
i/o (Digital Read and Digital Write) if you are also using serial communication (e.g. Serial.
Begin).
➢ Toggles External Power and USB Power (place jumper on two pins closest to desired
supply) - SV1 (purple)
➢ USB (used for uploading sketches to the board and for serial communication between the
board and the computer; can be used to power the board) (yellow)
In addition to the specific functions listed below, the digital pins on an Arduino board can
be used for general purpose input and output via the pin Mode(),Digital Read(), and Digital
Write()commands. Each pin has an internal pull-up resistor which can be turned on and off
using digital Write () (w/ a value of HIGH or LOW, respectively) when the pin is configured as
an input. The maximum current per pin is 40mA.
➢ Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On the
Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI USB-to-TTL
Serial chip. On the Arduino BT, they are connected to the corresponding pins of the
WT11Bluetooth module. On the Arduino Mini and Lilypad Arduino, they are intended for use
with an external TTL serial module (e.g. the Mini-USB Adapter).
➢ External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attach Interrupt ()function for
details.
➢ PWM: 3, 5, 6, 9, 10, and 11 Provide 8-bit PWM output with the analog Write()function. On
boards with an ATmega8, PWM output is available only on pins 9, 10, and 11.
➢ BT Reset: 7. (Arduino BT-only) Connected to the reset line of the Bluetooth module.
➢ SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which,
although provided by the underlying hardware, is not currently included in the Arduino
language.
➢ LED: 13. On the Diecimila and Lilypad, there is a built-in LED connected to digital pin 13.
When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
In addition to the specific functions listed below, the analog input pins support 10-bit analog-
to-digital conversion (ADC) using the analog Read()function. Most of the analog inputs can
also be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital
pin 19. Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.
➢ I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire
library(documentation on the Wiring website).
➢ VIN (sometimes labelled "9V"): The input voltage to the Arduino board when it's using an
external power source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying voltage via the power
jack, access it through this pin. Also note that the Lily Pad has no VIN pin and accepts only a
regulated input.
➢ 5V: The regulated power supply used to power the microcontroller and other components
on the board. This can come either from VIN via an on-board regulator, or be supplied by USB
or another regulated 5V supply. 3V3 (Decimal-only): A 3.3-volt supply generated by the on-
board FTDI chip.
➢ AREF: Reference voltage for the analog inputs. Used with analogy Reference ().
➢ Reset: (Decimal-only) Bring this line LOW to reset the microcontroller. Typically used to
add a reset button to shields which block the one on the board.
4.2.4 Atmega328
Pin diagram
Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-
directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up
resistors (selected for each bit).
The Port A output buffers have symmetrical drive characteristics with both high sink and
source capability.
When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source
current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a
reset condition becomes active, even if the clock is not running.
Port B (PB7-PB0):
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition
becomes active, even if the clock is not running. Port B also serves the functions of various
special features of the ATmega32.
Port C (PC7-PC0):
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port C output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port C pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition
becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up
resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. The
TD0 pin is tri-stated unless TAP states that shift out data are entered. Port C also serves the
functions of the JTAG interface.
Port D (PD7-PD0):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port D output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port D pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition
becomes active, even if the clock is not running. Port D also serves the functions of various
special features of the ATmega32.
A low level on this pin for longer than the minimum pulse length will generate a reset, even if
the clock is not running. Shorter pulses are not guaranteed to generate a reset.
XTAL1:
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
XTAL2:
AVCC:
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally
connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to
VCC through a low-pass filter.
AREF:
4.2.5 Features:
➢ Up to 20MHz
➢ Part: ATMEGA328P-AU
➢ 1kB EEPROM
➢ 2 8-bit Timer/Counters
➢ 16-bit Timer/Counter
➢ 6 PWM Channels
➢ Serial USART
➢ Watchdog timer
➢ Analog comparator
➢ 23 IO lines
➢Digital I/O Pins are 14 (out of which 6 provide PWM output) ➢Analog Input Pins are 6.
The AVR core combines a rich instruction set with 32 general purpose working registers. All
the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle.
The resulting architecture is more code efficient while achieving throughputs up to ten times
faster than conventional CISC microcontrollers.
BLOCK DIAGRAM:
4.2.7 Overview
This section discusses the AVR core architecture in general. The main function of the CPU core
is to ensure correct program execution. The CPU must therefore be able to access memories,
perform calculations, control peripherals, and handle interrupts.
In order to maximize performance and parallelism, the AVR uses a Harvard architecture –
with separate memories and buses for program and data. Instructions in the program
memory are executed with a single level pipelining. While one instruction is being executed,
the next instruction is pre-fetched from the program memory. This concept enables
instructions to be executed in every clock cycle. The program memory is In-System
Reprogrammable Flash memory. The fast-access Register File contains 32 x 8-bit general
purpose working registers with a single clock cycle access time. This allows single-cycle
Arithmetic Logic Unit (ALU) operation. In a typical ALU operation, two operands are output
from the Register File, the operation is executed, and the result is stored back in the Register
File– in one clock cycle.
Six of the 32 registers can be used as three 16-bit indirect address register pointers for Data
Space addressing – enabling efficient address calculations. One of these address pointers can
also be used as an address pointer for look up tables in Flash program memory. These added
function registers are the 16-bit X, Y-, and Z-register, described later in this section. The ALU
supports arithmetic and logic operations between registers or between a constant and a
register. Single register operations can also be executed in the ALU. After an arithmetic
operation, the Status Register is updated to reflect information about the result of the
operation. Program flow is provided by conditional and unconditional jump and call
instructions, able to directly address the whole address space. Most AVR instructions have a
single 16-bit word format. Every program memory address contains a 16- or 32-bit instruction.
Program Flash memory space is divided in two sections, the Boot Program section and the
Application Program section. Both sections have dedicated Lock bits for write and read/write
protection. The SPM instruction that writes into the Application Flash memory section must
reside in the Boot Program section. During interrupts and subroutine calls, the return address
Program Counter (PC) is stored on the Stack. The Stack is effectively allocated in the general
data SRAM, and consequently the Stack size is only limited by the total SRAM size and the
usage of the SRAM. All user programs must initialize the SP in the Reset routine (before
subroutines or interrupts are executed). The Stack Pointer (SP) is read/write accessible in the
I/O space. The data SRAM can easily be accessed through the five different addressing modes
supported in the AVR architecture.
The memory spaces in the AVRarchitecture are all linear and regular memory maps. A
flexible interrupt module has its control registers in the I/O space with an additional Global
Interrupt Enable bit in the Status Register. All interrupts have a separate Interrupt Vector in
the Interrupt Vector table. The interrupts have priority in accordance with their Interrupt
Vector position. The lower the Interrupt Vector address, the higher the priority.
The high-performance AVR ALU operates in direct connection with all the 32 general purpose
working registers. Within a single clock cycle, arithmetic operations between general purpose
registers or between a register and an immediate are executed. The ALU operations are
divided into three main categories – arithmetic, logical, and bit functions. Some
implementations of the architecture also provide a powerful multiplier supporting both
signed/unsigned multiplication and fractional format. See the “Instruction Set” section for a
detailed description.
The Status Register contains information about the result of the most recently executed
arithmetic instruction. This information can be used for altering program flow in order to
perform conditional operations. Note that the Status Register is updated after all ALU
operations, as specified in the Instruction Set Reference. This will in many cases remove the
need for using the dedicated compare instructions, resulting in faster and more compact
code. The Status Register is not automatically stored when entering an interrupt routine and
restored when returning from an interrupt. This must be handled by software.
The Global Interrupt Enable bit must be set for the interrupts to be enabled. The individual
interrupt enable control The Global Interrupt Enable bit must be set for the interrupts to be
enabled. The individual interrupt enable control is then performed in separate control
registers. If the Global Interrupt Enable Register is cleared, none of the interrupts are enabled
independent of the individual interrupt enable settings. The I-bit is cleared by hardware after
an interrupt has occurred, and is set by the RETI instruction to enable subsequent interrupts.
The I-bit can also be set and cleared by the application with the SEI and CLI instructions, as
described in the instruction set reference.
The Bit Copy instructions BLD (Bit Load) and BST (Bit Store) use the T-bit as source or
destination for the operated bit. A bit from a register in the Register File can be copied into T
by the BST instruction, and a bit in T can be copied into a bit in a register in the Register File
by the BLD instruction.
The Half Carry Flag H indicates a Half Carry in some arithmetic operations The Half Carry Flag
H indicates a Half Carry in some arithmetic operations. Half Carry Is useful in BCD arithmetic.
See the
The S-bit is always an exclusive or between the Negative Flag N and the Two’s Complement
Overflow Flag V. See the “Instruction Set Description” for detailed information.
The Register File is optimized for the AVR Enhanced RISC instruction set. In order to achieve
the required performance and flexibility, the following input/output schemes are supported
by the Register File:
Most of the instructions operating on the Register File have direct access to all registers, and
most of them are single cycle instructions. As shown in Figure 6-2, each register is also
assigned a data memory address, mapping them directly into the first32 locations of the user
data space. Although not being physically implemented as SRAM locations, this memory
organization provides great flexibility in excess of the registers, as the X-, Y-, and Z-pointer
registers can be set to index any register.
Fig 4.3.1 Structure of the 32 general purpose working registers in the CPU
The registers R26:R31 have some added functions to their general-purpose usage. These
registers are 16-bit address pointers for indirect addressing of the data space. The three
indirect address registers X, Y, and Z are defined as described in
In the different addressing modes these address registers have functions as fixed
displacement, automatic increment, and automatic decrement.
The Stack is mainly used for storing temporary data, for storing local variables and for storing
return addresses after interrupts and subroutine calls. Note that the Stack is implemented as
growing from higher to lower memory locations. The Stack Pointer Register always points to
the top of the Stack. The Stack Pointer points to the data SRAM Stack area where the
Subroutine and Interrupt Stacks are located. A Stack PUSH command will decrease the Stack
Pointer.
The Stack in the data SRAM must be defined by the program before any subroutine calls are
executed or interrupts are enabled. Initial Stack Pointer value equals the last address of the
internal SRAM and the Stack Pointer must be set to point above start of the SRAM
The AVR ATmega128A Stack Pointer is implemented as two 8-bit registers in the I/O space.
The number of bits actually used is implementation dependent. Note that the data space in
some implementations of the AVR architecture is so small that only SPL is needed. In this case,
the SPH Register will not be presents and SPL - Stack Pointer High and Low Register.
Figure 4.3.2 SPH and SPL - Stack Pointer High and Low Register
The interrupt execution response for all the enabled AVR interrupts is four clock cycles
minimum. After four clock cycles the program vector address for the actual interrupt handling
routine is executed. During this four-clock cycle period, the Program Counter is pushed onto
the Stack. The vector is normally a jump to the interrupt routine, and this jump takes three
clock cycles. If an interrupt occurs during execution of a multicycle instruction, this instruction
is completed before the interrupt is served. If an interrupt occurs when the MCU is in sleep
mode, the interrupt execution response time is increased by four clock cycles. This increase
comes in addition to the start-up time from the selected sleep mode.
This section describes the different memories in the ATmega328. The AVR architecture has
two main memory spaces, the Data Memory and the Program Memory space. In addition,
theATmega328 features an EEPROM Memory for data storage. All three memory spaces are
linear and regular.
Application Program Section. The Flash memory has an endurance of at least 10,000
write/erase cycles. The ATmega328 Program Counter (PC) is 11/12/13/14 bits wide, thus
addressing the 2/4/8/16K program memory locations.
ATmega328 is a complex microcontroller with more peripheral units than can be supported
within the 64 locations reserved in the Opcode for the IN and OUT instructions. For the
Extended I/O space from 0x60 - 0xFF in SRAM, only the ST/STS/STD and LD/LDS/LDD
instructions can be used.
The lower 768/1280/1280/2303 data memory locations address both the Register File, the
I/O memory,
Extended I/O memory, and the internal data SRAM. The first 32 locations address the Register
File, the next 64 location the standard I/O memory, then 160 locations of Extended I/O
memory, and the next 512/1024/1024/2048 locations address the internal data SRAM. The
five different addressing modes for the data memory cover: Direct, Indirect with
Displacement, Indirect, Indirect with Pre-decrement, and Indirect with Post-increment. In the
Register File, Registers R26 to R31 Feature the indirect addressing pointer registers. The direct
addressing reaches the entire data space. The Indirect with Displacement mode reaches 63
address locations from the base address given by the Y- or Z register.
When using register indirect addressing modes with automatic pre-decrement and post-
increment, the address registers X, Y, and Z are decremented or incremented. The 32 general
purpose working registers, 64 I/O Registers, 160 Extended I/O Registers, and the
512/1024/1024/2048 bytes of internal data SRAM in the ATmega328 are all accessible
through all these addressing modes.
4.3.6 Interrupts
This section describes the specifics of the interrupt handling as performed in the Atmega328.
In Atmega328Each Interrupt Vector occupies two instruction words and the Reset Vector is
affected by the BOOTRST fuse, and the Interrupt Vector start address is affected by the IVSEL
bit in MCUCR.
Table 4.3.6 Reset and Interrupt Vectors in ATMEGA 328 and ATMEGA 328P
When the IVSEL bit in MCUCR is set, Interrupt Vectors will be moved to the start of the Boot
Flash Section. The address of each Interrupt Vector will then be the address in this table added
to the start address of the Boot Flash Section. Table below shows reset and Interrupt Vectors
placement for the various combinations of BOOTRST and IVSEL settings. If the program never
enables an interrupt source, the Interrupt Vectors are not used, and regular program code
can be placed at these locations. This is also the case if the Reset Vector is in the Application
section while the Interrupt Vectors are in the Boot section or vice versa.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to versionR2) programmed as a
USB-to-serial converter.
Pin out: Added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible with both the
board that uses the AVR, which operates with 5V and with the Arduino. Due that
operates with 3.3V. The second one is a not connected pin that is reserved for future
purposes.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino
platform; for a comparison with previous versions, see the index of Arduino boards.
Power
The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically. External (non-USB) power can come either from
an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm centre-positive plug into the board's power jack. Leads from a battery can be inserted
in the Gnd and Vin pin headers of the POWER connector. The board can operate on an
external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply
less than five volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
➢VIN: The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
➢ 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the
VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator,
and can damage your board. We don't advise it.
➢ 3V3. A 3.3-volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
➢ IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and
select the appropriate power source or enable voltage translators on the outputs for working
with the 5V or 3.3V.
Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Serial Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required.
The Arduino software includes a serial monitor which allows simple textual data to be sent to
and from the Arduino board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-toserial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1).
A Software Serial libraryallows for serial communication on any of the Uno's digital pins. The
ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a
Wire library to simplify use of the I2C bus. For SPI communication, use the SPI library.
4.4 Conclusion
In this chapter Arduino, ATmega328, and also about the Embedded system and its application
was discussed.
4.4.1CODE: -
#include<LiquidCrystal.h>
#define buzz 7
#define ir1 8
#define ir2 9
pin Mode (ir1, INPUT); pin Mode (ir2, INPUT); pin Mode (buz, OUTPUT);
Serial.println("WELCOME"); LCD. Clear (); lcd. set Cursor (4,0); LCD. Print ("WELCOME "); lcd.
set Cursor (0,1);
LCD. Print ("SPEED CHECKING"); lcd. set Cursor (0,1); LCD. Print ("OF VEHICLE RFID"); delay
(1500); LCD. Clear (); card. reserve (12); lcd. set Cursor (0,0);
void beep ()
void loop () {
if (digital Read(ir1) ==1) { // Serial.println("IR 1 ACTIVE"); lcd. set Cursor (6,0); LCD. Print ("V
ENTER"); delay (500); while (1) { if (digital Read(ir2) ==1)
break;
Serial. Print("C:");
///////////////////////////////
///////////////////////////////
// Serial.println("IR 2 ACTIVE");
}//*/
Serial.println("VEHICLE OVER SPEEDINGG"); lcd. set Cursor (6,0); LCD. Print ("V OVER
SPEED"); beep (); count=0;
Serial.println("NORMAL SPEED"); lcd. set Cursor (6,0); LCD. Print ("V NRM SPEED");
if (st_cmp)
if (card == card1)
{Serial.println("");
Serial.println("");
Serial.println("");
Serial.println("INVALID, ACCESS DENIED"); lcd. set Cursor (0,1); LCD. Print ("VID:TS 11 z
568"); card = ""; scamp = false;
I++;
Serial. Print(inchar);
// Serial. Print("\r\n");
st_cmp = true;
Chapter 5-Results
To check the functionality of the proposed system, a prototype was built and tested. The
RFID reader used in this testing was CF-RU5106 with active tags of type EPC C1G2. The first
step in our testing was to establish communication from pc with the reader. Then the reader
software is used to determine the appropriate settings such as the baud rate, frequency,
band, connection type, and the tag mode. These settings were later used in the developed
prototype. The overall developed prototype is shown in above figure. In the following sub-
sections, we present our prototype implementation and testing results for various parts of
the system.
A.Station Subsystem
The station subsystem is used for bus detection and it consists of RFID reader, speaker, and
a PC as a processing subsystem. Here the PC is used for two purposes: as a processing
subsystem interfaced with the other components of the subsystem.
The RFID reader, which is connected to the USB port, is used to detect the approaching buses.
Then the PC retrieves the tag information from the database. At the end of the process, the
speaker announces if there is any bus approaching that station. A PHP script was written for
detecting RFID tags and then takes the decision for the output depending each time on the
tag ID information which is stored in the database.
B.Bus Subsystem
The bus subsystem consists of RFID reader, speaker and LCD all connected to the processing
subsystem which is the Raspberry Pi. The Raspberry Pi board was initially properly prepared
and configured for use as processing subsystem for the bus subsystem the above figure shows
the interface between selected components and the processing subsystem. The LCD is
connected to GPIO pins of the Raspberry Pi. In addition, the two USB ports are used to connect
the RFID reader to provide network connectivity to access the database. A PHP script were
written to detect both the station and blind people tags and then reacts according to the tag
type as explained in this
Announcement Subsystem
Announcement subsystem exists in both station and bus designs. For the announcement
purpose we use recorder and playback module. The required information of the buses will be
stored in the form of voice message using recorded and the information will be available to
the blind people from voice playback module.
The system has two subsystems which are: the bus subsystem and the station subsystem. Bus
subsystem announces the coming stations in the bus route for all passengers. Moreover, the
bus will be provided with the number of bind people who required the bus and their
destinations. The station subsystem will give announcement of the approaching buses.
6.1 Advantages: -
• Reduces the difficulty in identifying the buses for the blind people
• A feasible system to assist the blind people to have a safe and normal travel by public
transport system.
6.2 Disadvantages: -
a) System limitations
Any research study of this nature, covering a wide spectrum can only be representative,
leaving scope for further investigation. It is our responsibility to share with our readers, the
major constraints under which the present investigations have been conducted. As presented
in our previous research, the system functioned very well during lab and field testing on
university buses. There were no issues regarding system failure both electronically or
mechanically. But deploying the system on public buses of Delhi, revealed some of the
manufacturing defects pertaining to robustness. Due to high noise levels at a few bus stops
convinced us of the need for better amplification audio which has now been incorporated.
The user module has a projecting antenna which was deemed inconvenient to some users. b)
Study limitations
The following limitations pertaining to the field trials have been observed which need to be
catered to . I) During peak hours, a heavy rush was observed which made it difficult for users
to de-board from the front gate of the bus. Frequent collisions were observed near the front
door.
ii) Due to time pressures of private bus operators, bus drivers were frequently observed not
stopping the bus at the designated bus bay. This leads to other vehicles overtaking the bus
from the wrong side which hampers user movement as well as safety.
6.3 Applications: -
• Bus detection for blind people is used for easy identification of buses for blind people.
• Bus detection for blind people is also useful for illiterate people.
This prototype to assist the Visionless people while boarding the bus has wide applications
other than just helping the blind people inform their presence to the bus driver. In further
stages of development this project can be used to enhance the safety and comfort of a larger
section of society. Following are some of the anticipated future scopes:
1. This system can be installed over the taxies and not just public buses, all over the city so
that people can very easily communicate with them.
2. This system, if manufactured commercially, is very economic and thus can be made
available at the stores so that women, children, senior citizens or any section of society can
use it.
3. With few changes in the hardware and programming, this prototype can be turned into a
security device. Women may have this all the time with them while they are out of their
homes. Each policeman will also be handed over one device. So, whenever any woman feels
any kind of danger.
References
1.J. Al Kalbani, R. B. Suwailam, A. Al Yafai, D. Al Abri and M. Awadalla, Bus Detection System
for BlindPeople using RFID, Proceedings of the 8th IEEE GCC Conference and Exhibition,
Muscat, Oman (2015).
2. IEEE Standard C95.1 (2005), IEEE Standard for Safety Levels with Respect to Human
Exposure to Radio Frequency Electromagnetic Fields 3 kHz to 300 GHz,
Availablefrom:http://standards.ieee.org/findstds/standard/C95.1-2005.html, Accessed 25
(2015).
5. T. Quoc, M. Kim, H. Lee and K. Eom, Wireless Sensor Network apply for the Blind U-bus
System, Int. J. u- and e- Service, Sci. Technol., 3(3) (2010).
6. M. Z. H. Noor, A. Shah, I. Ismail and M. F. Saaid, Bus Detection Device for the Blind Using
RFID Application, 5th International Colloquium on Signal Processing & Its Applications, 247-
249 (2009).
7. T. Jerry, H. Goh and K. Tan, Accessible Bus System: A Bluetooth Application, Assistive
Technology for Visually Impaired and Blind People, Chapter in Assistive Technology for
Visually Impaired and Blind People, Springer, London (2008) 363-384. 858 B. Sridhar et al.:
RFID Based Assistance for….
8. M. A. Hersh and M. A. Johnson, Assistive Technology for Visually Impaired and Blind People,
Springer (2008).
9. J. Sanchez and E. Maureira, Subway Mobility Assistance Tools for Blind Users, LNCS, 4397,
386-404 (2007).
10. K. Miesenberger et al., Eds., Computers Helping People with Special Needs, LNCS, Vol.
4061 Springer Berlin/Heidelberg, 10th International Conference, ICCHP 2006, Linz, Austria
(2006).
#include<LiquidCrystal.h>
LiquidCrystallcd (A0,A1,A2,A3,A4,A5);
#define ir1 8
#define ir2 9
pin Mode (ir1, INPUT); pin Mode (ir2, INPUT); pin Mode (buz, OUTPUT); Serial. Begin
(9600); lcd.begin (16,2);
Serial.println("WELCOME");
void beep()
void loop() {
break;
Serial.print("C:");
Serial.print("\t");
Serial.println(count); delay(500);
///////////////////////////////
///////////////////////////////
/*if(digitalRead(ir2)==1){
// Serial.println("IR 2 ACTIVE");
}//*/
if(count<30 &&digitalRead(ir2)==1)
if (st_cmp)
if (card == card1)
Serial.println("");
Serial.println("");
Serial.println("");
void serialEvent()
while (Serial.available())
i++;
Serial.print(inchar);
// Serial.print("\r\n");
st_cmp = true;