bs3 2
bs3 2
Driver vehicle is the first place where safety starts. Hence we must try
to equip it with the latest technologies and to make safe machine and also to
keep our self and our loved ones safe. We know that safety of driver of the
vehicle is always important. Warning alerts and alarms are security systems
incorporated in the cars and trucks to alert driver about various factors like
exceeding speed limit or detecting alcohol or other parameters. These are
designed to make the driver and passengers aware of safety which is important
in most of the time and cases. In the same way here an embedded system has
been designed to make the journey of the passengers inside a vehicle safe and
secure with various recently found safety and security. Here using a ultrasonic
transmitter and receiver the controller takes a input from ultrasonic that will be
high or low according to driver. And send clear signal to buzzer and it will
detect the driver’s position with this alerting system we can monitor
drowsiness.
1
CHAPTER-I
1.1 INTRODUCTION:
Driver vehicle is the first place where safety starts. Hence we must try to
equip it with the latest technologies and to make safe machine and also to keep
our self and our loved ones safe. We know that safety of driver of the vehicle is
always important. Warning alerts and alarms are security systems incorporated
in the cars and trucks to alert driver about various factors like exceeding speed
limit or detecting alcohol or other parameters. These are designed to make the
driver and passengers aware of safety which is important in most of the time
and cases. In the same way here an embedded system has been designed to
make the journey of the passengers inside a vehicle safe and secure with various
recently found safety and security. Here using a ultrasonic transmitter and
receiver the controller takes a input from ultrasonic that will be high or low
according to driver. And send clear signal to buzzer and it will detect the
driver’s position with this alerting system we can monitor drowsiness. In this
paper I had developed a system to provide the necessary to accident information
to the vehicle. For today's world, safety and security plays an important role,
hence we move towards to provide a good safety and intelligent security system
while travelling. Vehicles are important in today’s fast-paced society. Hence,
having a vehicle now a days is considered a necessity, compared to the past
where it was considered a luxury. In this thriving society, more and more
vehicles are produced to meet the increasing demands of people and businesses
from all of the world. Hence it is necessary to provide better safety and security
features to them. Hence this project aims to design an embedded system for
avoiding accident
2
CHAPTER-II
EXISTING AND PROPOSED SYSTEM
2.1.1 DISADVANTAGES
Lead to death
Low efficiency
Low reliability
3
2.2 Proposed System
2.2.1 ADVANTAGE
High efficiency
Long life
High reliability
Rate of accident decrease
4
CHAPTER-III
SYSTEM REQUIREMENTS
3.1 Hardware specification
LCD
Power supply
Driver circuit ATMEGA Microcontroller
Alarm
Ultrasonic sensor
Arduino IDE
Proteus simulator
5
CHAPTER-IV
BLOCK DIAGRAM
Arduino Uno
Ultrasonic Microcontroller
Driver UNIT-3 Alarm
Sensor-2
Power Supply
Unit
Fig:4.1
4.1 EXPLANATION:
Driver vehicle is the first place where safety starts. Hence we must try to
equip with the latest technologies and to make safe machine and also to keep
our self and our loved ones safe. We know that safety of driver of the vehicle is
6
always important. Warning alerts and alarms are security systems incorporated
in the cars and trucks to alert driver about various factors like exceeding speed
limit or detecting alcohol or other parameters.
CHAPTER-V
HARDWARE EXPLANATION
5.1 ATMEGA 328
7
counter having separate oscillator, 6PWM pins, programmable Serial USART,
programming lock for software security, throughput up to 20 MIPS etc.
ATmega-328 is mostly used in Arduino. The further details about ATmega 328
will be given later in this section.
It has 8 Pin for ADC operations, which all combines to form Port A ( PA0 –
PA7 ).
It also has 3 built in Timers, two of them are 8 Bit timers while the third one is
16-Bit Timer.
8
Fig:5.1
Tmega328 Features
No. of Pins 28
ADC 10-Bit
PWM Pins 6
9
Tmega328 Features
Comparator 1
8-pin PDIP
32-lead TQFP
32-pad QFN/MLF
Oscillator up to 20 MHz
I/O Pins 23
Manufacturer Microchip
SPI Yes
I2C Yes
Reset Yes
10
Tmega328 Features
All of the pins in chronological order, are listed in the table shown in the figure
given below.
11
5.1.3 ATmega328 Pinout
Through pinout diagram we can understand the configurations of the pins of any
electronic device, so we are working on any Engineering Project then we must
first read the components pinout.
12
Fig:5.1.3
Functions associated with the pins must be known in order to use the device
appropriately.
ATmega-328 pins are divided into different ports which are given in detail
below.
Port A consists of the pins from PA0 to PA7. These pins serve as analog
input to analog to digital converters. If analog to digital converter is not
used, port A acts as an eight (8) bit bidirectional input/output port.
13
Port B consists of the pins from PB0 to PB7. This port is an 8 bit
bidirectional port having an internal pull-up resistor.
Port C consists of the pins from PC0 to PC7. The output buffers of port
C has symmetrical drive characteristics with source capability as well high
sink.
Port D consists of the pins from PD0 to PD7. It is also an 8 bit input/output
port having an internal pull-up resistor.
All of the AVR ports are shown in the figure given below.
Fig:5.1.4
14
An architecture of a device presents each information about the particular device.
Fig:5.1.5
15
5.1.6 ATmega328 Memory
ATmega 328 has three types of memories e.g. EEPROM, SRAM etc.
16
Fig:5.1.6
These all of the registers are the part of Static Random Access Memory
(SRAM).
The different versions of the same device are denoted by the different
packages of that device.
ATmega 328 packages are given in the table shown in the figure given
below.
17
Fig:5.1.8
To perform any task we can select a device on the basis of its features. i.e
whether its features match to obtain the desired results or not.
Fig:5.1.9
18
5.2 LCD
19
for a given display size and a slimmer profile (because OLEDs use a single
glass or plastic panel whereas LCDs use two glass panels; the thickness of the
panels increases with size but the increase is more noticeable on LCDs) and
potentially lower power consumption (as the display is only "on" where needed
and there is no backlight). OLEDs, however, are more expensive for a given
display size due to the very expensive electroluminescent materials or
phosphors that they use. Also due to the use of phosphors, OLEDs suffer from
screen burn-in and there is currently no way to recycle OLED displays, whereas
LCD panels can be recycled, although the technology required to recycle LCDs
is not yet widespread. Attempts to increase the lifespan of LCDs are quantum
dot displays, which offer similar performance as an OLED display, but the
Quantum dot sheet that gives these displays their characteristics cannot yet be
recycled.
20
Fig5.2
LCD (Liquid Crystal Display) screen is an electronic display module and find a
wide range of applications. A 16x2 LCD display is very basic module and is
very commonly used in various devices and circuits. These modules are
preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven
segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2
such lines. In this LCD each character is displayed in 5x7 pixel matrix. This
LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD.
A command is an instruction given to LCD to do a predefined task like
initializing it, clearing its screen, setting the cursor position, controlling display
etc. The data register stores the data to be displayed on the LCD. The data is the
ASCII value of the character to be displayed on the LCD. Click to learn more
about internal structure of a LCD.
21
5.2.1 Pin Description:
Pin
Function Name
No
7 DB0
8 DB1
9 DB2
10 DB3
8-bit data pins
11 DB4
12 DB5
13 DB6
14 DB7
22
5.2.2 General characteristics
The optical effect of a TN device in the voltage-on state is far less dependent on
variations in the device thickness than that in the voltage-off state. Because of
this, TN displays with low information content and no backlighting are usually
operated between crossed polarizers such that they appear bright with no
voltage (the eye is much more sensitive to variations in the dark state than the
bright state). As most of 2010-era LCDs are used in television sets, monitors
23
and smartphones, they have high-resolution matrix arrays of pixels to display
arbitrary images using backlighting with a dark background. When no image is
displayed, different arrangements are used. For this purpose, TN LCDs are
operated between parallel polarizers, whereas IPS LCDs feature crossed
polarizers. In many applications IPS LCDs have replaced TN LCDs, in
particular in smartphones such as iPhones. Both the liquid crystal material and
the alignment layer material contain ionic compounds. If an electric field of one
particular polarity is applied for a long period of time, this ionic material is
attracted to the surfaces and degrades the device performance. This is avoided
either by applying an alternating current or by reversing the polarity of the
electric field as the device is addressed (the response of the liquid crystal layer
is identical, regardless of the polarity of the applied field).
Dead pixel policies are often hotly debated between manufacturers and
customers. To regulate the acceptability of defects and to protect the end user,
ISO released the ISO 13406-2 standard. However, not every LCD manufacturer
conforms to the ISO standard and the ISO standard is quite often interpreted in
different ways. LCD panels are more likely to have defects than most ICs due to
their larger size. For example, a 300 mm SVGA LCD has 8 defects and a 150
24
mm wafer has only 3 defects. However, 134 of the 137 dies on the wafer will be
acceptable, whereas rejection of the whole LCD panel would be a 0% yield. In
recent years, quality control has been improved. An SVGA LCD panel with 4
defective pixels is usually considered defective and customers can request an
exchange for a new [Link] manufacturers, notably in South Korea where
some of the largest LCD panel manufacturers, such as LG, are located, now
have a zero-defective-pixel guarantee, which is an extra screening process
which can then determine "A"- and "B"-grade panels. Many manufacturers
would replace a product even with one defective pixel. Even where such
guarantees do not exist, the location of defective pixels is important. A display
with only a few defective pixels may be unacceptable if the defective pixels are
near each other. LCD panels also have defects known as clouding , which
describes the uneven patches of changes in luminance. It is most visible in dark
or black areas of displayed scenes.
25
with alignment films and LC mixtures similar to the traditional monostable
materials. Other bistable technologies, e.g., BiNem technology, are based
mainly on the surface properties and need specific weak anchoring materials.
5.2.5 Specifications
Resolution
Spatial performance:
26
certain display technologies mean the display only displays accurately at
certain angles.
Temporal performance:
Color performance:
27
Contrast ratio is the ratio of the brightness of a full-on pixel to a
full-off pixel. The LCD itself is only a light valve and does not generate
light; the light comes from a backlight that is either fluorescent or a set
of LEDs. Brightness is usually stated as the maximum light output of the
LCD, which can vary greatly based on the transparency of the LCD and
the brightness of the backlight. In general, brighter is better, but there is
always a trade-off between brightness and power consumption.
5.2.6 Advantages
Very compact, thin and light, especially in comparison with bulky, heavy
CRT displays.
No geometric distortion.
Usually no refresh-rate flicker, because the LCD pixels hold their state
between refreshes (which are usually done at 200 Hz or faster, regardless
of the input refresh rate).
28
Sharp image with no bleeding or smearing when operated at native
resolution.
Masking effect: the LCD grid can mask the effects of spatial and
grayscale quantization, creating the illusion of higher image quality.
As an inherently digital device, the LCD can natively display digital data
from a DVI or HDMI connection without requiring conversion to analog.
Some LCD panels have native fiber optic inputs in addition to DVI and
HDMI.
Can be made with very narrow frame borders, allowing multiple LCD
screens to be arrayed side-by-side to make up what looks like one big
screen.
5.2.7 Disadvantages
29
Uneven backlighting in some monitors (more common in IPS-types and
older TNs), causing brightness distortion, especially toward the edges
("backlight bleed").
30
Fixed bit depth (also called color depth). Many cheaper LCDs are only
able to display 262,000 colors. 8-bit S-IPS panels can display 16 million
colors and have significantly better black level, but are expensive and
have slower response time.
Low refresh rate. All but a few high-end monitors support no higher
than 60 or 75 Hz; while this does not cause visible flicker due to the LCD
panel's high internal refresh rate, the low input refresh rate limits the
maximum frame-rate that can be displayed, affecting gaming and 3D
graphics.
Input lag, because the LCD's A/D converter waits for each frame to be
completely been output before drawing it to the LCD panel. Many LCD
monitors do post-processing before displaying the image in an attempt to
compensate for poor color fidelity, which adds an additional lag. Further,
a video scaler must be used when displaying non-native resolutions,
which adds yet more time lag. Scaling and post processing are usually
done in a single chip on modern monitors, but each function that chip
performs adds some delay. Some displays have a video gaming mode
which disables all or most processing to reduce perceivable input lag.
Subject to burn-in effect, although the cause differs from CRT and the
effect may not be permanent, a static image can cause burn-in in a matter
of hours in badly designed displays.
31
Loss of brightness and much slower response times in low temperature
environments. In sub-zero environments, LCD screens may cease to
function without the use of supplemental heating.
5.3POWER SUPPLIES
using filters The present chapter introduces the operation of power supply
circuits built, rectifiers, and then voltage regulators. Starting with an AC
voltage, a steady DC voltage is obtained by rectifying the AC voltage, then
filtering to a DC level, and finally, regulating to obtain a desired fixed DC
voltage. The regulation is usually obtained from an IC voltage regulator unit,
which takes a DC voltage and provides a somewhat lower DC voltage, which
remains the same even if the input DC voltage varies, or the output load
32
connected to the DC voltage changes. A block diagram containing the parts of a
typical power supply and the voltage at various points in the unit is shown in
fig. The AC voltage, typically 120 Vrms, is connected to a transformer, which
steps that AC voltage down to the level for the desired DC output. A diode
rectifier then provides a full-wave rectified voltage that is initially filtered by a
simple capacitor filter to produce a DC voltage. This resulting DC voltage
usually has some ripple or AC voltage variation. A Regulator circuit can use
this DC input to provide a DC voltage that not only has much less ripple voltage
but also remains the same DC value even if the input DC voltage varies
somewhat, or the load connected to the output DC voltage changes.
5V
Output
Fig:5.3.2
33
5.4 TRANSFORMER:
5.5 RECTIFIER:
5.6 FILTER:
The filter circuit used here is the capacitor filter circuit where a capacitor is
connected at the rectifier output, and a DC is obtained across it. The filtered
waveform is essentially a DC voltage with negligible ripples, which is
ultimately fed to the load.
5.7 REGULATOR:
The output voltage from the capacitor is more filtered and finally regulated. The
voltage regulator is a device, which maintains the output voltage constant
irrespective of the change in supply variations, load variation and temperature
34
changes. Here we use two fixed voltage regulators namely LM 812, LM 7805
and LM7912. The IC 7812 is a +12V regulator IC 7912 is a -12V regulator and
IC 7805 is a +5V regulator.
This project uses +5V, +12V power supply for the operations of the IC’s and
relay driver circuit.
35
maintain a regulated output voltage over a range of load current. The
specifications also list the amount of output voltage change resulting from a
change in load current (load regulation) or in input voltage (line regulation).
Fig:5.7.4
The series 78 regulators provide fixed regulated voltages from 5 to 24V. A 7812
is connected to provide voltage regulation with output from this Unit of +12V
dc. An unregulated input voltage Vi is filtered by capacitor C1 And connected
to the IC’s IN terminal. The IC’s OUT terminal provides a Regulated + 12V
which is filtered by capacitor C2 (mostly for any high-Frequency noise). The
third IC terminal is connected to ground (GND). While the input voltage may
vary over some permissible voltage range, and the output load may vary over
some acceptable range, the output voltage remains constant within specified
voltage variation limits.
Since all electronic circuits work only with low D.C. voltage we need a power
supply unit to provide the appropriate voltage supply. This unit consists of
transformer, rectifier, filter and regulator. AC voltage typically 230V rms is
36
connected to a transformer which steps that AC voltage down to the level to the
desired AC voltage. A diode rectifier then provides a full-wave rectified voltage
that is initially filtered by a simple capacitor filter to produce a DC voltage. This
resulting DC voltage usually has some ripple or AC voltage variations. A
regulator circuit can use this DC input to provide DC voltage that not only has
much less ripple voltage but also remains the same DC value even the DC
voltage varies somewhat, or the load connected to the output DC voltages
changes.
The larger current at the emitter and collector can be controlled by the small
amount of current at the base. BC547 can be used commonly for amplifiers and
switches. Similar to all the other transistors BC547 has also three terminals e.g.
collector terminal, base terminal and emitter terminal respectively. The amount
of current flowing from base to the emitter controls the amount of the current
flowing through the collector. BC547 is usually used for amplification and
switching purposes. Its maximum current gain is around 800. A fixed DC
voltage is required for its proper operation in desired region. Proper voltage
supply is known as biasing. BC547 is biased in a way that it is partially on for
all the applied inputs, for the amplification purpose. The input signal is
amplified at the base and then transferred to the emitter.
37
Fig:5.8a
38
known as biasing. BC547 is biased in a way that it is partially on for all the
applied inputs, for the amplification purpose. The input signal is amplified at the
base and then transferred to the emitter.
Fig:5.8b
BC 547 has three pins in total similar to the other bipolar junction
transistors.
All of these three pins i.e. collector, base and emitter along with symbol
are shown in the table given below.
39
5.8.2 BC547 Pins Configuration
40
Fig:5.8.3
The current, power and voltage ratings of BC547 along with their values and
System International (SI) units are provided in the table shown below.
41
5.8.5 BC547 Thermal Characteristics
The thermal characteristics associated with BC 547 are provided along with
typical values, in the table shown below.
42
5.10 ULTRASONIC SENSOR
In a similar way to radar and sonar, ultrasonic transducers are used in systems
which evaluate targets by interpreting the reflected signals. For example, by
measuring the time between sending a signal and receiving an echo the distance
of an object can be calculated. Passive ultrasonic sensors are basically
microphones that detect ultrasonic noise that is present under certain conditions.
5.11 History
43
hyper phonography which recorded echoes of ultrasonic waves on a sensitive
paper. This technique was used to produce ultrasound pictures of the brain to
help detect tumors and marked the birth of ultrasound imaging. After that, many
scientists like Ian Donald, Douglas Howry, Joseph Holmes, John Wild and John
Reid improved upon the various aspects of ultrasonic sensors in the medical
field which enabled diagnosis of stomach cancers, ovarian cysts, detection of
twin pregnancies, tumors etc. Industry too did not waste time in jumping on to
the bandwagon and soon developed techniques like ultrasonic welding and non
destructive testing at the outset of the 1960s.
44
FIG. Graphical Figure of Frequency Ranges of Sound
Fig:5.12
Fig:5.13
Diagram Giving Insight how ultrasound Waves Work
45
5.13 Ultrasonic Wave Generation
For the generation of such mechanical waves, movement of some surface like a
diaphragm is required which can then induce the motion to the medium in front
of it in the form of compression and rarefaction. Piezoelectric materials
operating in the motor mode and magnetostrictive materials have been widely
employed in the generation of ultrasonic waves at frequency ranges of 1-20
MHz and 20-40 kHz respectively. The sensors employ piezoelectric ceramic
transducers which flex when an electric signal is applied to them. These are
connected to an electronic oscillator whose output generates the oscillating
voltages at the required frequency. Materials like Lead ZirconateTitanate are
popular piezoelectric materials used in medical ultrasound imaging. For best
results, the frequency of the applied oscillations must be equal to the natural
frequency of the ceramic, which produces oscillations readily through
resonance. It offers maximum sensitivity and efficiency when operated at
resonance.
46
produced by mechanical arrays and curved and phased electronic arrays, while a
linear field is generated by linear arrays. The display modes may be linear
graphical plotting with amplitude on y-axis and time on x-axis called Amplitude
mode or A-mode, or intensity modulated B-scans where the brightness of a spot
indicates the amplitude of reflected waves. Other modes include M-mode,
Doppler (D) Mode etc.
Fig:5.14 Graphical Image Showing Axial and Cross Sectional Beams Profile
47
Frequency, Bandwidth center Frequency, Pulse Width, sensitivity and Signal to
Noise Ratio (SNR).
For example, in the case of clear object detection and measurement of liquid
levels or high glare environments, light based sensors would suffer greatly
because of the transmittance of the target or the translucence of the propagating
media. Ultrasonic devices being based upon sound propagation would remain
practically unaffected. These also function well in wet environments where
optical beams may suffer from refraction from the water droplets in the
environment. On account of range and accuracy, the ultrasonic sensors may lie
in between two EM wave based sensors, the Infrared rangefinders on the lower
end and the LIDARs on the upper end. Not as accurate or long distance as the
LIDARs, the Ultrasonic rangefinders fare better than the IR rangefinders which
are highly susceptible to ambient conditions and require recalibration when
48
environment changes. Further these devices offer advantage in medical imaging
as compared to MRI or X-Ray scans due to inexpensiveness and portability. No
harmful effects of ultrasonic waves at the intensity levels used have been
detected in contrast to X-rays or radioactivity based methods and is particularly
suited for imaging soft tissues.
However, Ultrasonic sensors too aren’t free of all the problems. The speed of
sound in a medium increases as the temperature of the medium increases. Thus
even when the target has remained in the same place, it may now seem that it
has shifted to a place closer to the sensor. Air currents due to varied reasons
may disturb the path of the wave which could lead to ‘Missed Detection’ or a
wrong measurement.
Acoustic noise like high pitched sounds created due to whistling or hissing of
valves and pneumatic devices at the frequency close to the operating frequency
may interfere with the output of the sensor. Electrical noise also affects the
performance of the sensor. These may generate artifacts which are not a true
representation of the imaged object. Just like the vision starts to blur when the
distance of the object from the eye gets too small for the eyes to see it,
ultrasonic devices also have a ‘dead zone’ where the sensor cannot reliably
make measurements. This happens due to a phenomenon called ringing which is
the continuous vibration of the transducer after emitting the pulse. Thus when
the distance is too small, the transducer has not yet come to rest to be able to
differentiate between the vibration due to the incident radiation or the
oscillation from the electrical excitation. The dangers of Ultrasonic waves are
also well founded. If the intensity is too high, it can cause human tissues to heat
and may cause ruptures in people exposed to it. Ethical issues like fetus
49
identification and resulting abortions in medical field are also a widespread
concern.
Ultrasound can be used for measuring wind speed and direction (anemometer),
tank or channel fluid level, and speed through air or water. For measuring speed
or direction, a device uses multiple detectors and calculates the speed from the
relative distances to particulates in the air or water. To measure tank or
channel liquid level, and also sea level (tide gauge), the sensor measures the
distance (ranging) to the surface of the fluid. Further applications
include: humidifiers, sonar, medical ultrasonography, burglar alarms, non-
destructive testing and wireless charging.
50
measurement resolution to far exceed the wavelength of the sound frequency
generated by the transducers.
5.14 ALARM
In this project we are using the alarm for give a sound indication to
blind peoples. A buzzer or alarm is a signaling device, usually electronic,
typically used in automobiles, household appliances such as a microwave oven,
or game shows.
Fig:5.14
51
5.15 ALARM CIRCUIT
Fig:5.15
5.16 BUZZER:
Often these units were anchored to a wall or ceiling and used the ceiling or wall
as a sounding board. Another implementation with some AC-connected devices
was to implement a circuit to make the AC current into a noise loud enough to
drive a loudspeaker and hook this circuit up to a cheap 8-ohm speaker.
Nowadays, it is more popular to use a ceramic-based piezoelectric sounder like
a Son alert which makes a high-pitched tone. Usually these were hooked up to
52
"driver" circuits which varied the pitch of the sound or pulsed the sound on and
off.
The circuit is designed to control the buzzer. The buzzer ON and OFF is
controlled by the pair of switching transistors (BC 547). The buzzer is
connected in the Q2 transistor collector terminal.
5.17.1 INTRODUCTION:
Crystal oscillators are a common source of time and frequency signals. The
crystal used therein is sometimes called a "timing crystal".
53
5.17.2 CRYSTALS FOR TIMING PURPOSES:
Fig:5.17.2
Almost any object made of an elastic material could be used like a crystal,
with appropriate transducers, since all objects have natural resonant
frequencies of vibration. For example, steel is very elastic and has a high
speed of sound. It was often used in mechanical filters before quartz.
The resonant frequency depends on size, shape, elasticity and the speed of
sound in the material. High-frequency crystals are typically cut in the shape
of a simple, rectangular plate. Low-frequency crystals, such as those used in
digital watches, are typically cut in the shape of a tuning fork.
54
For applications not needing very precise timing, a low-cost ceramic
resonator is often used in place of a quartz crystal.
When the field is removed, the quartz will generate an electric field as it
returns to its previous shape, and this can generate a voltage. The result is
that a quartz crystal behaves like a circuit composed of an inductor,
capacitor and resistor, with a precise resonant frequency.
Quartz has the further advantage that its size changes very little with
temperature. Therefore, the resonant frequency of the plate, which depends
on its size, will not change much, either. This means that a quartz clock,
filter or oscillator will remain accurate.
Quartz timing crystals are manufactured for frequencies from a few tens of
kilohertz to tens of megahertz. More than two billion (2 × 10 9) crystals are
manufactured annually. Most are small devices for wristwatches, clocks,
and electronic circuits. However, quartz crystals are also found inside test
and measurement equipment, such as counters, signal generators, and
oscilloscopes.
55
Fig:5.17.3
The crystal will therefore start oscillating in synchrony with that signal. As
the oscillator amplifies the signals coming out of the crystal, the crystal's
frequency will become stronger, eventually dominating the output of the
oscillator. Natural resistance in the circuit and in the quartz crystal filter out
all the unwanted frequencies.
One of the most important traits of quartz crystal oscillators is that they can
exhibit very low phase noise. In other words, the signal they produce is a
pure tone. This makes them particularly useful in telecommunications where
stable signals are needed, and in scientific equipment where very precise
time references are needed. The output frequency of a quartz oscillator is
either the fundamental resonance or a multiple of the resonance, called an
overtone frequency.
56
A typical Q for a quartz oscillator ranges from 10 4 to 106. The maximum Q
for a high stability quartz oscillator can be estimated as Q = 1.6 × 10 7/f,
where f is the resonance frequency in MHz
These designs (particularly the OCXO) often produce devices with excellent
short-term stability. The limitations in short-term stability are due mainly to
noise from electronic components in the oscillator circuits. Long term
stability is limited by aging of the crystal.
57
Each new distinct crystal source needs to be rigorously justified since each
one introduces new difficult to debug probabilistic failure modes, due to
multiple crystal interactions, into equipment.
A Quartz crystal provides both series and parallel resonance. The series
resonance is a few kHz lower than the parallel one. Crystals below 30 MHz
are generally operated at parallel resonance, which means that the crystal
impedance appears infinite.
Any additional circuit capacitance will thus pull the frequency down. For a
parallel resonance crystal to operate at its specified frequency, the
electronic circuit has to provide a total parallel capacitance as specified by
the crystal manufacturer.
Crystals above 30 MHz (up to >200 MHz) are generally operated at series
resonance where the impedance appears at its minimum and equal to the
series resistance. For this reason the series resistance is specified (<100 Ω)
instead of the parallel capacitance. For the upper frequencies, the crystals
are operated at one of its overtones, presented as being a fundamental, 3rd,
5th, or even 7th overtone crystal. The oscillator electronic circuits usually
provides additional LC circuits to select the wanted overtone of a crystal.
58
some temperatures). This is generally avoided by using low impedance
oscillator circuits to enhance the series resistance difference.
5.17.4B) NOTATION:
59
TCXO - temperature-compensated crystal oscillator
CHAPTER-VI
SOFTWARE EXPLANATION
6.1 Arduino IDE
60
Programming and flashing a microcontroller mean the same thing, you are
taking compiled code and uploading it to a microcontroller. The terms are often
used interchangeably.
We’ll first cover how to setup your computer and Omega, and then move on to
cover how to actually flash your Arduino Dock.
6.1.2 Prerequisites
You’ll need to first make sure that your Omega has connected to internet.
Then you’ll want to ssh into the Omega’s terminal in order to install the
Arduino dock package.
To install this package you’ll need to use opkg. Enter the following commands
on the command-line:
opkg update
61
OS X Nothing, good to go
Arduino IDE
Install the latest Arduino IDE from the good folks over at Arduino. We did all
of our testing using Version 1.8.0.
Open the Arduino IDE and go to File -> Preferences. Copy this URL to our
Arduino Dock device profile:
[Link]
IDE_Board_Manager/package_onion.io_index.json
And paste it into the Additional Boards Manager URLs section near the
bottom of the window.
62
If you already have links to other custom boards in your IDE, click on the
button on the right of the text box. You can then add the URL in a new line.
Click OK, then go to Tools -> Boards -> Board Manager (at the top of the
menu). In the search bar, type “Onion” and hit Enter. When the Onion Arduino
Dock entry pops up, click on Install.
63
Click on Close to return to the IDE. The editor will now download the settings
for the Arduino Dock and make it available as a board in the Tools -> Boards
menu!
Now we get to the fun part, flashing sketches to the ATmega chip!
There are two methods for flashing the ATmega328P chip using the Omega:
64
6.1.5 Wireless Flashing with the Arduino IDE
Thanks to the setup you did on your computer and the Arduino Dock, you can
actually use the Arduino IDE on your computer to wirelessly flash Sketches to
the Arduino Dock, so long as your computer and the Omega on your Arduino
Dock are on the same Wi-Fi network.
The Steps: In the Arduino Tools menu, select “Onion Arduino Dock” for the
Board (near the bottom of the menu), and your Omega-ABCD hostname as the
65
If your Omega does not show up in the Port menu as a network port, restart the
Arduino and wait for 30 seconds:
When your sketch is ready, hit the Upload button. Once the sketch is compiled,
it will prompt you for your Omega password to upload the sketch. The
66
password is onioneer by 5.4.3 default:
The IDE actually creates an SSH connection with the Omega to transfer the
compiled hex file, and the Omega with then flash the ATmega microcontroller
using 4 GPIOs.
67
Once the upload completes, the info screen will show something along the lines
of:
68
First, enable verbose output during compilation in the Arduino IDE
Preferences:
Hit the verify button to compile the sketch, once it’s complete you will
have to scroll to the right to find the path to the compiled hex file:
69
CIRCUIT DIAGRAM
70
CHAPTER-VII
CONCLUSION
The purpose of this paper is to decrease the number of accidents in curve roads.
This is done by alerting the driver by means of LED light which glows when
vehicle comes from the other side of the curve. The vehicle is detected by the
help of Ultrasonic sensor which is interfaced to the microcontroller Arduino
UNO. By this we can save thousands of lives in the curve roads.
71
REFERENCE
[2] M. H Mohamad, Mohd Amin Bin Hasanuddin, MohdHafizzie Bin Ramli “Automobile
Accident Prevention System Embedded with Alcohol Detector”, International Journal of
Review in Electronics & Communication Engineering (IJRECE) Volume: 1 – Issue: 4
October 2013.
[4] Leslie Cromwell, Fred J. Weibell and Erich A. Pfeiffer, “Biomedical Instrumentation and
measurements”, 2nd Edition, Printice Hall India Pvt. Ltd., 2001
[5] Grace R. 2001, “Drowsy driver monitor and warning system”, International driving
symposium on human factors in driver assessment, training and vehicle design, Aspen, CO;
pp. 201–208. Citeseer
[6] Lin CT, Chen YC, Wu RC, Liang SF, Huang TY. “Assessment of Driver's Driving
Performance and Alertness Using EEG-based Fuzzy Neural Networks”, ISCAS 2005. IEEE
International Symposium on Circuits and Systems. 2005; 1:152–5.
[7] “An IoT Based Accident Prevention & Tracking System for Night Drivers”- Aishwarya
S.R, Ashish Rai, Charitha, Prasanth M.A, Savitha S.C.
72