SlideShare a Scribd company logo
1 of 32
Download to read offline
‫الرحيم‬ ‫الرحمن‬ ‫هللا‬ ‫بسم‬
Acknowledgement
READ is the first order that was given in our religion, so we hope that
this project and its effort will support our nation in particular and the
humanity in general.
Many thanks to our parents who have been the light and fuel from the
beginning until the very end. We would have never reached this point
without their support and help in every step.
We thank Prof.Mansour Abbadi, our respective teacher, his great
assistance and supervising not just this project but also the electrical
engineering courses were the saving rope when an issue was against us.
He helped us with a lot of patience and kindness.
Thanks to everyone helped us doing this specially Eng.Momen Nemrat,
who gave us valuable information that saved us a lot of time and search.
We thank every instructor in our entire studying road, who didn’t spare
any effort while teaching and helping us become what we are today.
We have tried to give a complete and clear description about this
project. We do not claim perfection, and sure there will be some
mistakes that are unintentionally made. We hope that the main idea and
scheme are clarified and clear, also we hope that this work will have a
vital rule in saving people’s lives everywhere in the world.
Abstract
This project is about ultrasound principles and implementations.
Students as well as electrical engineers who are interested in electronics
and embedded systems will find this project useful and informative.
Using both LV-EZ0 and HC-SR04 ultrasound sensors to detect objects
and find the distance between them and the transmitters, we can make
some useful applications that would help the humanity and be a step to
avoid tragedies.
The idea is to increase safety by detecting objects and automatically
taking actions if the driver is not aware. This needs a corporation
between ultrasound distance measurement, the processor and the
mechanical system of the car. This project will help enhancing safety and
decreasing accidents, as well as helping in making a self-driving car in the
near future.
Driving in the night when the road lights are off can cause many serious
accidents that might lead to death. Sometimes drivers unintentionally
fell asleep while driving and so they might never wake up. Ultrasound
sensors can work in almost any environment trying to save the lives of
the users. By sensing the surrounded area looking for objects that are
close and can cause an accident, with the help of a microcontroller the
car can dodge that object or stop if no other way is available to save the
driver.
Chapter 1: Introduction
1.1 Brief Introduction to Distance Measurement and Ultrasound
People usually refer to distance as a mean for describing how far apart objects
are. When it comes to Mathematics, scientists use the term "metric". Which is a
function that define the amount of space between two points.
Distance Measurements are being used by so many life disciplines nowadays.
Including land surveying, tower buildings, aerospace discoveries, agriculture and
many other fields. The need for more developed and technology orientated tools has
become larger and more insistent. Modern scientists has invented so many different
ways to measure distances.
Talking about present, it is not quite surprising that the amount of US
instrument has become uncountable and still we get something new every day. The
invention of digital logic circuit and microcontroller make it even easier for university
students to contribute and put their ideas in the hand of the world.
So basically on this project, we are talking about measuring distances using
modern technology. There are many ideas in this field. However, one of them is the
measuring of distance using ultrasonic waves .
US sensors have a bigger response time than IR sensors but they are much
reliable when it comes to relatively large distances and transparent object detecting
(because they are not based on vision). When using US sensors, one could get
advantages of low cost and good precision instruments. More explanations about US
sensors are coming ahead.
Ultrasonic waves are similar to audible waves. Their physical natures are of
identical properties except that the ultrasonic waves have higher frequency range (20
KHz up to few MHz's). Which is higher than the average human can hear
(approximately 20 KHz).
Because of their outstanding natures. US sensors has been used as distance
measurement tool and for other application. They are said to be non-intrusive as they
do not require direct contact with an object. Their frequency band allow them to travel
long distances in water without so much attenuation. That is why the early inventions
of US was in the field of underwater navigating.
1.2 History of Ultrasonic Waves and their uses
Measuring distances using US is not a brand new idea however, the first
attempt to use US was held back in 1900s. There were many scientist who dedicate
their effort for improving US. They developed the US before the World War I and
they invented SONAR ((Sound Navigation and Ranging)). Reginald Fessenden, a
Canadian scientist who build the first working Sonar in united states in 1914. Two
years before that and after the tragic sinking of Titanic, Lewis Richardson registered a
patent to his name about echo ranging with airborne sound. After the invention of
Triode and Diode. A French scientist called Paul Langevin Along With his partner
produced what appeared to be the first ultrasonic submarine detector. Underwater
detection system gets huge benefits from the invention of Paul. It was able to detect
icebergs.
Actually there was a very important invention prior to Paul's invention, which
is the piezoelectric devices. Simply, piezoelectric phenomenon state that when you
deform the shape of some material, these materials generate electric charges that you
can measure with a voltmeter. This was discovered by Curie Brothers in 1880s. One
could say that Paul's invention is the first application on piezoelectricity.
You may think that the benefits of US are limited to military application. But
that is wrong. Through the early discovery of US. This field of science contribute
enormously in the medicine field. Ultrasound Scanning is the science that use sound
wave to create images of organs. In the late 1940s George Ludwig did experiments on
animal tissues to detect, identify and locate foreign bodies using equipment similar to
sonar .
During the beginning of 1960s. Researches of ultrasonic in Obstetrics was
being more popular and serious. Scientists appeared to notice the powerful tools they
have behind US transducers. 1965 in Germany, a group of 3 researches invent a Real-
time scanner that completely changed the whole picture and boost the ultrasound
scanning field.
1.3 Soundwaves:
Sound is a mechanical waveform that propagates away from a source in an
elastic media generating density variations. Generating a soundwave needs a device
that can perform some kind of mechanical work to a medium, just like the sound
generated by the mechanical work produced by the vocal cords in the air (medium of
propagation) in the human body. Similarly, to detect sound, mechanical work must be
applied to the detector, in the human hearing system mechanical work is achieved
through vibrations in the eardrum. Since mechanical work or energy is associated
with the transmission of sound, the elastic and inertial properties of the material in
which sound propagation occurs will affect the efficiency of wave propagation. That
is why the sound propagation in air is slower than in water. Acoustic waves are
characterized by their frequency, wavelength, and amplitude. Depending on the
frequency of the waveform, sound waves can be classified as infrasonic, sonic, and
ultrasonic. Sonic waves have frequencies between 20 and 20,000 Hz, which
correspond to the frequency range of the human hearing. Waves with frequencies
below 20 Hz are classified as infrasonic, while waves with frequencies above 20,000
Hz are classified as ultrasonic. The frequency range of sound detection of different
species, including humans, is detailed in the figures below. On the other extreme of
the frequency scale, acoustic waves, with frequencies between 1 and 10 MHz are
commonly used in diagnostic ultrasound techniques.
1.4 Applications of Distance Ultrasonic Sensors:
 Ultrasonic is used in a wide variety of applications, the substance does not
matter because ultrasonic sensors detect almost all materials (Liquids like milk,
chemicals, or lacquer as well as mud and solids). In gravel open-cast mines there are
construction materials like sand, crushed rock, and gravel, these materials are
excavated at depths of up to 50 m and must be appropriately stored until they can be
transported from the site. Conveyor belts transport the materials to silos so ultrasonic
sensors determine when the maximum fill level is reached.
 In waste water treatment, it produces enormous amounts of sewage sludge on
a daily basis. This waste product has to be processed or properly disposed of. Either
way, it is necessary to load the sewage sludge into appropriate transport containers
where the ultrasonic sensors monitor the process to prevent overfilling of
the containers.
Infrasound Acoustic Ultrasound
20 Hz 20 KHz 2 MHz 200 MHz
 Drivable aerial work platforms are commonly used in many construction sites.
These platforms facilitate working in high locations and increase productivity.
However, a lot of accidents involving aerial work platforms occur due to collisions,
the safety aspect should not be ignored, so by using the ultrasonic sensors
to safeguard the operation of this equipment, the accidents are rarely happening and
the workers are guarded better.
 Ultrasonic sensors measure the distance to a wide range of target objects
regardless of the object’s shape, color or optical characteristics. They are able to
measure whether an object is approaching or leaving even when objects are moving
fast.
 Currently, vehicles are often equipped with active safety systems to reduce the
risk of accidents, most of which occur in urban environments. An ultrasonic sensor is
used to measure the distance between vehicles. The relative speed is estimated using
consecutive samples of this distance. These two quantities are used by the control
system to calculate the actions on both the accelerator and the brake, and to adjust the
speed in order to maintain the safety distance. As ultrasonic sensors can detect any
kind of obstacle, this system can also prevent collision with pedestrians, or at least
reduce the injuries sustained.
 In car parking lots and parking garages, entry is controlled using barrier
systems. The barrier must not be lowered when there is a
vehicle underneath. Ultrasonic sensors are particularly suitable for controlling this
process. They detect objects regardless of vehicle type or color and monitor the
entire area below the barrier.
 Logistics applications in the material handling industry rely on
forklifts for safely transporting heavy loads to their destination. Ultrasonic
sensors monitor specific areas of the forklift to ensure accuracy and reliability.
With ultrasonic sensors, you can determine whether a pallet is on the fork and how far
the fork is inserted under the pallet.
 Detecting and counting bottles at several points in the machine ensures
continuous monitoring of material flow. The entry and exit of bottles in the filling
system is optimized and missing bottles in the chain are reliably detected. Even in
areas with strong steam generation, reliable detection of bottles is guaranteed
with ultrasonic thru-beam sensors.
Ch2: Ultrasound Principles
2.1 General Aspects:
 Wave Propagation
When sound waves travel through a material they do so at a specific velocity.
This velocity is determined by the frequency and wavelength of the wave. Equation (2.1)
describes the relationship between soundwave velocity, frequency, and wavelength:
𝑐 = 𝑣. 𝜆 (2.1)
Where c is the wave velocity (m.s-1
), v is the frequency (s-1
), and λ is the wavelength (m)
of the wave. As previously mentioned, the speed of sound is affected by the
characteristics of the material through which the sound is being propagated. If the sound
propagates in a liquid or gas, the speed of sound is a function of the bulk modulus of the
material (Eq. 2.2):
𝑐 = √
𝐾
𝜌
(2.2)
Where K is the bulk modulus and ρ is the density. When sound waves propagate in the
solid, the elastic modulus is used instead. The relationship between the elastic (E) and
bulk modulus (K) is shown in Eq. (2.3):
𝐸 = 𝐾 +
4
3
𝐺 (2.3)
Where G is the shear modulus.
In general, the speed of sound is the lowest in gases with values in the range of
200 – 500 m.s-1
, followed by the speed of sound in liquids, with values in the range of
1200 – 2000 m.s-1
, where the highest values of speed of sound are found in solids, with
values in the range of 3200 – 6500 m.s-1
. Table 2.1 shows the speed of sound values in
different materials. The speed of sound is generally proportional to stiffness and density
of the medium, where other environmental conditions such as temperature have their
effect too.
It is important to note here that when soundwaves travel through a material they
generate only local displacement of particles; there is no movement of particles from one
point to the other. Instead, particles oscillate around their equilibrium position as a
consequence of wave propagation from the source to the detector. To better understand
this concept, the figure below shows a typical acoustic wave and the relationship between
acoustic pressure and particle displacement:
The first line of the figure shows particles in equilibrium position. When an acoustic
wave travels from left to right in the direction shown by the arrow, particles move around
their equilibrium position generating zones of compression and rarefaction. As already
mentioned, no net displacement of particles is observed. The oscillation of particles
results in gradients in the media where zones of high and low concentration of particles
are observed. Highly concentrated zones of particles are observed when the media is
compressed, while a low concentration of particles is observed in the rarefaction zones.
The compression and rarefaction zones correspond to maximum and minimum
amplitudes in the acoustic wave, respectively, as shown in the third line of the figure.
 Reflection of Ultrasound Waves:
When an US wave collide to a surface, there will be a reaction of more depending
on the surface properties, those reactions can be summarized as:
Transmission: The wave passes through the surface into the medium beyond it.
Absorption: The surface absorbs the wave and thus it will be lost.
Reflection: The surface reflects the wave to one direction.
Diffusion: The surface scatters the wave in many directions.
In order to reflect a sound wave, there must be an abrupt change in density. US waves
travel through low density mediums, which make the high density mediums the most
efficient for reflecting the wave, although a part of the wave might be transmitted into the
other side of the medium. The most important rule for reflection is to have an angle of
incidence equal to the angle of reflection, where both of angles should be measured
relatively to an imaginary normal line to the boundary.
𝜃𝑖 = 𝜃𝑟
Reflection is often quantified in term of the reflection coefficient R. Acoustic reflection
coefficient (R) varies between -1 and +1. R is defined simply as the ratio of the reflected
wave (ar) on the incident wave (ai) amplitudes.
𝑅 = 𝑎 𝑟/ 𝑎𝑖
The acoustic impedance (Z: measured in Rayl, kg/(m2s)) is a physical property of
medium. It describes how much resistance an Ultrasound beam encounters as it passes
through a medium. The acoustic impedance is simply the product of the density (r) and
the sound speed (c) of the fluid:
𝑧 = 𝑟 × 𝑐
The full expression for sound reflection coefficient (R) is:
𝑅 =
(𝑧2/𝑧1) − √(1 − [𝑛 − 1] tan2 𝛼𝑖
(𝑧2/𝑧1) + √(1 − [𝑛 − 1] tan2 𝛼𝑖
Where 𝑛 = (𝑐2 / 𝑐1)2
and (𝛼𝑖) is the angle of incidence.
Much like light waves, ultrasound waves can be focused and concentrated. A
concave surface will concentrate sound waves by reflecting them to a common point
while a convex surface will disburse sound waves by reflecting them in opposite
directions.
Studying the reflection of sound waves over different objects is very important in
the science of US distance measurement. Because a good reflection means a good
feedback signal and therefor almost an accurate measure. When we start examining the
properties of reflected sound waves, we encounter several problems that actually restrict
the use of US sensors.
1. Sound wave is a longitudinal signal that strike a surface. So the surface needs to be
perpendicular to the direction of propagation.
2. The surface need to be much larger than the wave length 𝜆 = 𝑐/𝑓 in order to reflect
as much of the wave as possible.
3. Although the sound propagates well in air and water, better reflected wave occur
when the object is not too far away. There is actually a limit for the maximum
distance between target and sensor which is 15-20 m.
4. Not all surfaces reflect sound perfectly. Some materials absorb the major of the signal
power and do not reflect any considerable amount. Surface need to be smooth and
hard.
After examine all of these factors, we are now able to define what we would like to call
an Ideal target. An Ideal Target is a target that has a smooth and solid surface that reflect
almost all of the signal power and it’s located in a way perpendicular to the direction of
propagation.
2.2 Block Diagram, Tx and Rx circuits:
The burst signal goes to the ultrasonic transmitter (US Tx) and is transmitted as
ultrasound through the air Figure 2. When the wave is reflected of an object, this wave
is captured by the ultrasonic receiver (US Rx.) This received signal will be amplified
because it attenuates as it travels. Afterwards, the signal goes back to the
microcontroller unit (MCU), filters and then we calculate the distance.
The overall block diagram of the US distance measurements device is shown in the
figure below
Transmitting unit:
1. Microcontroller:
is used to control the switch, to measure the time required the wave to travel to
the target and back to receiver, and to make the calculations of distance to
show on a display
2. Switch:
it’s used to send the wave is a specific time and to block it otherwise.
3. Gain Amplifier:
it’s used with a level shifter if the analog switch cannot pass the signal.
Receiving Unit:
1. Gain Amplifier:
used to amplify the received signal, which is attenuated in the medium that
travelled in.
2. Comparator:
used to weed out the noise and false triggering, comparing the output of the
amplifier with a reference threshold level.
Transmitter circuit:
We will consider a triple-five (555) timer IC for the
transmitting circuit of the ultrasonic, as for the operation of
the oscillation circuit which used 555 oscillator.
The sending out time of the ultrasonic pulse is controlled by
the oscillation circuit (IC1), this time can be calculated by the
well-known formula
𝑇𝐿 = 𝐿𝑛(2) × 𝑅 𝐴 × 𝐶
And 𝑇 𝐻 = 𝐿𝑛(2) × (𝑅 𝐴 + 𝑅 𝐵) × 𝐶
Usually RA much larger than RB.
IC2 is the circuit to control the US oscillate frequency (f),
oscillation’s operation is the same of IC1, but RB is bigger
than RA to ensure the duty cycle of the oscillation wave to be
close to 50%.
The frequency of the ultrasonic (f) must be adjusted to the
sensor resonant frequency where
𝑓 = 1/(𝑇𝐿 + 𝑇 𝐻)
And again
𝑇𝐿 = 𝐿𝑛(2) × 𝑅 𝐴 × 𝐶
𝑇 𝐻 = 𝐿𝑛(2) × (𝑅 𝐴 + 𝑅 𝐵) × 𝐶
The output of IC1 is connected with the reset terminal of IC2 through the inverter.
When the reset terminal is the H level, IC2 works in the oscillation. The ultrasonic of
frequency (f) is sent out for the TL of IC1 and pauses for the TH of IC1.
Receiver circuit:
1. Signal Amplification:
The ultrasonic signal which was received with the reception sensor is amplified
by 1000 times (60dB) of voltage with the operational amplifier with two stages.
It is 100 times at the first stage (40dB) and 10 times (20dB) at the next stage.
As for the dB.
Generally, the positive and the negative power supply are used for the
operational amplifier. The circuit this time works with the single power supply of
+9 V. Therefore, for the positive input of the operational amplifiers, the half of
the power supply voltage is applied as the bias voltage and it is made 4.5 V in the
central voltage of the amplified alternating current signal. When using the
operational amplifier with the negative feedback, the voltage of the positive
input terminal and the voltage of the negative input terminal become equal
approximately. So, by this bias voltage, the side of the positive and the side of
the negative of the alternating current signal can be equally amplified. When not
using this bias voltage, the distortion causes the alternating current signal. When
the alternating current signal is amplified, this way is used when working the
operational amplifier for the 2 power supply with the single power supply.
2. Detection circuit:
The detection is done to detect the received
ultrasonic signal. It is the half-wave rectification
circuit which used the Shottky barrier diodes. The DC
voltage according to the level of the detection signal
is gotten by the capacitor behind the diode. The
Shottky barrier diodes are used because the high
frequency characteristic is good.
3. Signal detector:
This circuit is the circuit which detects the
ultrasonic wave which returned from the
measurement object. The operational amplifier
amplifies and outputs the difference between the
positive input and the negative input.
In case of the operational amplifier which doesn't
have the negative feedback, at a little input
voltage, the output becomes the saturation state.
Generally, the operational amplifier has tens of
thousands of times of mu factors. So, when the
positive input becomes higher a little than the
negative input, the difference is tens of thousands
of times amplified and the output becomes the
same as the power supply almost. (It is the saturation state) Oppositely, when
the positive input becomes lower a little than the negative input, the difference
is tens of thousands of times amplified and the output becomes 0 V almost.(It is
in the OFF condition) This operation is the same as the operation of the
comparator.
2.3 Principle of Operation
2.3.1 US measurement by logic gates and electronics circuit
The transmitter is fed with 25 kHz sinusoidal that is amplitude modified by a 50Hz
square wave with uneven duty cycle. The reason of that is because 25k is the operating
frequency of the transmitter. Note that the overall signal will roughly look something like
this.
The transmitted and received signal
 Transmitter circuit
Take a look at the transmitter circuit below.
When the “PUSH BUTTON” is pushed. It sets the first
SR latch and the second one is sat at the rising edge of
our square wave. Sitting the second latch will activate
the AMP. MODULATOR that will send a burst of our
signal to outside.
The second SR latch is connected to AMP.
MODULATOR and to a clock that start counting
whenever the SR latch is sat. Note that the rising edge
detector activate the Tx and the counter at the same time.
Counter circuit explanation is coming ahead.
 Receiver Circuit
First of all, we need to amplify the signal
because the received signal is usually in tenths of
millivolts. The bandpass filter usually implemented it
the receiver module. The “ENV. DET.” used to get
our square pulse. The “COMP” compare the value
with a reference voltage. Note that the reference
voltage selection is critical. If it is chosen to be too
low. The overall system will be too sensitive to noise.
If it is chosen to be very high. Most of the received
signals will not pass. Thus we have to make a trial
and error procedure to estimate the correct value.
After that, the COMP will reset the latch and
therefore will stop the counter.
 Counter Circuit
The counter counts from the first rising edge of
our square wave until the receiver detect the signal.
Note that the second input to the AND gate is
connected to the second SR latch above. We can use a
7-Seg display or we can attach an LCD to read the
number. We need a microcontroller or such devise to
do the simple calculations to get the results.
Test distance = (high level time × velocity of sound (340M/S)) / 2
2.3.2 US measurement by a microcontroller
Here the principle is the same but instead of using external logic gates and
counters, we use a microcontroller instead. The following block diagram illustrate the
idea. We may program the following chart on the microcontroller.
2.4 Some Ultrasonic Distance Measurement Circuits
There exist some types of Ultrasonic distance Measurement modules which
can be applied in our project, below we examine these modules and try to choose an
optimum module corresponding to our project.
2.4.1 The MC9RS08KA2
This sensor is produced by the Freescale Semiconductor Company. The MCU
(micro controller unit) MC9RS08KA2 is integrated along with Ultrasonic
Transducers (255-400ET18-RO) as the picture shows:
The Characteristics of this device:
1) Simple design and implementation.
2) Relatively small board.
3) Can work with ranges up to 3m.
4) Most component are of low price.
5) Low power consumption.
6) The design uses a 3.3 V power supply.
7) Center frequency: 40.0 kHz ± 1 kHz and take 20V as an input.
A schematic about this device is shown below:
2.4.2 The MSP430 from TEXAS INSTRUMENTS
Texas Instruments Inc. (TI) is an American electronics company that designs and
makes semiconductors.
Below is a circuit diagram for this module and properties:
1) This module uses ultra-low-power microcontroller.
2) The distance is displayed in inches with an accuracy of ±1 inch.
3) The minimum distance that this system can measure is eight inches and the
maximum distance is ninety-nine inches.
4) Uses 40 KHz center frequency.
5) Easy and rich library for software programming.
6) A lot of external components needed with the microcontroller.
2.4.3 The 8051 Microcontroller Form Intel
The Intel MCS-51 is a Harvard architecture, complex instruction set computing
(CISC) instruction set, single chip microcontroller (µC) series developed by Intel in
1980 to be used in embedded systems. Intel's original versions were popular in the
1980s and early 1990s and enhanced binary compatible derivatives remain popular
today.
Below is a circuit diagram for this module and properties:
1) The microcontroller can work with a large number of ultrasound sensors.
2) Complex software programing microcontroller which depends on assembly
language.
3) The sensor has a resolution of 0.3 cm, and a range from 2 cm until 500 cm.
4) Cheap and simple 7-segment displays can be used instead of LCD.
2.4.4 The CN – 0343 Circuit
The circuit evaluation is from Circuit Evaluation Board (EVAL-CN0343-EB1Z).
Below is the circuit diagram and properties:
1) The circuit completely self-contained distance sensor that utilizes an ultrasonic
transmitter and sensitive analog receiver in conjunction with a precision analog
microcontroller to provide distance measurements.
2) Unlike complicated PLL-based receivers, the sensor uses a sensitive window
comparator circuit, thereby minimizing real estate and cost.
3) The approximate range is from 50 cm to 10 m with a resolution of about 2 cm.
4) Temperature compensation is provided by the integrated temperature sensor
and analog-to-digital converter (ADC) contained in the microcontroller.
5) Devices Connected/Referenced:
 ADuC7126: 32 kB RAM, 126 Kbite Flash ARM7TDMI processor with
flexible peripheral.
 ADP3629: High speed, dual, 2 A MOSFET driver.
 ADCMP670: Dual low power 1.5% comparator with 400 mV reference.
 ADP1613: 650 KHz /1.3 MHz Step-Up PWM DC-to-DC Switching
converters.
 AD8692: Low cost, Low noise, Dual CMOS Rail-toRail Output
Operational Amplifiers.
 AD8541: General-Purpose CMOS Rail-to-Rail Amplifier.
 ADP7104: 20 V, 500 mA, Low Noise, CMOS LDO.
 ADM3483: 3.3 V, Slew Rate Limited, Half Duplex, RS-485/RS-422
Transceivers.
CH3: Application based on Ultrasonic Distance Measurement
In this chapter we will talk reveal a practical implementation based on the idea
of Ultrasonic distance measurement. Our project is about automatic-braking car. It is a
very important application that decreases accidents and increases safety levels on any
automobile.
3.1 Testing and Starting
3.1.1 Used Equipment:
 ULTRASONIC RANGE FINDER LV-EZ0:
o This module provides a robust continuous distance
measurement; it uses 42 KHz frequency of
ultrasound waves.
o It is compatible with Arduino and provides an
analog or digital response.
o This module is used as the main distance
measurement tool in front of the car.
o Operates between 2.5 - 5.5V.
o Low 2mA supply current.
o 20Hz reading rate.
o RS232 Serial Output - 9600bps.
o Analog Output - 10mV/inch = 3.937 mV/cm.
o PWM Output - 147uS/inch = 57.874 uS/cm.
o Small module with light weight.
 ULTRASONIC SENSOR HC-SR04:
o Convenient module that needs only a simple code.
o This module provides digital output when a trigger
is applied.
o This module is used in the back and both sides of
the car.
o Input Voltage: +5V DC.
o Quiescent Current: less than 2mA.
o Operating Current: 15mA.
o Effectual Angle: less than 15°.
o Can Measure Distances between: 2 cm – 400 cm/1" - 13ft.
o Resolution: 0.3 cm.
o Measuring Angle: 30°.
o Trigger Input with Pulse Width: 10uS.
o Dimension: 45mm x 20mm x 15mm.
 DUAL H-BRIDGE + 4WD ROBOT SMART CAR:
o A 6V DC 4WD robotic car.
o 2 Dual H-Bridges to drive the car’s motors forward and backward with a
chosen speed that depends on PWM.
 ARDUINO MEGA 2560 R3
o We chose Arduino Mega mainly because of
the large number of bins associated with it.
It also operates at 16 MHz with a
microcontroller AVR ATmega2560.
 HC-06 BLUETOOTH TTL MODULE:
o This module connects the Arduino wirelessly
with a computer or a smart phone. It is an
efficient way for short-range radio
communication.
3.1.2 Testing the modules
By making some tests on the LV-EZ0 and HC-SR04 sensors, we used Matlab to
make a graph for the results that are shown in the table below:
Table of Distances in cm with Analog Voltage output and PWM digital output
Distance (cm) Digital (ms) Analog (V)
660 22.3 2.1
630 22.3 2.1
600 22.2 2
570 22.2 2.2
540 22.1 2.1
510 22.2 2
480 22.1 2.2
450 22.3 2.1
420 22.2 2
390 22.3 2
360 22.2 2
330 21.7 1.84
300 19.4 1.76
270 16.6 1.52
240 14.9 1.38
210 12.9 1.1
180 11.1 0.94
150 9.69 0.81
120 7.41 0.64
90 5.94 0.51
60 4.11 0.34
30 2.3 0.2
15 1.35 0.13
7.5 0.95 0.086
 LV-EZ0 Test Results:
 Beam width of LV-EZ0:
o The LV-EZ0 sensor has a huge beam width that is equal to 70° in 3D and
can detect objects almost 4 meters away from the transmitter, but it has
a significant blind spot between 0 and 7.5 cm where the result of
detecting an object there cannot be known.
Analog
Output
Digital
Output
70°
4 m
3.925 m
m 7.5 cm
 Beam width of HC-SR04:
o The HC-SR04 sensor has a sharp beam width that is equal to 30° in 3D
and can detect objects almost 4 meters away from the transmitter. But
it has a blind spot between 0 and 2 cm where the result of detecting an
object there is always zero.
3.2 Project Procedure
3.2.1 Overall Scheme
The car is controlled by the user through a computer and a Bluetooth module
that works as a serial wireless connector between the Arduino and the computer. We
have 4 motors controlled by 2 Dual H-bridges modules, a 9V 4.7 A Lithium chargeable
battery that supplies everything onboard with power, and the Arduino that controls
every action of the car, takes commands through the Bluetooth and send results to the
user behind the laptop. The car will move forward as long as the user is pressing ‘f’ on
the keyboard unless an obstacle shows up in front of the car. Pressing ‘r’ will make the
car rotate towards right, ‘l’ towards left and ‘b’ is for going back. Pressing any other
key or stop pressing any key will make the car stop.
3.2.2 How Does The Car Work?
Our car is an ordinary car but supported with an extra safety features. Using
ultrasound sensors and distance measurements, the car can detect the obstacles
surrounding its perimeter and prevent any collision from happening wither it is going
forward, backward, or even rotating around itself.
4 m
3.98 m
2 cm
1. Forward Going:
We used the LV-EZ0 sensor to
find if an obstacle is in front of the car.
The sensor measures a 400 cm distance
from its transmitter, though the car
starts making decisions when the
distance is only 1 m away from the
transmitter. Once the transmitter
detects an object closer than 1 m, an
alarm goes off trying to get the driver’s
attention. When the object is closer
than 80 cm, the car senses if there is
another object on its left using the HC-
SR04 ultrasound sensor, if there is no
object (a free 20 cm space) the car
starts taking its left trying to outrun the
front object while the front sensor is
sensing the distance. If there is an
object on its left, the car senses its right
side using another HC-SR04 ultrasound
sensor, if there is no object, it outruns
through the right side This happens when a driver unintentionally falls asleep
while driving and by this feature his life will be saved.
The 20 cm spacing is because the car has a width of 15 cm.
But in very rare situations when the car becomes so close to the front obstacle
(less than 20 cm), or when it is surrounded from all sides, the car stops and
gives some light signals to the behind drivers.
It is important to notice that the LV-EZ0 cannot detect objects closer than
almost 15 cm, and it starts giving random results. But the HC-SR04 sensors can
sense between (2 cm and 400 cm). The car decides that there is no obstacle on
its right or left when the HC sensors give a distance further than 20 cm.
2. Right Side Rotating:
When the right HC sensor gives a distance more
than 15 cm, and the driver wants to rotate to the right,
the right sided wheels start going backwards, while the
left sided wheels are going forward. This will make the
car rotates to the right side without sliding on the road.
If an obstacle appears on the right side of the car, the car
ignores the driver’s will and stops.
80 cm
3. Left Side Rotating:
When the left HC sensor gives a distance more
than 15 cm, and the driver wants to rotate to the left, the
left sided wheels start going backwards, while the right
sided wheels are going forward. This will make the car
rotates to the left side without sliding on the road. If an
obstacle appears on the left side of the car, the car ignores
the driver’s will and stops.
4. Right Side Going:
When there is an obstacle closer than 80 cm in front of the car, and
another one is on the left, but nothing on its right side, the car starts going to
the right side by making its two left side motors run faster than those on the
right side. The front sensor will be taking reads to ensure that no obstacle is
getting on the front way. If an obstacle shows up in front of the car with less
than 20 cm distance, the car will stop.
5. Left Side Going:
When there is an obstacle closer than 80 cm in front of the car, and nothing
on its left side, the car starts going to the left side by making its two right side
motors run faster than those on the left side. The front sensor will be taking
reads to ensure that no obstacle is getting on the front way. If an obstacle
shows up in front of the car with less than 20 cm distance, the car will stop.
6. Backward Going:
Going back is easy, the HC sensor on the back take reads and make sure
that there is no obstacle closer than 25 cm behind it. The four motors rotate
backward as long the driver is willing to do so and no obstacles is close enough,
otherwise, the car will stop.
References
[1] Ultrasonic-Based Distance Measurement Through Discrete Extended
Kalman Filter ,Leopoldo Angrisani, Aldo Baccigalupi and Rosario Schiano Lo
Moriello Università degli Studi di Napoli ,Italy
[2] Ultrasound History, Beth W. Orenstein, Radiology Today Vol. 9 No. 24 P.
28.
[3] P.M Novotny, N.J. Ferrier, “Using infrared sensor and the Phong
illumination model to measure distances,” International Conference on
Robotics and Automation, Detroit, MI, vol. 2, April 1999, pp. 1644-1649.
[4] V. Matz, M. Kreidl, R. Šmíd.Classification of ultrasonic signals.
[5] A.M. Flynn, Combining sonar and infrared sensors for mobile robot
navigation, International Journal of Robotics Research 6 (7) (1988) 5–14.
[6] Murata ultrasonic sensors, Murata Products 1991, 1991, p. 77.
[7] P. Kleinschmidt and V. Magori, "Ultrasonic remote sensors for noncontact
object detection," Siemens Forsch. Entwickl.ber., vol. 10, no. 2, pp. 110-
118, 1981.
[8] A. M. Sabatini, “Correlation receivers using Laguerre filter banks for
modelling narrowband ultrasonic echoes and estimating their time-of-
flights,” IEEE Trans. on Ultr., Ferr. and Freq. Contr., vol.44, No.6, pp.1253–
1263, Nov. 1997.
[9] LM 1812 Ultrasonic Transceiver, National Semiconductor Special Purpose
Linear Devices Databook, 1989, pp. 9/77-9/84.
[10] https://en.wikipedia.org/wiki/Ultrasonic_transducer
[11] http://arduino-info.wikispaces.com/Ultrasonic+Distance+Sensor
[12] https://en.wikipedia.org/wiki/Piezoelectricity
[13] https://en.wikipedia.org/wiki/Paul_Langevin
[14] https://en.wikipedia.org/wiki/Reginald_Fessenden
[15] http://www.edgefxkits.com/distance-measurement-by-ultrasonic-sensor
[16] http://www.elprocus.com/ultrasonic-detection-basics-application/
[17] https://en.wikipedia.org/wiki/Surveying
[18] http://www.kerrywong.com/2011/01/22/a-sensitive-diy-ultrasonic-range-
sensor/
[19] https://en.wikipedia.org/wiki/Distance
[20] https://en.wikipedia.org/wiki/History_of_measurement
[21] http://www.analog.com/media/en/reference-design-
documentation/reference-designs/CN0343.pdf
[22] http://arxiv.org/ftp/arxiv/papers/1303/1303.1732.pdf
[23] http://www.robometricschool.com/2013/04/electronic-circuit-diagram-
ultrasonic.html

More Related Content

Viewers also liked

Tareas del Mundo Real
Tareas del Mundo Real  Tareas del Mundo Real
Tareas del Mundo Real Erick290
 
TF-04D Outdoor WPC Wll Cladding
TF-04D Outdoor WPC Wll CladdingTF-04D Outdoor WPC Wll Cladding
TF-04D Outdoor WPC Wll Cladding威 小
 
Como crear una factura en excel 2016
Como crear una factura en excel 2016Como crear una factura en excel 2016
Como crear una factura en excel 2016Rafael Vega Gavira
 
Code Enforcement spars with BTV landlord
Code Enforcement spars with BTV landlordCode Enforcement spars with BTV landlord
Code Enforcement spars with BTV landlordZach Despart
 
Estrategias y Recursos
Estrategias y RecursosEstrategias y Recursos
Estrategias y RecursosCamila Bovone
 
Mercado romano na antiguidade
Mercado romano na antiguidadeMercado romano na antiguidade
Mercado romano na antiguidadeCarolina Santos
 
TH-10(124X23mm) outdoor wpc wall cladding
TH-10(124X23mm) outdoor wpc wall claddingTH-10(124X23mm) outdoor wpc wall cladding
TH-10(124X23mm) outdoor wpc wall cladding威 小
 
C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”
C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”
C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”Kseniya Martul
 

Viewers also liked (16)

Tareas del Mundo Real
Tareas del Mundo Real  Tareas del Mundo Real
Tareas del Mundo Real
 
Распоред полагања разредних испита у јунском року 2016
Распоред полагања разредних испита у јунском року 2016Распоред полагања разредних испита у јунском року 2016
Распоред полагања разредних испита у јунском року 2016
 
prs_presentation_ae_4x3-arash-masbough
prs_presentation_ae_4x3-arash-masboughprs_presentation_ae_4x3-arash-masbough
prs_presentation_ae_4x3-arash-masbough
 
TF-04D Outdoor WPC Wll Cladding
TF-04D Outdoor WPC Wll CladdingTF-04D Outdoor WPC Wll Cladding
TF-04D Outdoor WPC Wll Cladding
 
Potrebitel
PotrebitelPotrebitel
Potrebitel
 
Office y libre office
Office y libre officeOffice y libre office
Office y libre office
 
Schools
SchoolsSchools
Schools
 
era
eraera
era
 
Como crear una factura en excel 2016
Como crear una factura en excel 2016Como crear una factura en excel 2016
Como crear una factura en excel 2016
 
Code Enforcement spars with BTV landlord
Code Enforcement spars with BTV landlordCode Enforcement spars with BTV landlord
Code Enforcement spars with BTV landlord
 
Tecnologia saberes 11
Tecnologia saberes 11Tecnologia saberes 11
Tecnologia saberes 11
 
Estrategias y Recursos
Estrategias y RecursosEstrategias y Recursos
Estrategias y Recursos
 
Mercado romano na antiguidade
Mercado romano na antiguidadeMercado romano na antiguidade
Mercado romano na antiguidade
 
Bienvenidos
BienvenidosBienvenidos
Bienvenidos
 
TH-10(124X23mm) outdoor wpc wall cladding
TH-10(124X23mm) outdoor wpc wall claddingTH-10(124X23mm) outdoor wpc wall cladding
TH-10(124X23mm) outdoor wpc wall cladding
 
C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”
C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”
C-2_Карпаратыўны каляндар БДУ “Фізікі і лірыкі”
 

Similar to Ultrasonic Obstacle Avoidance and Auto Brake Car System

Ultrasonic applications
Ultrasonic applicationsUltrasonic applications
Ultrasonic applicationsOmar Salah
 
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robotB.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robotSushant Shankar
 
UNIT III_Smart Sensor.pptx
UNIT III_Smart Sensor.pptxUNIT III_Smart Sensor.pptx
UNIT III_Smart Sensor.pptxSattiBabu16
 
Essay About The History Of Chemistry
Essay About The History Of ChemistryEssay About The History Of Chemistry
Essay About The History Of ChemistryLaura Arrigo
 
Science8 Unit C Lightand Optics Lesson5 The Wave Modelof Light
Science8 Unit C Lightand Optics Lesson5 The Wave Modelof LightScience8 Unit C Lightand Optics Lesson5 The Wave Modelof Light
Science8 Unit C Lightand Optics Lesson5 The Wave Modelof LightShorin
 
Nature Vs Nurture
Nature Vs NurtureNature Vs Nurture
Nature Vs NurtureDana Boo
 
Landslide detector
Landslide detectorLandslide detector
Landslide detectorBhanu Pratap
 
Laser presentation 11
Laser presentation 11Laser presentation 11
Laser presentation 11Amit Sen
 
Design and Implementation of Ultrasonic Navigator for Visually Impaired
Design and Implementation of Ultrasonic Navigator for Visually ImpairedDesign and Implementation of Ultrasonic Navigator for Visually Impaired
Design and Implementation of Ultrasonic Navigator for Visually ImpairedDr.SHANTHI K.G
 
015 Leadership Essays For College Essay Example Ad
015 Leadership Essays For College Essay Example Ad015 Leadership Essays For College Essay Example Ad
015 Leadership Essays For College Essay Example AdSonya Johnson
 
Versatile ultrasound system could transform how doctors use medical imaging
Versatile ultrasound system could transform how doctors use medical imagingVersatile ultrasound system could transform how doctors use medical imaging
Versatile ultrasound system could transform how doctors use medical imagingApparao Mukkamala
 
APPLICATIONS OF EM WAVES.ppt
APPLICATIONS OF EM WAVES.pptAPPLICATIONS OF EM WAVES.ppt
APPLICATIONS OF EM WAVES.pptJane360787
 
Future Direction of Ultrasonic Inspection
Future Direction of Ultrasonic InspectionFuture Direction of Ultrasonic Inspection
Future Direction of Ultrasonic InspectionManaswiMumbarkar
 

Similar to Ultrasonic Obstacle Avoidance and Auto Brake Car System (20)

Ultrasonic applications
Ultrasonic applicationsUltrasonic applications
Ultrasonic applications
 
Ultasonic sensor
Ultasonic sensorUltasonic sensor
Ultasonic sensor
 
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robotB.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
B.Tech.Final Year ECE Project Report on Ultrasonic distance measure robot
 
Ultrasonic Concept (1).pdf
Ultrasonic Concept (1).pdfUltrasonic Concept (1).pdf
Ultrasonic Concept (1).pdf
 
UNIT III_Smart Sensor.pptx
UNIT III_Smart Sensor.pptxUNIT III_Smart Sensor.pptx
UNIT III_Smart Sensor.pptx
 
Essay About The History Of Chemistry
Essay About The History Of ChemistryEssay About The History Of Chemistry
Essay About The History Of Chemistry
 
Contents
ContentsContents
Contents
 
Ultrasonic
UltrasonicUltrasonic
Ultrasonic
 
Sound
SoundSound
Sound
 
Asha babu
Asha babuAsha babu
Asha babu
 
Science8 Unit C Lightand Optics Lesson5 The Wave Modelof Light
Science8 Unit C Lightand Optics Lesson5 The Wave Modelof LightScience8 Unit C Lightand Optics Lesson5 The Wave Modelof Light
Science8 Unit C Lightand Optics Lesson5 The Wave Modelof Light
 
Nature Vs Nurture
Nature Vs NurtureNature Vs Nurture
Nature Vs Nurture
 
Landslide detector
Landslide detectorLandslide detector
Landslide detector
 
Laser presentation 11
Laser presentation 11Laser presentation 11
Laser presentation 11
 
Design and Implementation of Ultrasonic Navigator for Visually Impaired
Design and Implementation of Ultrasonic Navigator for Visually ImpairedDesign and Implementation of Ultrasonic Navigator for Visually Impaired
Design and Implementation of Ultrasonic Navigator for Visually Impaired
 
015 Leadership Essays For College Essay Example Ad
015 Leadership Essays For College Essay Example Ad015 Leadership Essays For College Essay Example Ad
015 Leadership Essays For College Essay Example Ad
 
Versatile ultrasound system could transform how doctors use medical imaging
Versatile ultrasound system could transform how doctors use medical imagingVersatile ultrasound system could transform how doctors use medical imaging
Versatile ultrasound system could transform how doctors use medical imaging
 
APPLICATIONS OF EM WAVES.ppt
APPLICATIONS OF EM WAVES.pptAPPLICATIONS OF EM WAVES.ppt
APPLICATIONS OF EM WAVES.ppt
 
Gelombang Mikro
Gelombang MikroGelombang Mikro
Gelombang Mikro
 
Future Direction of Ultrasonic Inspection
Future Direction of Ultrasonic InspectionFuture Direction of Ultrasonic Inspection
Future Direction of Ultrasonic Inspection
 

Recently uploaded

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 

Recently uploaded (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 

Ultrasonic Obstacle Avoidance and Auto Brake Car System

  • 1.
  • 2.
  • 3. ‫الرحيم‬ ‫الرحمن‬ ‫هللا‬ ‫بسم‬ Acknowledgement READ is the first order that was given in our religion, so we hope that this project and its effort will support our nation in particular and the humanity in general. Many thanks to our parents who have been the light and fuel from the beginning until the very end. We would have never reached this point without their support and help in every step. We thank Prof.Mansour Abbadi, our respective teacher, his great assistance and supervising not just this project but also the electrical engineering courses were the saving rope when an issue was against us. He helped us with a lot of patience and kindness. Thanks to everyone helped us doing this specially Eng.Momen Nemrat, who gave us valuable information that saved us a lot of time and search. We thank every instructor in our entire studying road, who didn’t spare any effort while teaching and helping us become what we are today. We have tried to give a complete and clear description about this project. We do not claim perfection, and sure there will be some mistakes that are unintentionally made. We hope that the main idea and scheme are clarified and clear, also we hope that this work will have a vital rule in saving people’s lives everywhere in the world.
  • 4. Abstract This project is about ultrasound principles and implementations. Students as well as electrical engineers who are interested in electronics and embedded systems will find this project useful and informative. Using both LV-EZ0 and HC-SR04 ultrasound sensors to detect objects and find the distance between them and the transmitters, we can make some useful applications that would help the humanity and be a step to avoid tragedies. The idea is to increase safety by detecting objects and automatically taking actions if the driver is not aware. This needs a corporation between ultrasound distance measurement, the processor and the mechanical system of the car. This project will help enhancing safety and decreasing accidents, as well as helping in making a self-driving car in the near future. Driving in the night when the road lights are off can cause many serious accidents that might lead to death. Sometimes drivers unintentionally fell asleep while driving and so they might never wake up. Ultrasound sensors can work in almost any environment trying to save the lives of the users. By sensing the surrounded area looking for objects that are close and can cause an accident, with the help of a microcontroller the car can dodge that object or stop if no other way is available to save the driver.
  • 5. Chapter 1: Introduction 1.1 Brief Introduction to Distance Measurement and Ultrasound People usually refer to distance as a mean for describing how far apart objects are. When it comes to Mathematics, scientists use the term "metric". Which is a function that define the amount of space between two points. Distance Measurements are being used by so many life disciplines nowadays. Including land surveying, tower buildings, aerospace discoveries, agriculture and many other fields. The need for more developed and technology orientated tools has become larger and more insistent. Modern scientists has invented so many different ways to measure distances. Talking about present, it is not quite surprising that the amount of US instrument has become uncountable and still we get something new every day. The invention of digital logic circuit and microcontroller make it even easier for university students to contribute and put their ideas in the hand of the world. So basically on this project, we are talking about measuring distances using modern technology. There are many ideas in this field. However, one of them is the measuring of distance using ultrasonic waves . US sensors have a bigger response time than IR sensors but they are much reliable when it comes to relatively large distances and transparent object detecting (because they are not based on vision). When using US sensors, one could get advantages of low cost and good precision instruments. More explanations about US sensors are coming ahead. Ultrasonic waves are similar to audible waves. Their physical natures are of identical properties except that the ultrasonic waves have higher frequency range (20 KHz up to few MHz's). Which is higher than the average human can hear (approximately 20 KHz). Because of their outstanding natures. US sensors has been used as distance measurement tool and for other application. They are said to be non-intrusive as they do not require direct contact with an object. Their frequency band allow them to travel long distances in water without so much attenuation. That is why the early inventions of US was in the field of underwater navigating. 1.2 History of Ultrasonic Waves and their uses Measuring distances using US is not a brand new idea however, the first attempt to use US was held back in 1900s. There were many scientist who dedicate their effort for improving US. They developed the US before the World War I and they invented SONAR ((Sound Navigation and Ranging)). Reginald Fessenden, a Canadian scientist who build the first working Sonar in united states in 1914. Two years before that and after the tragic sinking of Titanic, Lewis Richardson registered a patent to his name about echo ranging with airborne sound. After the invention of
  • 6. Triode and Diode. A French scientist called Paul Langevin Along With his partner produced what appeared to be the first ultrasonic submarine detector. Underwater detection system gets huge benefits from the invention of Paul. It was able to detect icebergs. Actually there was a very important invention prior to Paul's invention, which is the piezoelectric devices. Simply, piezoelectric phenomenon state that when you deform the shape of some material, these materials generate electric charges that you can measure with a voltmeter. This was discovered by Curie Brothers in 1880s. One could say that Paul's invention is the first application on piezoelectricity. You may think that the benefits of US are limited to military application. But that is wrong. Through the early discovery of US. This field of science contribute enormously in the medicine field. Ultrasound Scanning is the science that use sound wave to create images of organs. In the late 1940s George Ludwig did experiments on animal tissues to detect, identify and locate foreign bodies using equipment similar to sonar . During the beginning of 1960s. Researches of ultrasonic in Obstetrics was being more popular and serious. Scientists appeared to notice the powerful tools they have behind US transducers. 1965 in Germany, a group of 3 researches invent a Real- time scanner that completely changed the whole picture and boost the ultrasound scanning field. 1.3 Soundwaves: Sound is a mechanical waveform that propagates away from a source in an elastic media generating density variations. Generating a soundwave needs a device that can perform some kind of mechanical work to a medium, just like the sound generated by the mechanical work produced by the vocal cords in the air (medium of propagation) in the human body. Similarly, to detect sound, mechanical work must be applied to the detector, in the human hearing system mechanical work is achieved through vibrations in the eardrum. Since mechanical work or energy is associated with the transmission of sound, the elastic and inertial properties of the material in which sound propagation occurs will affect the efficiency of wave propagation. That is why the sound propagation in air is slower than in water. Acoustic waves are characterized by their frequency, wavelength, and amplitude. Depending on the frequency of the waveform, sound waves can be classified as infrasonic, sonic, and ultrasonic. Sonic waves have frequencies between 20 and 20,000 Hz, which correspond to the frequency range of the human hearing. Waves with frequencies below 20 Hz are classified as infrasonic, while waves with frequencies above 20,000 Hz are classified as ultrasonic. The frequency range of sound detection of different species, including humans, is detailed in the figures below. On the other extreme of the frequency scale, acoustic waves, with frequencies between 1 and 10 MHz are commonly used in diagnostic ultrasound techniques.
  • 7. 1.4 Applications of Distance Ultrasonic Sensors:  Ultrasonic is used in a wide variety of applications, the substance does not matter because ultrasonic sensors detect almost all materials (Liquids like milk, chemicals, or lacquer as well as mud and solids). In gravel open-cast mines there are construction materials like sand, crushed rock, and gravel, these materials are excavated at depths of up to 50 m and must be appropriately stored until they can be transported from the site. Conveyor belts transport the materials to silos so ultrasonic sensors determine when the maximum fill level is reached.  In waste water treatment, it produces enormous amounts of sewage sludge on a daily basis. This waste product has to be processed or properly disposed of. Either way, it is necessary to load the sewage sludge into appropriate transport containers where the ultrasonic sensors monitor the process to prevent overfilling of the containers. Infrasound Acoustic Ultrasound 20 Hz 20 KHz 2 MHz 200 MHz
  • 8.  Drivable aerial work platforms are commonly used in many construction sites. These platforms facilitate working in high locations and increase productivity. However, a lot of accidents involving aerial work platforms occur due to collisions, the safety aspect should not be ignored, so by using the ultrasonic sensors to safeguard the operation of this equipment, the accidents are rarely happening and the workers are guarded better.  Ultrasonic sensors measure the distance to a wide range of target objects regardless of the object’s shape, color or optical characteristics. They are able to measure whether an object is approaching or leaving even when objects are moving fast.  Currently, vehicles are often equipped with active safety systems to reduce the risk of accidents, most of which occur in urban environments. An ultrasonic sensor is used to measure the distance between vehicles. The relative speed is estimated using consecutive samples of this distance. These two quantities are used by the control system to calculate the actions on both the accelerator and the brake, and to adjust the speed in order to maintain the safety distance. As ultrasonic sensors can detect any kind of obstacle, this system can also prevent collision with pedestrians, or at least reduce the injuries sustained.  In car parking lots and parking garages, entry is controlled using barrier systems. The barrier must not be lowered when there is a vehicle underneath. Ultrasonic sensors are particularly suitable for controlling this process. They detect objects regardless of vehicle type or color and monitor the entire area below the barrier.  Logistics applications in the material handling industry rely on forklifts for safely transporting heavy loads to their destination. Ultrasonic sensors monitor specific areas of the forklift to ensure accuracy and reliability. With ultrasonic sensors, you can determine whether a pallet is on the fork and how far the fork is inserted under the pallet.  Detecting and counting bottles at several points in the machine ensures continuous monitoring of material flow. The entry and exit of bottles in the filling system is optimized and missing bottles in the chain are reliably detected. Even in areas with strong steam generation, reliable detection of bottles is guaranteed with ultrasonic thru-beam sensors.
  • 9. Ch2: Ultrasound Principles 2.1 General Aspects:  Wave Propagation When sound waves travel through a material they do so at a specific velocity. This velocity is determined by the frequency and wavelength of the wave. Equation (2.1) describes the relationship between soundwave velocity, frequency, and wavelength: 𝑐 = 𝑣. 𝜆 (2.1) Where c is the wave velocity (m.s-1 ), v is the frequency (s-1 ), and λ is the wavelength (m) of the wave. As previously mentioned, the speed of sound is affected by the characteristics of the material through which the sound is being propagated. If the sound propagates in a liquid or gas, the speed of sound is a function of the bulk modulus of the material (Eq. 2.2): 𝑐 = √ 𝐾 𝜌 (2.2) Where K is the bulk modulus and ρ is the density. When sound waves propagate in the solid, the elastic modulus is used instead. The relationship between the elastic (E) and bulk modulus (K) is shown in Eq. (2.3): 𝐸 = 𝐾 + 4 3 𝐺 (2.3) Where G is the shear modulus. In general, the speed of sound is the lowest in gases with values in the range of 200 – 500 m.s-1 , followed by the speed of sound in liquids, with values in the range of 1200 – 2000 m.s-1 , where the highest values of speed of sound are found in solids, with values in the range of 3200 – 6500 m.s-1 . Table 2.1 shows the speed of sound values in different materials. The speed of sound is generally proportional to stiffness and density of the medium, where other environmental conditions such as temperature have their effect too.
  • 10. It is important to note here that when soundwaves travel through a material they generate only local displacement of particles; there is no movement of particles from one point to the other. Instead, particles oscillate around their equilibrium position as a consequence of wave propagation from the source to the detector. To better understand this concept, the figure below shows a typical acoustic wave and the relationship between acoustic pressure and particle displacement: The first line of the figure shows particles in equilibrium position. When an acoustic wave travels from left to right in the direction shown by the arrow, particles move around their equilibrium position generating zones of compression and rarefaction. As already mentioned, no net displacement of particles is observed. The oscillation of particles results in gradients in the media where zones of high and low concentration of particles are observed. Highly concentrated zones of particles are observed when the media is compressed, while a low concentration of particles is observed in the rarefaction zones. The compression and rarefaction zones correspond to maximum and minimum amplitudes in the acoustic wave, respectively, as shown in the third line of the figure.
  • 11.  Reflection of Ultrasound Waves: When an US wave collide to a surface, there will be a reaction of more depending on the surface properties, those reactions can be summarized as: Transmission: The wave passes through the surface into the medium beyond it. Absorption: The surface absorbs the wave and thus it will be lost. Reflection: The surface reflects the wave to one direction. Diffusion: The surface scatters the wave in many directions. In order to reflect a sound wave, there must be an abrupt change in density. US waves travel through low density mediums, which make the high density mediums the most efficient for reflecting the wave, although a part of the wave might be transmitted into the other side of the medium. The most important rule for reflection is to have an angle of incidence equal to the angle of reflection, where both of angles should be measured relatively to an imaginary normal line to the boundary. 𝜃𝑖 = 𝜃𝑟 Reflection is often quantified in term of the reflection coefficient R. Acoustic reflection coefficient (R) varies between -1 and +1. R is defined simply as the ratio of the reflected wave (ar) on the incident wave (ai) amplitudes. 𝑅 = 𝑎 𝑟/ 𝑎𝑖 The acoustic impedance (Z: measured in Rayl, kg/(m2s)) is a physical property of medium. It describes how much resistance an Ultrasound beam encounters as it passes through a medium. The acoustic impedance is simply the product of the density (r) and the sound speed (c) of the fluid: 𝑧 = 𝑟 × 𝑐
  • 12. The full expression for sound reflection coefficient (R) is: 𝑅 = (𝑧2/𝑧1) − √(1 − [𝑛 − 1] tan2 𝛼𝑖 (𝑧2/𝑧1) + √(1 − [𝑛 − 1] tan2 𝛼𝑖 Where 𝑛 = (𝑐2 / 𝑐1)2 and (𝛼𝑖) is the angle of incidence. Much like light waves, ultrasound waves can be focused and concentrated. A concave surface will concentrate sound waves by reflecting them to a common point while a convex surface will disburse sound waves by reflecting them in opposite directions. Studying the reflection of sound waves over different objects is very important in the science of US distance measurement. Because a good reflection means a good feedback signal and therefor almost an accurate measure. When we start examining the properties of reflected sound waves, we encounter several problems that actually restrict the use of US sensors.
  • 13. 1. Sound wave is a longitudinal signal that strike a surface. So the surface needs to be perpendicular to the direction of propagation. 2. The surface need to be much larger than the wave length 𝜆 = 𝑐/𝑓 in order to reflect as much of the wave as possible. 3. Although the sound propagates well in air and water, better reflected wave occur when the object is not too far away. There is actually a limit for the maximum distance between target and sensor which is 15-20 m. 4. Not all surfaces reflect sound perfectly. Some materials absorb the major of the signal power and do not reflect any considerable amount. Surface need to be smooth and hard. After examine all of these factors, we are now able to define what we would like to call an Ideal target. An Ideal Target is a target that has a smooth and solid surface that reflect almost all of the signal power and it’s located in a way perpendicular to the direction of propagation. 2.2 Block Diagram, Tx and Rx circuits: The burst signal goes to the ultrasonic transmitter (US Tx) and is transmitted as ultrasound through the air Figure 2. When the wave is reflected of an object, this wave is captured by the ultrasonic receiver (US Rx.) This received signal will be amplified because it attenuates as it travels. Afterwards, the signal goes back to the microcontroller unit (MCU), filters and then we calculate the distance.
  • 14. The overall block diagram of the US distance measurements device is shown in the figure below Transmitting unit: 1. Microcontroller: is used to control the switch, to measure the time required the wave to travel to the target and back to receiver, and to make the calculations of distance to show on a display 2. Switch: it’s used to send the wave is a specific time and to block it otherwise. 3. Gain Amplifier: it’s used with a level shifter if the analog switch cannot pass the signal. Receiving Unit: 1. Gain Amplifier: used to amplify the received signal, which is attenuated in the medium that travelled in. 2. Comparator: used to weed out the noise and false triggering, comparing the output of the amplifier with a reference threshold level.
  • 15. Transmitter circuit: We will consider a triple-five (555) timer IC for the transmitting circuit of the ultrasonic, as for the operation of the oscillation circuit which used 555 oscillator. The sending out time of the ultrasonic pulse is controlled by the oscillation circuit (IC1), this time can be calculated by the well-known formula 𝑇𝐿 = 𝐿𝑛(2) × 𝑅 𝐴 × 𝐶 And 𝑇 𝐻 = 𝐿𝑛(2) × (𝑅 𝐴 + 𝑅 𝐵) × 𝐶 Usually RA much larger than RB. IC2 is the circuit to control the US oscillate frequency (f), oscillation’s operation is the same of IC1, but RB is bigger than RA to ensure the duty cycle of the oscillation wave to be close to 50%. The frequency of the ultrasonic (f) must be adjusted to the sensor resonant frequency where 𝑓 = 1/(𝑇𝐿 + 𝑇 𝐻) And again 𝑇𝐿 = 𝐿𝑛(2) × 𝑅 𝐴 × 𝐶 𝑇 𝐻 = 𝐿𝑛(2) × (𝑅 𝐴 + 𝑅 𝐵) × 𝐶 The output of IC1 is connected with the reset terminal of IC2 through the inverter. When the reset terminal is the H level, IC2 works in the oscillation. The ultrasonic of frequency (f) is sent out for the TL of IC1 and pauses for the TH of IC1. Receiver circuit: 1. Signal Amplification: The ultrasonic signal which was received with the reception sensor is amplified by 1000 times (60dB) of voltage with the operational amplifier with two stages. It is 100 times at the first stage (40dB) and 10 times (20dB) at the next stage. As for the dB. Generally, the positive and the negative power supply are used for the
  • 16. operational amplifier. The circuit this time works with the single power supply of +9 V. Therefore, for the positive input of the operational amplifiers, the half of the power supply voltage is applied as the bias voltage and it is made 4.5 V in the central voltage of the amplified alternating current signal. When using the operational amplifier with the negative feedback, the voltage of the positive input terminal and the voltage of the negative input terminal become equal approximately. So, by this bias voltage, the side of the positive and the side of the negative of the alternating current signal can be equally amplified. When not using this bias voltage, the distortion causes the alternating current signal. When the alternating current signal is amplified, this way is used when working the operational amplifier for the 2 power supply with the single power supply. 2. Detection circuit: The detection is done to detect the received ultrasonic signal. It is the half-wave rectification circuit which used the Shottky barrier diodes. The DC voltage according to the level of the detection signal is gotten by the capacitor behind the diode. The Shottky barrier diodes are used because the high frequency characteristic is good.
  • 17. 3. Signal detector: This circuit is the circuit which detects the ultrasonic wave which returned from the measurement object. The operational amplifier amplifies and outputs the difference between the positive input and the negative input. In case of the operational amplifier which doesn't have the negative feedback, at a little input voltage, the output becomes the saturation state. Generally, the operational amplifier has tens of thousands of times of mu factors. So, when the positive input becomes higher a little than the negative input, the difference is tens of thousands of times amplified and the output becomes the same as the power supply almost. (It is the saturation state) Oppositely, when the positive input becomes lower a little than the negative input, the difference is tens of thousands of times amplified and the output becomes 0 V almost.(It is in the OFF condition) This operation is the same as the operation of the comparator.
  • 18. 2.3 Principle of Operation 2.3.1 US measurement by logic gates and electronics circuit The transmitter is fed with 25 kHz sinusoidal that is amplitude modified by a 50Hz square wave with uneven duty cycle. The reason of that is because 25k is the operating frequency of the transmitter. Note that the overall signal will roughly look something like this. The transmitted and received signal  Transmitter circuit Take a look at the transmitter circuit below. When the “PUSH BUTTON” is pushed. It sets the first SR latch and the second one is sat at the rising edge of our square wave. Sitting the second latch will activate the AMP. MODULATOR that will send a burst of our signal to outside. The second SR latch is connected to AMP. MODULATOR and to a clock that start counting whenever the SR latch is sat. Note that the rising edge detector activate the Tx and the counter at the same time. Counter circuit explanation is coming ahead.
  • 19.  Receiver Circuit First of all, we need to amplify the signal because the received signal is usually in tenths of millivolts. The bandpass filter usually implemented it the receiver module. The “ENV. DET.” used to get our square pulse. The “COMP” compare the value with a reference voltage. Note that the reference voltage selection is critical. If it is chosen to be too low. The overall system will be too sensitive to noise. If it is chosen to be very high. Most of the received signals will not pass. Thus we have to make a trial and error procedure to estimate the correct value. After that, the COMP will reset the latch and therefore will stop the counter.  Counter Circuit The counter counts from the first rising edge of our square wave until the receiver detect the signal. Note that the second input to the AND gate is connected to the second SR latch above. We can use a 7-Seg display or we can attach an LCD to read the number. We need a microcontroller or such devise to do the simple calculations to get the results. Test distance = (high level time × velocity of sound (340M/S)) / 2
  • 20. 2.3.2 US measurement by a microcontroller Here the principle is the same but instead of using external logic gates and counters, we use a microcontroller instead. The following block diagram illustrate the idea. We may program the following chart on the microcontroller.
  • 21. 2.4 Some Ultrasonic Distance Measurement Circuits There exist some types of Ultrasonic distance Measurement modules which can be applied in our project, below we examine these modules and try to choose an optimum module corresponding to our project. 2.4.1 The MC9RS08KA2 This sensor is produced by the Freescale Semiconductor Company. The MCU (micro controller unit) MC9RS08KA2 is integrated along with Ultrasonic Transducers (255-400ET18-RO) as the picture shows: The Characteristics of this device: 1) Simple design and implementation. 2) Relatively small board. 3) Can work with ranges up to 3m. 4) Most component are of low price. 5) Low power consumption. 6) The design uses a 3.3 V power supply. 7) Center frequency: 40.0 kHz ± 1 kHz and take 20V as an input. A schematic about this device is shown below:
  • 22. 2.4.2 The MSP430 from TEXAS INSTRUMENTS Texas Instruments Inc. (TI) is an American electronics company that designs and makes semiconductors. Below is a circuit diagram for this module and properties: 1) This module uses ultra-low-power microcontroller. 2) The distance is displayed in inches with an accuracy of ±1 inch. 3) The minimum distance that this system can measure is eight inches and the maximum distance is ninety-nine inches. 4) Uses 40 KHz center frequency. 5) Easy and rich library for software programming. 6) A lot of external components needed with the microcontroller.
  • 23. 2.4.3 The 8051 Microcontroller Form Intel The Intel MCS-51 is a Harvard architecture, complex instruction set computing (CISC) instruction set, single chip microcontroller (µC) series developed by Intel in 1980 to be used in embedded systems. Intel's original versions were popular in the 1980s and early 1990s and enhanced binary compatible derivatives remain popular today. Below is a circuit diagram for this module and properties: 1) The microcontroller can work with a large number of ultrasound sensors. 2) Complex software programing microcontroller which depends on assembly language. 3) The sensor has a resolution of 0.3 cm, and a range from 2 cm until 500 cm. 4) Cheap and simple 7-segment displays can be used instead of LCD.
  • 24. 2.4.4 The CN – 0343 Circuit The circuit evaluation is from Circuit Evaluation Board (EVAL-CN0343-EB1Z). Below is the circuit diagram and properties: 1) The circuit completely self-contained distance sensor that utilizes an ultrasonic transmitter and sensitive analog receiver in conjunction with a precision analog microcontroller to provide distance measurements. 2) Unlike complicated PLL-based receivers, the sensor uses a sensitive window comparator circuit, thereby minimizing real estate and cost. 3) The approximate range is from 50 cm to 10 m with a resolution of about 2 cm. 4) Temperature compensation is provided by the integrated temperature sensor and analog-to-digital converter (ADC) contained in the microcontroller. 5) Devices Connected/Referenced:  ADuC7126: 32 kB RAM, 126 Kbite Flash ARM7TDMI processor with flexible peripheral.  ADP3629: High speed, dual, 2 A MOSFET driver.  ADCMP670: Dual low power 1.5% comparator with 400 mV reference.  ADP1613: 650 KHz /1.3 MHz Step-Up PWM DC-to-DC Switching converters.  AD8692: Low cost, Low noise, Dual CMOS Rail-toRail Output Operational Amplifiers.  AD8541: General-Purpose CMOS Rail-to-Rail Amplifier.  ADP7104: 20 V, 500 mA, Low Noise, CMOS LDO.  ADM3483: 3.3 V, Slew Rate Limited, Half Duplex, RS-485/RS-422 Transceivers.
  • 25. CH3: Application based on Ultrasonic Distance Measurement In this chapter we will talk reveal a practical implementation based on the idea of Ultrasonic distance measurement. Our project is about automatic-braking car. It is a very important application that decreases accidents and increases safety levels on any automobile. 3.1 Testing and Starting 3.1.1 Used Equipment:  ULTRASONIC RANGE FINDER LV-EZ0: o This module provides a robust continuous distance measurement; it uses 42 KHz frequency of ultrasound waves. o It is compatible with Arduino and provides an analog or digital response. o This module is used as the main distance measurement tool in front of the car. o Operates between 2.5 - 5.5V. o Low 2mA supply current. o 20Hz reading rate. o RS232 Serial Output - 9600bps. o Analog Output - 10mV/inch = 3.937 mV/cm. o PWM Output - 147uS/inch = 57.874 uS/cm. o Small module with light weight.  ULTRASONIC SENSOR HC-SR04: o Convenient module that needs only a simple code. o This module provides digital output when a trigger is applied. o This module is used in the back and both sides of the car. o Input Voltage: +5V DC. o Quiescent Current: less than 2mA. o Operating Current: 15mA. o Effectual Angle: less than 15°. o Can Measure Distances between: 2 cm – 400 cm/1" - 13ft. o Resolution: 0.3 cm. o Measuring Angle: 30°. o Trigger Input with Pulse Width: 10uS. o Dimension: 45mm x 20mm x 15mm.
  • 26.  DUAL H-BRIDGE + 4WD ROBOT SMART CAR: o A 6V DC 4WD robotic car. o 2 Dual H-Bridges to drive the car’s motors forward and backward with a chosen speed that depends on PWM.  ARDUINO MEGA 2560 R3 o We chose Arduino Mega mainly because of the large number of bins associated with it. It also operates at 16 MHz with a microcontroller AVR ATmega2560.  HC-06 BLUETOOTH TTL MODULE: o This module connects the Arduino wirelessly with a computer or a smart phone. It is an efficient way for short-range radio communication.
  • 27. 3.1.2 Testing the modules By making some tests on the LV-EZ0 and HC-SR04 sensors, we used Matlab to make a graph for the results that are shown in the table below: Table of Distances in cm with Analog Voltage output and PWM digital output Distance (cm) Digital (ms) Analog (V) 660 22.3 2.1 630 22.3 2.1 600 22.2 2 570 22.2 2.2 540 22.1 2.1 510 22.2 2 480 22.1 2.2 450 22.3 2.1 420 22.2 2 390 22.3 2 360 22.2 2 330 21.7 1.84 300 19.4 1.76 270 16.6 1.52 240 14.9 1.38 210 12.9 1.1 180 11.1 0.94 150 9.69 0.81 120 7.41 0.64 90 5.94 0.51 60 4.11 0.34 30 2.3 0.2 15 1.35 0.13 7.5 0.95 0.086  LV-EZ0 Test Results:
  • 28.  Beam width of LV-EZ0: o The LV-EZ0 sensor has a huge beam width that is equal to 70° in 3D and can detect objects almost 4 meters away from the transmitter, but it has a significant blind spot between 0 and 7.5 cm where the result of detecting an object there cannot be known. Analog Output Digital Output 70° 4 m 3.925 m m 7.5 cm
  • 29.  Beam width of HC-SR04: o The HC-SR04 sensor has a sharp beam width that is equal to 30° in 3D and can detect objects almost 4 meters away from the transmitter. But it has a blind spot between 0 and 2 cm where the result of detecting an object there is always zero. 3.2 Project Procedure 3.2.1 Overall Scheme The car is controlled by the user through a computer and a Bluetooth module that works as a serial wireless connector between the Arduino and the computer. We have 4 motors controlled by 2 Dual H-bridges modules, a 9V 4.7 A Lithium chargeable battery that supplies everything onboard with power, and the Arduino that controls every action of the car, takes commands through the Bluetooth and send results to the user behind the laptop. The car will move forward as long as the user is pressing ‘f’ on the keyboard unless an obstacle shows up in front of the car. Pressing ‘r’ will make the car rotate towards right, ‘l’ towards left and ‘b’ is for going back. Pressing any other key or stop pressing any key will make the car stop. 3.2.2 How Does The Car Work? Our car is an ordinary car but supported with an extra safety features. Using ultrasound sensors and distance measurements, the car can detect the obstacles surrounding its perimeter and prevent any collision from happening wither it is going forward, backward, or even rotating around itself. 4 m 3.98 m 2 cm
  • 30. 1. Forward Going: We used the LV-EZ0 sensor to find if an obstacle is in front of the car. The sensor measures a 400 cm distance from its transmitter, though the car starts making decisions when the distance is only 1 m away from the transmitter. Once the transmitter detects an object closer than 1 m, an alarm goes off trying to get the driver’s attention. When the object is closer than 80 cm, the car senses if there is another object on its left using the HC- SR04 ultrasound sensor, if there is no object (a free 20 cm space) the car starts taking its left trying to outrun the front object while the front sensor is sensing the distance. If there is an object on its left, the car senses its right side using another HC-SR04 ultrasound sensor, if there is no object, it outruns through the right side This happens when a driver unintentionally falls asleep while driving and by this feature his life will be saved. The 20 cm spacing is because the car has a width of 15 cm. But in very rare situations when the car becomes so close to the front obstacle (less than 20 cm), or when it is surrounded from all sides, the car stops and gives some light signals to the behind drivers. It is important to notice that the LV-EZ0 cannot detect objects closer than almost 15 cm, and it starts giving random results. But the HC-SR04 sensors can sense between (2 cm and 400 cm). The car decides that there is no obstacle on its right or left when the HC sensors give a distance further than 20 cm. 2. Right Side Rotating: When the right HC sensor gives a distance more than 15 cm, and the driver wants to rotate to the right, the right sided wheels start going backwards, while the left sided wheels are going forward. This will make the car rotates to the right side without sliding on the road. If an obstacle appears on the right side of the car, the car ignores the driver’s will and stops. 80 cm
  • 31. 3. Left Side Rotating: When the left HC sensor gives a distance more than 15 cm, and the driver wants to rotate to the left, the left sided wheels start going backwards, while the right sided wheels are going forward. This will make the car rotates to the left side without sliding on the road. If an obstacle appears on the left side of the car, the car ignores the driver’s will and stops. 4. Right Side Going: When there is an obstacle closer than 80 cm in front of the car, and another one is on the left, but nothing on its right side, the car starts going to the right side by making its two left side motors run faster than those on the right side. The front sensor will be taking reads to ensure that no obstacle is getting on the front way. If an obstacle shows up in front of the car with less than 20 cm distance, the car will stop. 5. Left Side Going: When there is an obstacle closer than 80 cm in front of the car, and nothing on its left side, the car starts going to the left side by making its two right side motors run faster than those on the left side. The front sensor will be taking reads to ensure that no obstacle is getting on the front way. If an obstacle shows up in front of the car with less than 20 cm distance, the car will stop. 6. Backward Going: Going back is easy, the HC sensor on the back take reads and make sure that there is no obstacle closer than 25 cm behind it. The four motors rotate backward as long the driver is willing to do so and no obstacles is close enough, otherwise, the car will stop.
  • 32. References [1] Ultrasonic-Based Distance Measurement Through Discrete Extended Kalman Filter ,Leopoldo Angrisani, Aldo Baccigalupi and Rosario Schiano Lo Moriello Università degli Studi di Napoli ,Italy [2] Ultrasound History, Beth W. Orenstein, Radiology Today Vol. 9 No. 24 P. 28. [3] P.M Novotny, N.J. Ferrier, “Using infrared sensor and the Phong illumination model to measure distances,” International Conference on Robotics and Automation, Detroit, MI, vol. 2, April 1999, pp. 1644-1649. [4] V. Matz, M. Kreidl, R. Šmíd.Classification of ultrasonic signals. [5] A.M. Flynn, Combining sonar and infrared sensors for mobile robot navigation, International Journal of Robotics Research 6 (7) (1988) 5–14. [6] Murata ultrasonic sensors, Murata Products 1991, 1991, p. 77. [7] P. Kleinschmidt and V. Magori, "Ultrasonic remote sensors for noncontact object detection," Siemens Forsch. Entwickl.ber., vol. 10, no. 2, pp. 110- 118, 1981. [8] A. M. Sabatini, “Correlation receivers using Laguerre filter banks for modelling narrowband ultrasonic echoes and estimating their time-of- flights,” IEEE Trans. on Ultr., Ferr. and Freq. Contr., vol.44, No.6, pp.1253– 1263, Nov. 1997. [9] LM 1812 Ultrasonic Transceiver, National Semiconductor Special Purpose Linear Devices Databook, 1989, pp. 9/77-9/84. [10] https://en.wikipedia.org/wiki/Ultrasonic_transducer [11] http://arduino-info.wikispaces.com/Ultrasonic+Distance+Sensor [12] https://en.wikipedia.org/wiki/Piezoelectricity [13] https://en.wikipedia.org/wiki/Paul_Langevin [14] https://en.wikipedia.org/wiki/Reginald_Fessenden [15] http://www.edgefxkits.com/distance-measurement-by-ultrasonic-sensor [16] http://www.elprocus.com/ultrasonic-detection-basics-application/ [17] https://en.wikipedia.org/wiki/Surveying [18] http://www.kerrywong.com/2011/01/22/a-sensitive-diy-ultrasonic-range- sensor/ [19] https://en.wikipedia.org/wiki/Distance [20] https://en.wikipedia.org/wiki/History_of_measurement [21] http://www.analog.com/media/en/reference-design- documentation/reference-designs/CN0343.pdf [22] http://arxiv.org/ftp/arxiv/papers/1303/1303.1732.pdf [23] http://www.robometricschool.com/2013/04/electronic-circuit-diagram- ultrasonic.html