CONCEPT OF PROJECT WORK
project
work is nothing but doing some technical work under proper guidence. this is
done usuallyby the students and every work to achieve its final objhectives
or goals. This naturally relates to project work also.Before starting any
project planning must be done weather
which projet should be selated.How it should performed etc SO planning must be done either when
beginning an enterpriseor to maintain any industry.So planning must be done
very carefully as the effiency of our project depends on planning, improper
planning will run the project
India is the second laregest
countary regarding its population. The Govt is unable to provide empolyment
forall the educated people,so it is putting more stress on techanical people to
start their own industries under what will call "SELFEMPLOYMENT SCHEME
" This helps in eradecating unempolyment and inproviding livelihood to
educated unempolyment students.Govt is encouraging the enterperneurs by gaining
laons to start enterprise. For this bank stared to provide new empolyment
oppertunties by giving laons for small scale sectors called industrial
develpoment bank of india It hs been enagaged in the folk of promotion from its
financing of the small scale secoters from its inception .It sanctions to small
scale secoters from its finencing of the small scale sectors have incersed stedialy overthe year in 1970 to
1975.
If
it is rs 1.30 crores at about 16% of total assistance distributed.in 1975 to
1980 its incresed to rs.990 croes to 26% and in 1980-1985. There after it
further incerased to rs. 3700 croeses at any individual icannot start his industry
without a proper knowledge about the project work as became a necessary
"must" to techanical students. For this section reason project work
has been inculed in the syallabus. the BTECH courese by the jntu hyderabad
universites. this server as a gudencnce if not only individual starts an
industry . This project work helpful for an individalfor his livelihood but also indirectly helpful to the
country.
PROJECT ABSTRACT
We propose to design a device which could be used by
automobiles in the highway for the purpose of collision prevention. The main
objective of this project is to avoid
collisions between vehicles which results in losses in massive proportions to
life and economy. We will be specifically dealing with accidents
caused when a
multitude of vehicles
travelling in a
linear manner collide.
collisions do not terminate with damage to one or two vehicles, rather,
an ar ray of cars go smashing into one another.
So, we intend to design ultrasonic sensors
(transceivers) both at the front and rear of a
vehicle in order to detect
the range of another vehicle which is in its immediate vicinity. The data from the transceivers along with the velocity
of the vehicle and an emergency input from the driver of each vehicle could be
used to determine the status of the vehicle. This status, if found alarming
will be transmitted backwards to the vehicle immediately behind it. The vehicle
which receives this “alert” code, will take steps to slow down and also pass on
the same code to the vehicle behind it, and so on the
code gets transmitted
to all vehicles
behind the troubled
car which are
in range ultrasonic transceivers
INTRODUCTION
STUDIES AND STATISTICS ON CAUSES OF
ACCIDENTS AND ACCIDENT PREVENTION
GENERAL PRINCIPLES
IN COLLISION AVOIDANCESYSTEMS
STOPPING DISTANCE AND ASSOCIATED FACTORS
VEHICLE BRAKING CAPABILITY
CALCULATING STOPPING DISTANCE
BLOCK DIAGRAM EXPLANATION
PSOC MIXED SIGNAL
CONTROLLER: CY8C27443
HALL EFFECT SENSOR ALLEGRO A1142
ULTRASONIC TRANSDUCER SQ40 T/R
PSOC RANGE MEASUREMENT
INTRODUCTION
First of all it is
very important that we understand
the need for a collision
prevention system in automobiles.
These are some of the statistics that compelled us to take up a small step
towards the prevention of road accidents, particularly Forward Collision
It is well known that driver errors are the main cause,
orcontribute to increased severity, of most accidents. Forinstance, the Indiana
Tri-level (Treat et al. 1979) founddriver errors to be a cause or
severity-increasing factorin 93% of the accidents.
Furthermore,27% of allaccidents (USA 1997) were rear-end
collisions. Thisshows the potential of forward collision avoidance
(FCA)systems. The crucial part of the algorithm is the decisionmaking, and the
conflicting considerations are:
There are 1.2 M fatalities yearly worldwide due to road
accidents - 3242 people a day!
According to the
World Health Organization,
road accident fatalities
worldwide are expected to rise by
67% by the year 2020.
Over 20 million people are injured each year in road
accidents
Financial damages of road accidents are ~2% of world
GDP.
In the US, in 2010 there were 6 million accidents,
costing $230 million; averaging $38,000 per accident – these statistics have
been steady in recent years
STUDIES AND STATISTICS ON CAUSES OF
ACCIDENTS AND ACCIDENT PREVENTION:
93% of all accidents are due to human factor (Driver
inattention cited as the primary cause for accidents).
Nearly 80% of all crashes involve driver inattention
within three seconds before the event.
Examples of types of inattention that increase crash
risk:
Talking on a cell phone (increases risk by 30%)
Drowsiness
(increases risk by 400%
and responsible for ~23%
of all crashes and near-crashes)
Reaching for moving objects, like a falling cup
(increases risk by 900%)
One in every
five vehicle accidents
is caused by
drowsiness at the
wheel, momentary drowsiness or
inattentiveness
Run off road
accidents account for nearly
20% of road accidents and are responsible for
60% of all road accident fatalities.
“In a study done at Volkswagen, an analysis of the
pre-crash braking behavior shows that in severe accidents about 85% of drivers either
did not brake at all or not to the full possible deceleration.”
Rear-end collision accidents account for
about 28% of road accidents.
GENERAL
PRINCIPLES IN COLLISION AVOIDANCESYSTEMS:
A collision avoidance system operates, generally,in the following
manner: a sensor installed at thefront-end of a vehicle constantly scans the
roadahead for vehicles or obstacles. When found, thesystem determines whether
the vehicle is inimminent danger of crashing, and if so,automatic brakes should
be applied .Usually one of these two criteria is used toactivate collision
avoidance:
Worst-case criterion: The system assumes thatthe
vehicle preceding the CAS-equipped vehiclecould brake at full braking power at
any time. Inessence, it operates on a critical headwaydistance," that is,
theminimum distancenecessary for the CASequipped vehicle to come to a stop in
the event the leading car suddenlybrakes.
Time-to-collision criterion: The systemdetermines whether a
collision is likely tohappen at prevailing speeds and distances withina certain
time interval. In a , time-to-collision
is defined as the timeduration for the two vehicles to collide if theymaintain
theirpresent speed and direction.Collision avoidance maneuvers include one
ormore of the following actions:
Headway distance control: The system warns thedriver whenever
his/her car isfollowing theleading car too closely. Some systems
includeautomatic speed control, i.e., the CAS-equippedcar would automatically
reduce its speed in orderto maintain a safe headway with the leadingvehicle
Hazard warning: The system warns the driver ofan
object (moving or stationary) within itsprojected path so that the driver has
sufficienttime to avoid a crash.
Automatic vehicle control: The system controlsthe vehicle's
brakes and steering wheel, andapplies them automatically when it deems
itnecessary. In actuality, there are currently nosystems that use automatic
steering to preventcollisions, although the technology has beendeveloped and
tested experimentally.
STOPPING DISTANCE
AND ASSOCIATED FACTORS
Many drivers drive in a false belief that if the car in
front suddenly started braking, they would react and brake and end up stopped the same
distance apart.
The total stopping distance of a vehicle is made up of 4
components
Human Perception Time: The human perception time; is how long the
driver takes to see the hazard, and the brain realize it is a hazard requiring
an immediate reaction. This
perception time can be as long as ¼ to ½
a second.
Human Reaction Time: Once the brain realizes danger, the human reaction time
is how long the body takes to move the
foot from accelerator to brake pedal. Again this reaction time can
vary from ¼ - ¾ of a second.
These first 2
components of stopping
distance are human
factors and as
such can be affected by tiredness, alcohol, fatigue and concentration levels. A perception and
reaction time of 2 or 3 seconds is possible. 2 seconds at 75 km/hr means the
car travels 40 metres before the brakes are applied.
Vehicle Reaction Time: Once the brake
pedal is applied there is the vehicles
reaction time which depends on
the brake pedal
free-play, hydraulic properties
of the brake
fluid and working order of the braking system.
Vehicle Braking Capability: The last factor than determines the total
stopping distance is the cars braking capability which depends on factors such
as;
The type of braking system
The Automobile brakes are classified according to the different bases, as follows
1. With respect to application :
(a) Foot
brake
(b) Hand
brake.
2 .With respect to the numer of
wheels:
(a) Two wheel brake
(b) Four wheel brake.
3.With respect to the method
of braking contact:
(a) Internal expanding
brakes.
(b)external contracting brakes
4. With respect to the method
of applying the braking force:
(a) single
acting brakes
(b) double
acting brakes.
5 . With respect to the
brake gear:
(a) Mechanical
brakes.
(b) Power
brakes.
6. With respect to the nature of power employed:
(a) Vacum brakes
(b) Air
brakes
(c) Hydraulic
brakes
(d) Hydrostatic
brakes
(e) Electric brakes.
7. With respect to power transmission:
(a) Direct acting
brakes
(b) Geared brakes.
8. With respect to power unit :
(a) Cylinder
brakes
(b) diaphragm brake,
|
suspension system
The automobile frame and body are mounted on the front and rear axle
not directy but some form of spring and shock absorbers.this done danp to raod
Shocks transmitted parts to the frame by the wheels as they roll over the raod. All these parts perform this function are
collectively called a suspenSion system .Thus
the suspension sytem includes
springs , shockabsorbers and their
mounting s.The suspension system of
moter vechile is divided into
The rear-end suspension and
front end suspensio
Functions of suspension sytem
1.
To
prevent the raod shocks from being transmitted
to the vechile frame
2.
To preserve the stability of the vechile in
pitching or rolling , while in motion
3.
To safegured
the occupants from raod shocks
4.
To provide
good raod holding while driving ,corning
and braking
5.
To
maintain proper steering gemontery
Tyre
pressures
The tyre is
designed to be operated at certain pressure to the weiht and
characteristics of the vehicle . Every manufarcturer recommends to maintain
The correct tyre pressure. In correct tyre
pressure overheating , rapid tyre wear and unsafe steering If the tyre pressure
is correct , tyre will have full tread contact with raod surface
Trye tread and grip
1.Front
tyre shows an excessive wear only on one side of the theard. Check camber. If it
is correct, wear must be ascribed to the habbit of
Negotianing curves at high speeds
2.
Tyres shows a wear particularly remarkable on the both sides of
Tread rater
than on the centre portion .
Tyres are inflated at a pressure
Lower than specified . Under such conditions ,the tread side surfaces are
Supporting most of the laod, while centre
portion is deflected upwards
3.Tyres
shows wear on the tread centre
poration . tyres are inflated at
Pressure higer than specified. Under such
conditions , tread cenral portion is
suppoting most of the laod
brake pad material
An automotive brake functions by
converting thepedal, brake fluid is effectively pushed against the pistons
vehicle’s kinetic energy into heat energy. During brakingof the brake caliper,
which in turn forces the brake pads the heat energy is first borne by the two
contact surfacesof the brake, namely the brake disc and the brake pad
brake alignment
vehicle weight
The co-efficient of friction of the road
surface
wind speed
Wind is
simply air in motion. It is produced by the uneven heating of the earth’s surface
by energy from the sun.
slope of road
surface smoothness
The braking technique applied by the driver
Brake testing
When the vechicle
moving , it can be stopped by applying by applying the brakes. It is to be noted here that brake
peals cannot be passed instantaneously and the vehicle cannot be stopped instantaneously.
First driver thinks, then lift the leg , presses the brake pedal and then the
vehicle stop after moving some distance . So it is necessary to note how much
time is required to stop the vehicle and how long it will travel after applying
the brake . these two factors are directly dependent on the speed of vehile.
1. stop test. For testing the brakes, this test is
usually adopted by mechanic or driver after overhauling the brakes. He moves
the vehicle at a speed and suddenly applies the brakes. Then he checks how much time it has taken to
stop and how long it has moved after applying the brakes . Also he sees the impression of
the four tyres on the raod, whether equl or not, and wheater the vehicle is
pulling a side or not
2.stop
watch test; to perform this test,the
vehicle is moved at about 70km/hr.
Then the brakes are applied . The time
distance are noted
Let T=time taken to stop the vehicle after
applying the brakes
D=distance moved by the vehicle after
applying the brakes.
Then,brake efficiency is given by
n=(D-T2)*6.25
3.Brake testers are also used for testing
the brakes. they work on the principle
Of decelerometer. Taply
brake meter is a type of brake tester. This brake meter is placed on the vehicle floor
for testing the brakes. It consists of a round ring with numbers . There is
pendulum inside the dial which remain dipped in oil. As soon as the vechile
speed decreases which causes the pendulum ring to move. The number on, the ring gives reading which can be
Obtained by an inspection plate
CALCULATING STOPPING DISTANCE
Assuming
proper operation of
the brakes on
the vehicle, the
minimum stopping distance
for a vehicle is determined by
the effective coefficient of friction between the tires and the road, and the
driver's reaction time in a braking situation. The friction force of the road
must do enough work onthe car to reduce its kinetic energy to zero. If the
wheels of the car continue to turn while braking, then static friction is
operating, while if the wheels are locked and sliding over the road surface,
the braking force is a kinetic friction force only.
To reduce the kinetic energy to zero:
Work = - umgd = - (mv02)/2
Friction
so the stopping distance is:
d=(V02)/2ug
For calculating
minimum stopping distance, we have provided two modes:
Dry
Weather: The value of u is taken .8
|
|
Wet
Weather: The value of u is taken .5
What is Sensing
?
Collect information about the world
Sensor - an
electrical/mechanical/chemical device that maps an environmental attribute to
a quantitative measurement
Each sensor is based on a transduction principle
- conversion of energy from one form to another
`
BLOCK DIAGRAM EXPLANATION
As we can see, the major components required are:
PSoC Mixed-Signal Controller - CY8C27443
Ultrasonic Transducer – SQ40 T & SQ40 R
Hall Effect Sensor – 1142
BLOCK DIAGRAM
EXPLANATION
1.
ULTRASONIC TRANSDUCERS (SQ40 T/R)
The ultrasonic transducers are used with a dual purpose.
The major and mostly common purpose is that of detecting the range of an
obstacle in front of the vehicle. This distance when coupled with the velocity
at which it is travelling gives us an idea about the safety of the vehicle.
The ranging works by transmitting a short pulse of sound
at a frequency of 40Khz (ultrasonic sound or ultrasound) through the
transmitter SQ40T. Afterwards the microcontroller listens for an
echo through the r eceiver SQ40R. The
time from transmission to echo reception helps to calculate thedistance from the object. The time from transmission
of the pulse to reception of the
echo is the time taken for the
sound energy to travel through the air to the object and back again.
Since the speed
of sound is
constant through air
measuring the echo
reflection time lets
calculate the distance to the object using the DST equation:
Distance
= (s * t)/2 (in metres)
2.
HALL
EFFECT SENSOR FOR VELOCITY
The Hall Effect sensor can sense changes in magnetic
field and changes its output accordingly. If a magnet is mounted on any
rotating part of a moving vehicle (which is proportional to the velocity),
the change in output
from the sensor
will indicate the
rpm of the rotating part. This
rpm multiplied by a suitable
circumference value will produce distance travelled in a minute. Thus we can
have the velocity of the vehicle.
3.USER DISCOMFORT SWITCH
If the user feels any discomfort during the journey,
like a possible chest pain, this switch enables him to
communicate the data
to the vehicles
behind him. This
will alert the
other drivers likelihood of breaking. This can help save
critical reaction time on part of
the drivers behind the vehicle
under scrutiny
4.CLIMATE SELECT SWITCH
The stopping distance of a moving vehicle is given by
the formula:
d=(V02)/2ug
Here,
d is the distance required to bring the vehicle to a halt in metres,
V0is
the velocity at which it was travelling at the instant just before breaking
u is the
co-efficient of static friction
and g is the
acceleration due to gravity (9.8m/s2)
The co-efficient of static friction has a nominal value
of 0.8 provided that the road sur face
is dry and the tires
are in good
condition. The same
value can degrade
to 0.5 when
the road surface becomes wet or the tires ar e old or
in bad condition. So based on the conditions, we have allowed the user to
select the appropriate mode in which the stopping distance is to be calculated.
5.LCD DISPLAYING
ESSENTIAL DATA
The LCD display will provide the user with details such
as:
1.Real-time distance from a vehicle/obstacle in front of
it.
2. The current velocity of the vehicle.
3. The climate selection at present,
and
4.The status of the drive, whether it is under alert or
not.
6.AUDIO AND VISUAL ALERTS
Audio visual alerts are useful for alerting the driver
in case he is not looking at the LCD
for thestatus of his
drive. The audio
alerts includes a
buzzer that switches
on at the
time of an
alert. situation, and a bicolour LED which produces yellow colour
during normal drive, and red colour at times of alert.
7.PWM SPEED CONTROL
The PWM speed
control is the
method used for
controlling the speed
of the vehicle,
(for demonstration purposes we use DC motor driven miniature cars). We
will be assigning 5 levels of speed to these cars and according to the
situation; they will be allowed to either increase the speedor decrease by
means of varying the duty cycle of the PWM.
8.PSoC MIXED
SIGNAL CONTROLLER: CY8C27443
The PSoC Mixed Signal controller is more than just a
microcontroller. It is a 28 pin IC with three I/O ports. These ports can be
used f or analog or digitals functions. The advantage of PSoC is that it
integrates ASIC, FPGA and the usual code controlled functions of a
microcontroller into a single unit
The model can accommodate up to 8 digital blocks and 12 analog blocks within itself
Digital
blocks include – PWMs, Counters (8 to 32
bit), Timers (8 to 32
bit), UART 8 bit
with selectable parity (up to 2), SPI master and slave (up to 2), I2C slave and
master (1 available as a System
Resource), Cyclical Redundancy
Checker/Generator (8 to
32 bit) , IrDA
(up to 2) and
Pseudo Random Sequence Generators (8 to 32 bit).
The analog blocks include - Analog-to-digital converters
(up to 4, with 6- to 14-bit resolution selectable as Incremental, Delta Sigma,
and SAR), Filters (2, 4, 6, and 8 pole band-pass, low-pass, selectable as
Incremental, Delta Sigma, and SAR), Filters (2, 4, 6, and 8 pole band-pass,
low-pass, with selectable gain to 93x), Comparators (up to 4, with 16
selectable thresholds) , DACs (up to 4, with 6- to 9-bit resolution), Multiplying DACs (up to 4, with 6- to 9-bit
resolution), High current output drivers (four with 30 mA drive as a Core
Resource), 1.3V reference (as a System Resource), DTMF dialer, Modulators,
Correlators, Peak detectors and a few more.
MORE ON THE MAJOR HARDWARE USED
PSOC MIXED-SIGNAL CONTROLLER - CY8C27443
PSoC®
(Programmable
System-on-Chip) is a
family of mixed-signal
arrays made by
Cypress Semiconductor,
featuring a microcontroller and
configurable integrated analog
and digital peripherals. PSoC is
software configured, mixed-signal array with built-in MCU core. The core is a
Cypress proprietary, very-small Harvard architecture machine called the M8C.
The M8C is an 8-bit machine with a rich 256 instructions. PSoC has three
separate memory spaces: RAM, Flash and IO Registers (which control and access
the configurable blocks and
fixed functions). The device
is created using SONOS technology.
PSoC resembles an ASIC in its flexibility and
integration: blocks can be assigned a wide range of functions and
interconnected on-chip. Unlike an ASIC, there
is no special manufacturing
process required to create the custom configuration - only startup code which
is created by Cypress' PSoC
Designer IDE.
PSoC resembles an FPGA in that at power up it must be
configured, but this configuration occurs by loading instructions from the
built-in Flash memory. Unlike an FPGA, the current generation of PSoC cannot
have its digital
functions reprogrammed by
VHDL or verilog;
it can only
be configured with register settings.
PSoC most closely
resembles a microcontroller in
usage, since the
programs written by
a user execute code
to interact with
the user-specified peripheral
functions (called "User
Modules") utilizing automatically generated
APIs and interrupt routines. PSoC Designer
IDE generates the startup configuration code and peripheral APIs automatically based upon the users selections in a visual-studio-like GUI
HALL EFFECT SENSOR ALLEGRO
A1142
INTRODUCTION
The Hall Effect was discovered by Dr. Edwin Hall in 1879 while he was a
doctoral candidate at Johns Hopkins University in Baltimore. Dr. Hall found
when a magnet was placed so that its field was perpendicular to
one face of a thin
rectangle of gold through which
current was flowing, a difference
in potential appeared at the opposite edges. He found that this voltage was
proportional to the current
flowing through the
conductor, and the
flux density or
magnetic induction perpendicular
to the conductor
Hall Effect devices when appropriately packaged are
immune to dust, dirt, mud, and water. These characteristics make Hall Effect
devices better for position sensing than alternative means such as optical and
electromechanical sensing. Hall Effect devices used in motion sensing and
motion limit. switches can offer
enhanced reliability in
extreme environments. As
there are no
moving parts involved within the
sensor or magnet, typical life expectancy is improved compared to traditional
electromechanical switches. The
sensing of wheel rotation is especially useful in
anti-lock brake systems. The principles of such systems have been
extended and refined to offer more
than anti- skid functions, now
providing extended vehicle "handling" enhancements.
APPLICATION
A
Hall Effect sensor is a transducer that varies its output voltage in response
to changes in magnetic field
density. Hall sensors
are used for
proximity switching, positioning,
speed detection, and current sensing applications.
Hall sensors are
commonly used to
time the speed
of wheels and shafts, such as for internal combustion engine ignition timing
or tachometers. In the pictured
wheel carrying two equally
spaced magnets, the
voltage from the sensor
will peak twice
for each revolution.
This arrangement is commonly
used to regulate the
speed of diskette drives
ALLEGRO A1142 DESCRIPTION
The A1142 device
is sensitive, two-wire,
unipolar, Hall Effect
switches that are
factory - programmed at
end-of-line to optimize
magnetic switchpoint accuracy.
These devices use a
patented high frequency
chopper stabilization technique,
produced using the
Allegro advancedSBiCMOS wafer fabrication process,
to achieve magnetic stability and to eliminate offset inherent in
single-element devices exposed to harsh application environments.
Commonly found in a number of automotive applications,
these switches are utilized to sense seat track
position, seat belt
buckle presence, hood/trunk
latching, and shift
selector position. A1142has the
following output: the
currents switch LOW
in the presence
of a south-polarity magnetic field of sufficient
strength, and switch HIGH otherwise.
`
This shows the output characteristic of the sensor
ULTRASONIC TRANSDUCER SQ40 T/R
The word Ultrasonic means „above sound , which means
above the human hearing range which is approx 300Hz to 14 KHz. Therefore any
frequency that is above the human hearing wavelength and below the low
frequency RF wavelength may be considered as ultrasonic or „ultrasound .
Ultrasonic
ranging is performed
by transmitting a pulse
of high frequency sound, then
counting how long it takes for its echo to be detected. Because sound
through a given medium (liquid or air) is
a known quantity,
it can be
considered a constant,
the length of
time taken between
thetransmitted pulse and the received echo can be converted into
distance. This is called Time of Flight TOF).
The SQ40 as the name suggests, operates at 40Khz. This
is the frequency at which the sensitivity of the ultrasonic receiver is
greatest. The transmitter is the one marked SQ40 „ T and the receiver is the other, which is
marked as SQ40 „R . Its operating range is -40 0 C to 850
C
Limitations: The Ultrasonic transducer has two
major limitaions - narrow
beam angle and weak received signal strength. The
beamwidth is close to 55,
which means that only if
the obstacle is almost
right infront of
the transmitter can the
waves be reflected
towards the recevier.
A deviation of
the obstacle will
hinder the process
of range detection
or obstacle detection practical models, multiple
transducers will be required for efficient obstacle detection practical models,
multiple transducers will be required for efficient obstacle detection The
received signal strength is another hindrance towards the comfortable working
of the device as the received signal
at the receiever
is only at
about a few
millivolts. This has
to be greatly
amplified and filtered before it can be verified as
being a legitimate signal from noise signals.
PSoC RANGE MEASUREMENT
There are several
ways to measure
distance without contact.
Some products have
infrared light emitters and
receivers that determine an object s distance by implementing the optical
triangulation method. Other devices
have laser-based systems
that increase accuracy
and precision. For electrically conductive metal objects,
the eddy current method is an option, and capacitive sensors that are
independent of the metal used in the measured objects can be used.
The PSoC range finder
measures the amount of time
it takes for a pulse
of sound to travel to a particular surface and return.
Then, the device calculates the distance based on the estimated speed of sound.
The only required
components are a
PSoC microcontroller, two
40-kHz ultrasonic
transducers, two resistors,
and two capacitors.
Similar circuits are
typically complicated and expensive, consisting of a large number
of integrated circuit and passive components.
The block diagram
of range measurement
module is divisible
into two parts:
the transmitting section
and receiving section. Each
section contains several
PSoC blocks. Using the
PSoC chip family, all of the
digital and analog devices are on-board with the microcontroller.
Several PSoC microcontroller resources
were used in
this module. The
following PSoC digital resources were used: five 8-bit
counters, an 8-bit serial transmitter, two 8-bit PWMs, and a digital inverter.
The following analog resources: one programmable
gain amplifier (PGA), two two-pole
pass band filters, a programmable threshold comparator,
and a reference multiplexer . In addition, the LCD toolbox software module is also.
This is a screen
shot of the PSoC Designer with the
Device Editor showing the
placement of the PSoC s digital and analog resources. As you can see, a lar ge
number of resources are required. All of the digital blocks and several analog
blocks are employed. For this application, all of the digital blocks are
required.
The software modules include the LCD toolbox user module
and a complete set of library routines that allows you to write numbers and
strings to a two-line LCD using standard Hitachi HD44780 commands.
PRINCIPLES
The transmission section is based on four
digital blocks allocated in the DBA00, DBA01, DBA02, and DBA03
blocks. An 8-bit
counter (called "Time
Base") provides a
17,240-Hz time base Times New Roman temperature value of 22°C:
where T is equal to the air temperature (°C). So, for a
middle value of 22°C:
For a round-trip ping, we have:
And with a 24-MHz MCU clock and period of 12:
An 8-bit counter
(F40kHz) drives the
ultrasonic transmitter and a digital
inverter (F40kHz_inv). The phase
of the voltage
applied to the
positive and negative
terminals of the
sensor has been shifted 180°, so two times the supply
voltage is applied to the sensor.
The 40-kHz tr
ansmission enables an 8-bit counter
(called "Meter") that
increments one step per
centimeter. The Meter clock input is Time Base (17,240 Hz).
The
ultrasonic receiver s positive
terminal is connected
to an amplification
chain based on a
programmable gain amplifier (PGA_1) and two two-pole pass band filters (BPF2_1
and BPF2_2). The first pass band filter is designed for a 40-kHz center
frequency and a correspondent gain of 33 dB. The second filter is also designed
for a 40-kHz center frequency, but it
has a 10-dB passband gain. Because
of the discrete
value of the
capacitors integrated in the switched-capacitor analog blocks, the real frequency response is
different from the nominal one.
The range detection module has a 40-kHz operating
frequency, a range of 25 to 200 cm, and 1-cm resolution. In addition, it
requires only a single 5-VDC power supply and draws just 25 mA (23 mA without
the LCD).