Professional Documents
Culture Documents
5 Content
5 Content
5 Content
INTRODUCTION
1.1Objective
Various human behaviors can be indicated by eye blink patterns. In this project, we
present a method based on IR sensing techniques for detecting human eye blinks and
generating inter-eye-blink intervals. This project is based on a new algorithm and a
new measurement for eye blinking detection called “the eyelid’s state detecting (ESD)
value.” The ESD value can then be used for examining the open and close states of
eyelids. Our algorithm provides a 99.6% overall accuracy detection for eye blink
detection. We can further generate an inter-eye-blink interval graphs by differencing
between two consecutive eye blink states. Depending upon blinking period and
blinking frequency one can estimate whether the eyes are closed or open i.e. it can be
depicted if the person is sleeping or not. This is of much use in determining if the
driver of the vehicle is sleeping or not. Further an alarm can be used to awaken him if
driver is found sleeping and along with that owner of the vehicle or the related
authority can be informed about the same through DTMF.
1.2 Application
1. This is of much use in trains. As almost 38% accidents occurs due to dozing habits
of drivers. So this will reduce accidents manifold and will save human life and
property.
1
2. This is helpful for taxi owners to keep an eye on the sleeping habits of their drivers
that too from a far off location by the virtue of DTMF. Simultaneously it will avoid
any mishap that can occur due to dozing driver.
2
CHAPTER 2
LITERATURE SURVEY
2.1 Microcontroller
Some microcontrollers may use four-bit words and operate at clock rate frequencies
as low as 4 kHz, for low power consumption (mill watts or microwatts). They will
generally have the ability to retain functionality while waiting for an event such as a
button press or other interrupt; power consumption while sleeping (CPU clock and
most peripherals off) may be just nano watts, making many of them well suited for
long lasting battery applications. Other microcontrollers may serve performance-
critical roles, where they may need to act more like a digital signal processor (DSP),
with higher clock speeds and power consumption.
2.2Embedded Design
3
called embedded systems. While some embedded systems are very sophisticated,
many have minimal requirements for memory and program length, with no operating
system, and low software complexity. Typical input and output devices include
switches, relays, solenoids, LEDs, small or custom LCD displays, radio frequency
devices, and sensors for data such as temperature, humidity, light level etc. Embedded
systems usually have no keyboard, screen, disks, printers, or other recognizable I/O
devices of a personal computer, and may lack human interaction devices of any kind.
2.4 IR Sensors
A Passive measures infrared (IR) light radiating from objects in its field of view. PIR
sensors are often used in the construction of PIR-based motion (see below). Apparent
motion is detected when an infrared source with on temperature, such as a human,
passes in front of an infrared source with another temperature, such as a wall. This is
not to say that the sensor detects the heat from the object passing in front of it but that
the object breaks the field which the sensor has determined as the "normal" state. Any
object, even one exactly the same temperature as the surrounding objects will cause
the PIR to activate if it moves in the field of the sensors. Infrared sensor (PIR sensor)
is an electronic device that All objects above absolute zero emit energy in the form of
radiation. Usually infrared radiation is invisible to the human eye but can be detected
by electronic devices designed for such a purpose. The term passive in this instance
means that the PIR device does not emit an infrared beam but merely passively
accepts incoming infrared radiation. “Infra” meaning below our ability to detect it
visually, and “Red” because this color represents the lowest energy level that our eyes
4
can sense before it becomes invisible. Thus, infrared means below the energy level of
the color red, and applies to many sources of invisible energy.
5
CHAPTER 3
ABOUT THE PROJECT
Transformers used here are Step down transformers. As output of transformer is AC,
so it gets converted into DC by using capacitor circuit. Above circuit shows output of
first module.
3.1.2 IR Sensor
IR senor will detect the blinking of eye and will send high to microcontroller for each
blink detected.
3.1.3 Microcontroller part
The microcontroller is getting its input from the IR sensor. For each blink it receives a
high signal. Side by side RTC i.e. real time clock is also working. For every 5 sec,
total number of blinks is counted by microcontroller. If the eye of driver blinks for
6
less than 3 times in 5 sec a high signal is send to buzzer. It alarms the driver.
Simultaneously microcontroller sends a high to DTMF section which makes a call to
the owner.
3.1.4 DTMF Section
This section is used to make a call to the owner to mark that driver is sleeping while
driving. When DTMF section receives a high, a call is made through the mobile at
the transmitter site i.e. vehicle to the receiver i.e owner on the pre stored contact
number. Contact number is stored in the microcontroller.
3.2 Working
1. The first step is the same conventional one i.e. to provide the power supply.
Installation will be such that once the vehicle comes in motion; the setup will be
automatically switched on.
2. Now if the driver doesn’t blink his eyes for at least three times in 5 seconds, then
the buzzer will ring up and simultaneously a call will be made to owner to mark that
the driver is dozing. The time period can be varied depending upon requirement.
3. Call is made through DTMF. DTMF stands for Dual Tone Multi Frequency.
CHAPTER 4
SYSTEM ARCHITECTURE
7
Before going into details of project let us first emphasize on the basic system,
functional units and functional IC’s to be used in it.
4.1 Transformer
4.1.1 Introduction
A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors—the transformer's coils. 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.
A transformer makes use of Faraday's law and the ferromagnetic properties of an iron
core to efficiently raise or lower AC voltages. It of course cannot increase power so
that if the voltage is raised, the current is proportionally lowered and vice versa.
The transformer is based on two principles: first, that an electric current can produce a
magnetic field (electromagnetism), and, second that a changing magnetic field within
a coil of wire induces a voltage across the ends of the coil (electromagnetic
induction). Changing the current in the primary coil changes the magnetic flux that is
developed. The changing magnetic flux induces a voltage in the secondary coil.
Step Up Transformer:
8
Step-Up Transformers are one of the really common and vital electrical tools used in
power transmission and modification. They are usually the first major transformer in
a transmission system and are often used in various forms throughout the system.
A step-up transformer is one whose secondary voltage is greater than its primary
voltage. This kind of transformer "steps up" the voltage applied to it. For instance, a
step up transformer is needed to use a 220v product in a country with a 110v supply.
The simplified description above neglects several practical factors, in particular the
primary current required to establish a magnetic field in the core, and the contribution
to the field due to current in the secondary circuit.
Models of an ideal transformer typically assume a core of negligible reluctance with
two windings of zero resistance.[31] When a voltage is applied to the primary
winding, a small current flows, driving flux around the magnetic circuit of the core.
[31] The current required to create the flux is termed the magnetizing current; since
the ideal core has been assumed to have near-zero reluctance, the magnetizing current
is negligible, although still required to create the magnetic field.
The changing magnetic field induces an electromotive force (EMF) across each
winding. Since the ideal windings have no impedance, they have no associated
voltage drop, and so the voltages VP and VS measured at the terminals of the
transformer, are equal to the corresponding EMFs. The primary EMF, acting as it does
in opposition to the primary voltage, is sometimes termed the "back EMF". This is
9
due to Lenz's law which states that the induction of EMF would always be such that it
will oppose development of any such change in magnetic field.
4.1.5 Construction:
A transformer consists of a rectangular core of soft iron in the form of sheets insulated
from one another. Two separate coils of insulated wires, a primary coil and a
secondary coil are wound on the core. These coils are well insulated from one another
and from the core. The coil on the input side is called Primary coil and the coil on the
output side is called Secondary coil.
An ideal transformer would have no energy losses, and would be 100% efficient. In
practical transformers energy is dissipated in the windings, core, and surrounding
structures. Larger transformers are generally more efficient, and those rated for
electricity distribution usually perform better than 98%.
Experimental transformers using superconducting windings achieve efficiencies of
99.85%. The increase in efficiency can save considerable energy, and hence money, in
a large heavily-loaded transformer; the trade-off is in the additional initial and running
cost of the superconducting design.
Losses in transformers (excluding associated circuitry) vary with load current, and
may be expressed as "no-load" or "full-load" loss. Winding resistance dominates load
losses, whereas hysteresis and eddy currents losses contribute to over 99% of the no-
load loss. The no-load loss can be significant, so that even an idle transformer
constitutes a drain on the electrical supply and a running cost; designing transformers
for lower loss requires a larger core, good-quality silicon steel, or even amorphous
steel, for the core, and thicker wire, increasing initial cost, so that there is a trade-off
between initial cost and running cost. (Also see energy efficient transformer).
Transformer losses are divided into losses in the windings, termed copper loss, and
those in the magnetic circuit, termed iron loss. Losses in the transformer arise from:
Winding resistance:
10
Current flowing through the windings causes resistive heating of the conductors. At
higher frequencies, skin effect and proximity effect create additional winding
resistance and losses.
Hysteresis losses
Each time the magnetic field is reversed, a small amount of energy is lost due to
hysteresis within the core. For a given core material, the loss is proportional to the
frequency, and is a function of the peak flux density to which it is subjected.[43]
Eddy currents
Ferromagnetic materials are also good conductors, and a core made from such a
material also constitutes a single short-circuited turn throughout its entire length.
Eddy currents therefore circulate within the core in a plane normal to the flux, and are
responsible for resistive heating of the core material. The eddy current loss is a
complex function of the square of supply frequency and inverse square of the material
thickness. Eddy current losses can be reduced by making the core of a stack of plates
electrically insulated from each other, rather than a solid block; all transformers
operating at low frequencies use laminated or similar cores.
Magnetostriction
Magnetic flux in a ferromagnetic material, such as the core, causes it to physically
expand and contract slightly with each cycle of the magnetic field, an effect known as
magnetostriction. This produces the buzzing sound commonly associated with
transformers, and can cause losses due to frictional heating.
Mechanical losses
In addition to magnetostriction, the alternating magnetic field causes fluctuating
forces between the primary and secondary windings. These incite vibrations within
nearby metalwork, adding to buzzing noise, and consuming a small amount of power.
Stray losses
Leakage inductance is by itself largely lossless, since energy supplied to its magnetic
fields is returned to the supply with the next half-cycle. However, any leakage flux
that intercepts nearby conductive materials such as the transformer's support structure
will give rise to eddy currents and be converted to heat. There are also radiative losses
due to the oscillating magnetic field, but these are usually small.
4.2 Microcontroler 8051
4.2.1 Introduction
11
In 1981,Intel Corporation introduced an 8-bit microcontroller called 8051.This
microcontroller had 128 bytes of RAM,4K bytes of on-chip ROM, two timers, one
serial port and four ports(each 8-bits wide) all on a single chip. At that time it was also
referred to as a “system on a chip”. The 8051 is an 8-bit processor meaning that the
CPU can work on only 8-bits of data at a time. Data larger than 8 bits has to be broken
into 8 bits pieces to be processed by the CPU. The 8051 has a total of four I/O ports,
each 8 bits wide. The 8051 can have a maximum of 64K bytes of on-chip ROM.
It provides many functions (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.)
in single package
8-bit ALU, Accumulator and Registers; hence it is an 8-bit microcontroller
There are two other members in the 8051 family of microcontrollers. They are 8052
and 8031.
8052 Microcontroller
The 8052 is another member of 8051 family. The 8052 has all the standard features of
8051 as well as an extra 128 bytes of RAM and an extra timer. In other words, the
12
8052 has 256 bytes of RAM and 3 timers. It also has 8K bytes of on-chip program
ROM instead of 4K bytes.
8031 Microcontroller
Another member of 8051 family is the 8031 chip. This chip is often referred to as a
ROM-less 8051 since it has 0K bytes of on-chip ROM. To use this chip external ROM
is added to it. The ROM containing the program attached to the 8031 can be as large
as 64K bytes. In the process of adding external ROM containing the program attached
to the 8031, two ports are lost. This leaves only 2 ports for I/O operations. To solve
this problem, we can add external I/O to the 8031 by interfacing the 8031 with
memory and I/O ports such as 8255 chip.
ROM 4K 8K 0K
TIMERS 2 3 2
I/O PINS 32 32 32
SEARIAL PORT 1 1 1
INTERRUPT SOURCES 6 8 6
13
4.2.5 Block Diagram
micro processor CPU: ALU, PC, SP, and registers. It also added the other
14
4.2.6 Pin Description
(i)Vcc
Pin 40 provides supply voltage to the chip. The voltage source is +5V.
(ii)GND
The 8051 has an on-chip oscillator but requires an external clock to run it. Most often
a quartz crystal oscillator is connected to inputs XTAL1 (pin 19) and XTAL2 (pin
18).The quartz crystal oscillator connected to XTAL1 and XTAL2 also needs two
capacitors of 30pF value. One side of each capacitor is connected to the ground. There
15
are various speeds of 8051 family. Speed refers to the maximum oscillator frequency
connected to XTAL.
(iv)RST
Pin 9 is the RESET pin. It is an input and is active high (normally low).Upon applying
a high pulse to this pin, the microcontroller will reset and terminate all activities. This
is often referred to as a power-on reset. Activating a power-on reset will cause all
values in the registers to be lost. It will set program counter to all 0s.
In order for reset input to be effective, it must have a minimum duration of two
machine cycles. In other words, the high pulse must be high for a minimum of two
machine cycles before to go low.
(iv)EA
The 8051 family members such as 8751/52, 89C51/52 all come with on-chip ROM to
store programs. In such cases the this pin is connected to V cc. For family members
such as 8031 and 8052 in which there is no on-chip ROM, code is stored on an
external ROM
and is fetched by the 8051/52.Therefore, for 8051 the EA pin must be connected to
GND to indicate that the code is stored externally. EA which stands for “external
access” is pin number 31 in the DIP packages. It is an input pin and must be
connected to either Vcc or GND. This pin cannot be left unconnected.
16
(v)PSEN
This pin is an output pin. PSEN stands for “program store enable”. In an 8051 based
system in which an external ROM holds the program code, this pin is connected to the
OE pin of the ROM.
(vi) ALE
ALE (address latch enable) is an output pin and is active high. When connecting an
8051 to external memory, port 0 provides both address and data. In other words, the
8051 multiplexes address and data through port 0 to save pins. The ALE pin is used
for demultiplexing the address and data by connecting to the G pin of the 74LS373
chip.
The four ports P0, P1, P2, P3 each use 8 pins, making them 8-bit ports. All the ports
upon RESET are configured as inputs, ready to be used as input ports. When the first
0 is written to a port, it becomes an output. To reconfigure it as an input, a 1 must be
sent to the port. To use any of these ports as an input port, it must be programmed.
(vii)PORT 0
Port 0 occupies a total of 8 pins (pins32-39).It can be used for an input or output. To
use the pins of port 0 as both input and output ports, each pin must be connected
externally to a 10K-ohm pull-up resistor. Port 0 is also designated as AD0-AD7,
allowing it to be used for both address and data. When connecting an 8051 to an
external memory, port 0 provides both address and data. The 8051 multiplexes
address and data through port 0 to save pins. ALE indicates if P0 has address or data.
When ALE=0,it provides data D0-D7 but when ALE=1 it has address A0-A7.
(viii)PORT1
Port 1 occupies a total of 8 pins (pins 1 through 8).It can be used as input or output. In
contrast to port 0, this port does not need any pull-up resistors since it already has pull
up resistors. Upon reset, port1 is configured as an input port. If port 1 has been
17
configured as an output port, to make it an input port again, it must be programmed as
such by writing 1 to all its bits.
(ix)PORT2
Port 2 occupies a total of 8 pins (pins 21 through 28).It can be used as an input or
output. Just like P1.port 2 does not need any pull up resistors since it already has pull
up resistors internally. Upon reset port 2 is configured as an input port. To make port 2
as an input, it must be programmed as such by writing 1 to all its bits.
In many 8051 systems, P2 is used as simple I/O. But in 8051-based systems, port 2
must be used along with P0 to provide the 16-bit address for external memory. Port 2
is also designated as A8-A15, indicating its dual function.
(xi)PORT 3
Port 3 occupies a total of 8 pins, pins 10 through 17.It can be used as input or
oputput.P3 does not need any pull up resistors, just like P1 and P2 did not. Although
port 3 is configured as an input port upon reset, this is not the way it is most
commonly used. Port 3 has the additional function of providing some extremely
important signals such as interrupts. Port 3 has an additional function of providing
some extremely important signals such as interrupts. Some of the alternate functions
of P3 are listed below:
18
4.2.7 Memory Space Allocation
1. Internal ROM
The 89C51 has 4K bytes of on-chip ROM. This 4K bytes ROM memory has memory
addresses of 0000 to 0FFFh. Program addresses higher than 0FFFh, which exceed the
internal ROM capacity, will cause the microcontroller to automatically fetch code
bytes from external memory. Code bytes can also be fetched exclusively from an
external memory, addresses 0000h to FFFFh, by connecting the external access pin to
ground. The program counter doesn’t care where the code is: the circuit designer
decides whether the code is found totally in internal ROM, totally in external ROM or
in a combination of internal and external ROM.
2. Internal RAM
The 128 bytes of RAM inside the 8051 are assigned addresses 00 to 7Fh. These 128
bytes can be divided into three different groups as follows:
A total of 32 bytes from locations 00 to 1Fh are set aside for register banks and
the stack.
A total of 16 bytes from locations 20h to 2Fh are set aside for bit addressable
read/write memory and instructions.
A total of 80 bytes from locations 30h to 7Fh are used for read and write
storage, or what is normally called a scratch pad. These 80 locations of RAM
are widely used for the purpose of storing data and parameters by 8051
programmers.
4.3 Diode
An electric component that conducts electric current in only one direction, functioning
as a one-way valve. Diodes typically are made from semiconductor materials such as
silicon, germanium or selenium and are uses as voltage regulators, signal rectifiers,
oscillators and signal modulators/demodulators. In computer equipment, diodes are
commonly used to emit light by passing a current through it, as in light emitting
diodes (LEDs).
19
images because they can be relatively small, and they do not burn out. However, they
require more power than LCDs.
4.3.1 Function
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol
shows the direction in which the current can flow. Diodes are the electrical version of
a valve and early diodes were actually called valves.
Electricity uses up a little energy pushing its way through the diode, rather like a
person pushing through a door with a spring. This means that there is a small voltage
across a conducting diode, it is called the forward voltage drop and is about 0.7V for
all normal diodes which are made from silicon. The forward voltage drop of a diode is
almost constant whatever the current passing through the diode so they have a very
steep characterstic (currenet-voltage graph).
20
Figure 4.5 A forward bias PN junction diode
When a reverse voltage is applied a perfect diode does not conduct, but all real diodes
leak a very tiny current of a few uA or less. This can be ignored in most circuits
because it will be very much smaller than the current flowing in the forward direction.
However, all diodes have a maximum reverse voltage(usually 50V or more) and if this
is exceeded the diode will fail and pass a large current in the reverse direction, this is
called breakdown.
Figure.4.6 A
reverse biased PN junction
diode
4.3.4 Biasing
21
Figure.4.7 Internal diagram of forward biased PN junction
It is an external voltage that is connected across a PN junction so that its voltage aids
the junction and thereby, offers a high resistance to the current flow through the
junction.
The charcterstics are plotted under three heads: Zero external voltage, forward
biasing, reverse biasing. From the chracterstics following points may be noted:
22
The forward current is limited by series resistance and a small value of
junction resistance. If the forward current increase beyond the rated value of
the diode, the diode may be destroyed.
At reverse bias, the reverse current increases slightly with the increase in
voltage because of the minority carriers. For silicon the maximum value of
reverse current is low as 1uA. However, for Ge, it is about 100uA.
At a certain reverse voltage, the reverse current rises abruptly to a large value.
It is because at this voltage the junction breaks and the resistance of the barrier
region falls suddenly.
Breakdown voltage is the reverse votage at which pn junction breaks. At
reverse votage, when the junction breaks the diode may be destroyed.
Oscillator circuit is the heart of the 8051 microcontroller. The 8051 has an on chip
oscillator but it requires an external clock to run it.
Most often a quartz crystal oscillator is connected to inputs XTAL1(Pin 19) and
XTAL2(Pin 18).The a quartz crystal oscillator connected to inputs XTAL1 and
XTAL2 requires two capacitors of 30pF each.One side of each capacitor is connected
to ground.
23
Figure 4.10: Crystal connection to 8051
4.5 Resistor
24
such as nickel-chrome). Resistors are also implemented within integrated circuits,
particularly analog devices, and can also be integrated into hybrid and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common
commercial resistors are manufactured over a range of more than nine orders of
magnitude. When specifying that resistance in an electronic design, the required
precision of the resistance may require attention to the manufacturing tolerance of the
chosen resistor, according to its specific application. The temperature coefficient of
the resistance may also be of concern in some precision applications. Practical
resistors are also specified as having a maximum power rating which must exceed the
anticipated power dissipation of that resistor in a particular circuit: this is mainly of
concern in power electronics applications. Resistors with higher power ratings are
physically larger and may require heat sinks. In a high-voltage circuit, attention must
sometimes be paid to the rated maximum working voltage of the resistor.
Practical resistors have a series inductance and a small parallel capacitance; these
specifications can be important in high-frequency applications. In a low-noise
amplifier or pre-amp, the noise characteristics of a resistor may be an issue. The
unwanted inductance, excess noise, and temperature coefficient are mainly dependent
on the technology used in manufacturing the resistor. They are not normally specified
individually for a particular family of resistors manufactured using a particular
technology.[1] A family of discrete resistors is also characterized according to its form
factor, that is, the size of the device and the position of its leads (or terminals) which
is relevant in the practical manufacturing of circuits using them.
Units:
The behavior of an ideal resistor is dictated by the relationship specified by Ohm's
law:
Ohm's law states that the voltage (V) across a resistor is proportional to the current
(I), where the constant of proportionality is the resistance (R).
Equivalently, Ohm's law can be stated:
This formulation states that the current (I) is proportional to the voltage (V) and
inversely proportional to the resistance (R). This is directly used in practical
computations. For example, if a 300 ohm resistor is attached across the terminals of a
12 volt battery, then a current of 12 / 300 = 0.04 amperes (or 40 milliamperes) occurs
across that resistor.
25
Power dissipation:
The power P dissipated by a resistor (or the equivalent resistance of a resistor
network) is calculated as:
Construction:
1) Lead arrangements
Through-hole components typically have leads leaving the body axially.
Others have leads coming off their body radially instead of parallel to the
resistor axis. Other components may be SMT (surface mount technology)
while high power resistors may have one of their leads designed into the heat
sink.
2) Carbon Composition
Carbon composition resistors consist of a solid cylindrical resistive element
with embedded wire leads or metal end caps to which the lead wires are
attached. The body of the resistor is protected with paint or plastic. Early 20th-
century carbon composition resistors had uninsulated bodies; the lead wires
were wrapped around the ends of the resistance element rod and soldered. The
completed resistor was painted for color coding of its value.
4.6 Capacitors
4.7 Battery
An electrical battery is one or more electrochemical cells that convert stored chemical
energy into electrical energy. Since the invention of the first battery (or "voltaic pile")
in 1800 by Alessandro Volta, batteries have become a common power source for
many household and industrial applications. According to a 2005 estimate, the
27
worldwide battery industry generates US$48 billion in sales each year, with 6%
annual growth.
There are two types of batteries: primary batteries (disposable batteries), which are
designed to be used once and discarded, and secondary batteries (rechargeable
batteries), which are designed to be recharged and used multiple times. Batteries come
in many sizes, from miniature cells used to power hearing aids and wristwatches to
battery banks the size of rooms that provide standby power for telephone exchanges
and computer data centers.
Principle of operation
A battery is a device that converts chemical energy directly to electrical energy.It
consists of a number of voltaic cells; each voltaic cell consists of two half cells
connected in series by a conductive electrolyte containing anions and cations. One
half-cell includes electrolyte and the electrode to which anions (negatively charged
ions) migrate, i.e., the anode or negative electrode; the other half-cell includes
electrolyte and the electrode to which cations (positively charged ions) migrate, i.e.,
the cathode or positive electrode. In the redox reaction that powers the battery, cations
are reduced (electrons are added) at the cathode, while anions are oxidized (electrons
are removed) at the anode. The electrodes do not touch each other but are electrically
connected by the electrolyte. Some cells use two half-cells with different electrolytes.
A separator between half cells allows ions to flow, but prevents mixing of the
electrolytes.
Each half cell has an electromotive force (or emf), determined by its ability to drive
electric current from the interior to the exterior of the cell. The net emf of the cell is
the difference between the emfs of its half-cells, as first recognized by Volta.
Therefore, if the electrodes have emfs and , then the net emf is ; in other words, the
net emf is the difference between the reduction potentials of the half-reactions.
The electrical driving force or across the terminals of a cell is known as the terminal
voltage (difference) and is measured in volts. The terminal voltage of a cell that is
neither charging nor discharging is called the open-circuit voltage and equals the emf
of the cell. Because of internal resistance, the terminal voltage of a cell that is
discharging is smaller in magnitude than the open-circuit voltage and the terminal
voltage of a cell that is charging exceeds the open-circuit voltage. An ideal cell has
28
negligible internal resistance, so it would maintain a constant terminal voltage of
until exhausted, then dropping to zero. If such a cell maintained 1.5 volts and stored a
charge of one coulomb then on complete discharge it would perform 1.5 joule of
work.In actual cells, the internal resistance increases under discharge, and the open
circuit voltage also decreases under discharge. If the voltage and resistance are plotted
against time, the resulting graphs typically are a curve; the shape of the curve varies
according to the chemistry and internal arrangement employed.
As stated above, the voltage developed across a cell's terminals depends on the energy
release of the chemical reactions of its electrodes and electrolyte. Alkaline and
carbon-zinc cells have different chemistries but approximately the same emf of 1.5
volts; likewise NiCd and NiMH cells have different chemistries, but approximately
the same emf of 1.2 volts.On the other hand the high electrochemical potential
changes in the reactions of lithium compounds give lithium cells emfs of 3 volts or
more.
The defining feature of micro switches is that a relatively small movement at the
actuator button produces a relatively large movement at the electrical contacts, which
occurs at high speed (regardless of the speed of actuation). Most successful designs
also exhibit hysteresis, meaning that a small reversal of the actuator is insufficient to
reverse the contacts; there must be a significant movement in the opposite direction.
Both of these characteristics help to achieve a clean and reliable interruption to the
switched circuit.
Micro switches are very widely used; among their applications are appliances,
machinery, industrial controls, vehicles, and many other places for control of
29
electrical circuits. They are usually rated to carry current in control circuits only,
although some switches can be directly used to control small motors, solenoids,
lamps, or other devices.
78xx ICs have three terminals and are commonly found in the TO220 form factor,
although smaller surface-mount and larger TO3 packages are available. These devices
support an input voltage anywhere from a couple of volts over the intended output
voltage, up to a maximum of 35 or 40 volts, and typically provide 1 or
1.5 amperes of current (though smaller or larger packages may have a lower or higher
current rating).
Advantages
30
efficient uses of space. Other voltage regulators may require additional
components to set the output voltage level, or to assist in the regulation process.
Some other designs (such as a switching power supply) may need substantial
engineering expertise to implement.
78xx series ICs have built-in protection against a circuit drawing too much
power. They have protection against overheating and short-circuits, making them
quite robust in most applications. In some cases, the current-limiting features of
the 78xx devices can provide protection not only for the 78xx itself, but also for
other parts of the circuit.
Disadvantages
The input voltage must always be higher than the output voltage by some
minimum amount (typically 2 volts). This can make these devices unsuitable for
powering some devices from certain types of power sources (for example,
powering a circuit that requires 5 volts using 6-volt batteries will not work using a
7805).
As they are based on a linear regulator design, the input current required is
always the same as the output current. As the input voltage must always be higher
than the output voltage, this means that the total power (voltage multiplied by
current) going into the 78xx will be more than the output power provided. The
extra input power is dissipated as heat. This means both that for some applications
an adequate heatsink must be provided, and also that a (often substantial) portion
of the input power is wasted during the process, rendering them less efficient than
some other types of power supplies. When the input voltage is significantly higher
than the regulated output voltage (for example, powering a 7805 using a 24 volt
power source), this inefficiency can be a significant issue.
31
In spite of the above mentioned disadvantes, these are widely used for voltage
regulation as their advantages hold good over disadvantages.
4.10 Relay
4.10.1Basic Operation:
A simple electromagnetic relay consists of a coil of wire surrounding a soft iron core,
an iron yoke which provides a low reluctance path for magnetic flux, a movable iron
armature, and one or more sets of contacts (there are two in the relay pictured). The
armature is hinged to the yoke and mechanically linked to one or more sets of moving
contacts. It is held in place by a spring so that when the relay is de-energized there is
an air gap in the magnetic circuit. In this condition, one of the two sets of contacts in
the relay pictured is closed, and the other set is open. Other relays may have more or
fewer sets of contacts depending on their function. The relay in the picture also has a
wire connecting the armature to the yoke. This ensures continuity of the circuit
between the moving contacts on the armature, and the circuit track on the printed
circuit board (PCB) via the yoke, which is soldered to the PCB.
32
Figure 4.12 Relay
When an electric current is passed through the coil it generates a magnetic field that
attracts the armature, and the consequent movement of the movable contact(s) either
makes or breaks (depending upon construction) a connection with a fixed contact. If
the set of contacts was closed when the relay was de-energized, then the movement
opens the contacts and breaks the connection, and vice versa if the contacts were
open. When the current to the coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed position. Usually
this force is provided by a spring, but gravity is also used commonly in industrial
motor starters. Most relays are manufactured to operate quickly. In a low-voltage
application this reduces noise; in a high voltage or current application it reduces
arcing.
When the coil is energized with direct current, a diode is often placed across the coil
to dissipate the energy from the collapsing magnetic field at deactivation, which
would otherwise generate a voltage spike dangerous to semiconductor circuit
components. Some automotive relays include a diode inside the relay case.
Alternatively, a contact protection network consisting of a capacitor and resistor in
series (snubber circuit) may absorb the surge. If the coil is designed to be energized
with alternating current (AC), a small copper "shading ring" can be crimped to the
end of the solenoid, creating a small out-of-phase current which increases the
minimum pull on the armature during the AC cycle.[1]
34
is ambiguous whether the pole is normally open or normally closed. The terminology
"SPNO" and "SPNC" is sometimes used to resolve the ambiguity.
SPDT – Single Pole Double Throw. A common terminal connects to either of two
others. Including two for the coil, such a relay has five terminals in total.
DPST – Double Pole Single Throw. These have two pairs of terminals. Equivalent to
two SPST switches or relays actuated by a single coil. Including two for the coil, such
a relay has six terminals in total. The poles may be Form A or Form B .
DPDT – Double Pole Double Throw. These have two rows of change-over terminals.
Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has
eight terminals, including the coil.
The "S" or "D" may be replaced with a number, indicating multiple switches
connected to a single actuator. For example 4PDT indicates a four pole double throw
relay (with 14 terminals).
4.10.3 Applications:
DTMF stands for Dual Tone Multiple Frequency. It is a tone consisting of two
frequencies superimposed. Individual frequencies are chosen such that it is easy to
design filters and easy to transmit the tones through a telephone line having
bandwidth of approximately 3.5 kHz. DTMF was not intended to be used for data
transfer, it was meant to be used for sending the control signals along the telephone
line. With standard decoders it is possible to send 10 beeps per second i.e., five bits
per second. DTMF standard specifies 50ms tones and 600ms duration between two
successive tone. The last column is not commonly seen in the telephones that is used,
but used by telephone exchanges quite often. Nowadays, DTMF is used for dialing
the numbers in telephones, configuring telephone exchanges etc.
697 1 2 3 A
770 4 5 6 B
852 7 8 9 C
941 * 0 # D
A CB transreceiver of 2.7 MHz is normally used to send floating codes. DTMF was
designed to be able to send the codes using microphone. Each beep (or digit you dial
on the telephone) is composed of two concurrent frequencies, which are superimposed
on amplitude. The higher of the two frequencies is normally aloud by 4dB, and this
shift is termed as twist. If the twist is equal to 4dB, the higher frequency is loud by
4dB. If the lower frequency is loud, then the twist is said to be negative. Nowadays,
36
DTMF is used for dialing the numbers in telephones, configuring telephone
exchanges etc
4.11.4 MT8870
4.11.4.1 Introduction
MT8870 is a complete DTMF receiver integrating both the band split filter and the
digital decoder function. The filter section uses switched capacitor technique for high
and low group filters, the decoder uses a digital counting technique to detect and
decode all 16 DTMF tone pairs with 4 bit code. External component count is
minimized by on-chip provision of a differential input amplifier, clock oscillator and
latches 3 stable bus interfaces.
4.11.4.2Features
7. Inhibit mode
38
code corresponding to the last valid tone pair received. When
TOE is 1 logic low the data ouput are high impedance.
15 Std Delayed sterring (output) presents a logic high when received
to tone-pair has been registered and the ouput latch updated.
Return to logic low when the voltage on St/GT falls below Vst
16 ESt Early sterring (input) presents a logic high once the digital
algorithm has detected a valid tone pair (signal condition).
Any momentarily loss of signal condition will cause ESt to
restart to a logic low
17 St/GT Sterring input/guard time (ouput) bidirectional. A voltage
greater than Vt/St detected tone pair and update the output
latch.A voltage less than Vt/St frees the device to accept a
new tone pair.
18 Vdd Positive power supply (input) +5V typical.
4.12 IR Sensors
A Passive measures infrared (IR) light radiating from objects in its field of view. PIR
sensors are often used in the construction of PIR-based motion (see below). Apparent
motion is detected when an infrared source with on temperature, such as a human,
passes in front of an infrared source with another temperature, such as a wall. This is
not to say that the sensor detects the heat from the object passing in front of it but that
the object breaks the field which the sensor has determined as the "normal" state. Any
object, even one exactly the same temperature as the surrounding objects will cause
the PIR to activate if it moves in the field of the sensors. Infrared sensor (PIR sensor)
is an electronic device that All objects above absolute zero emit energy in the form of
radiation. Usually infrared radiation is invisible to the human eye but can be detected
by electronic devices designed for such a purpose. The term passive in this instance
means that the PIR device does not emit an infrared beam but merely passively
accepts incoming infrared radiation. “Infra” meaning below our ability to detect it
visually, and “Red” because this color represents the lowest energy level that our eyes
can sense before it becomes invisible. Thus, infrared means below the energy level of
the color red, and applies to many sources of invisible energy.
40
5.1.1 Component Used
1) AC to DC Conversion:
41
Figure 5.1 AC to DC conversion
Transformers used here are Step down transformers. As output of transformer is AC,
so it gets converted into DC by using capacitor circuit. Above circuit shows output of
first module.
2) IR Sensor
IR senor will detect the blinking of eye and will send high to microcontroller for each
blink detected.
3) Microcontroller part
42
Figure 5.2 Pin diagram 8051
The microcontroller is getting its input from the IR sensor. For each blink it receives a
high signal. Side by side RTC i.e. real time clock is also working. For every 5 sec,
total number of blinks is counted by microcontroller. If the eye of driver blinks for
less than 3 times in 5 sec a high signal is send to buzzer. It alarms the driver.
Simultaneously microcontroller sends a high to DTMF section which makes a call to
the owner.
4) DTMF Section
This section is used to make a call to the owner to mark that driver is sleeping while
driving. When DTMF section receives a high, a call is made through the mobile at
the transmitter site i.e. vehicle to the receiver i.e owner on the pre stored contact
number. Contact number is stored in the microcontroller.
FR-4 is by far the most common material used today. The board with copper on it is
called "copper-clad laminate".
44
Copper foil thickness can be specified in ounces per square foot or micrometres. One
ounce per square foot is 1.344 mils or 34 micrometres.
A soldering iron is a hand tool most commonly used in soldering. It supplies heat to
melt the solder so that it can flow into the joint between two workpieces.
A soldering iron is composed of a heated metal tip and an insulated handle. Heating is
often achieved electrically, by passing an electric current (supplied through an
electrical cord or battery cables) through the resistive material of a heating element.
Another heating method includes combustion of a suitable gas, which can either be
delivered through a tank mounted on the iron (flameless), or through an external
flame.
Less common uses include pyrography (burning designs into wood) and plastic
welding.
Soldering irons are most often used for installation, repairs, and limited production
work. High-volume production lines use other soldering methods
47
5.3 Circuit Diagram
48
CHAPTER 6
RESULT AND DISCUSSION
The Microcontroller based Eye Blink Detector system proves to be a real time
feedback control system which monitors and controls sleeping habits of the drivers.
The controller controls all activities in few milliseconds which is indeed a very fast
response for practical applications. The setup is designed to be efficient enough to
detect eye blink.
6.2 Discussion
This project can be used at various purposes say for automatic monitoring of driver
mainly required during night journeys. Its smaller version can be used by student to
keep a check on their own sleeping habits. On the other hand, when designed on
larger scale this project can easily be implemented in factories, offices etc for keeping
an eye on the workers.
This project introduces the notion of eye blink detection within the context of
embedded design and DTMF. More specifically, it provides the microcontroller based
eye blink detection and wireless DTMF based informing system.
6.3 Conclusion
Eye Blink Detector presents a fast, robust and yet cheap set up to detect whether the
person is sleeping or not. Some other automated systems are also offered so far but
most of the method has some shortness in practice. This project tries to overcome
these problems and implement an efficient automated Eye Blink detection and
awakening (Through buzzer) system. The present proposal is a model to modernize
the Eye Blink Detection system with optimum expenditure. Using this system, one
can save manpower and along with that mishaps can be avoided which can occur on
account of dozing driver. Thus saves life as well as money.
49
CHAPTER 7
APPLICATIONS AND FUTURE SCOPE
7.1 Applications
This project is very useful. It removes the need of constant human monitoring of
driver required during a night journey.
Microcontroller monitored Eye Blink Detector has following advantages:
1. This is of much use in trains. As almost 38% accidents occurs due to dozing habits
of drivers. So this will reduce accidents manifold and will save human life and
property.
2. This is helpful for taxi owners to keep an eye on the sleeping habits of their drivers
that too from a far off location by the virtue of DTMF. Simultaneously it will avoid
any mishap that can occur due to dozing driver.
It has vast scope in future. With few changes it can be implemented in offices also to
avoid the incidences where employs are found sleeping during working hours.
Addition of wireless camera will make the setup more sophisticated.
REFERENCES
50
[1]http://www.google.co.in/#sclient=psyb&hl=en&source=hp&q=microcontroller+A
T89C52P6+pin+diagram&pbx=1&oq=microcontroller+AT89C52P6
[2] www.electricalprojects.com
[3] Basic electronics by J.B Gupta.
[4]http://www.sensorsmag.com/sensors/acoustic-ultrasound/choosing-ultrasonic-
sensor-proximity-or-distance-measurement-825
APPENDIX A
51
MICROCONTROLLER 8051 DATASHEET
52
53
APPENDIX B
CODING
#include”reg51.h”
#include”gsm.h”
#include”buzzer.h”
main()
Initialize();
uppar:
if(count<2)
Call=0;
delay_ms(200);
Call=1;
while(1);
54
}
else
count=0;
goto uppar;
55