Maplin auto electronics projects
Trang 1microcontroller in that it also has a s e c o n d on-board CPU
c a l c u l a t e and s c h e d u l e the output pulse timings
Vehicle alarms
T h e huge i n c r e a s e in car-related c r i m e s in the 1980/90s has been paralleled by an equally large i n c r e a s e in the demand for c a r alarms Originally b a s e d on simple logic
c i r c u i t s and t r i g g e r e d d i r e c t l y from i n t e r i o r l i g h t
s w i t c h e s , the c o m p l e x i t y of alarms has grown to try and
m a t c h t h e skill of t h e p o t e n t i a l intruder Figure 3.10
An MCU c h o s e n for this j o b should have a low power
mode s i n c e the alarm must be powered up for long ods of time without the engine running It should also be
peri-p o s s i b l e to wake the device from this mode via several
s o u r c e s , so that a number of c i r c u i t s can trigger the vice into sounding the alarm A simple 8 or 16-bit on-chip timer is also d e s i r a b l e to time the output audio/visual
de-w a r n i n g p u l s e s , and t o r e s e t t h e a l a r m after it h a s
Trang 4sounded for a set time — this is a legal r e q u i r e m e n t T h e timer can also be used to arm the alarm after a defined period, if it is not armed via a r e m o t e c o n t r o l
A.B.S
T h e i n c r e a s e d p e r f o r m a n c e of everyday c a r s , along with their increasing n u m b e r s (and t h e r e f o r e g r e a t e r density
on t h e r o a d s ) , has resulted in a continual improvement
in braking performance This trend has included t h e gression from all-drum braking, drum/disc braking and ventilated d i s c / d r u m s , through to t h e all-disc braking
It d o e s this by preventing the v e h i c l e wheels from ing, due to o v e r - a p p l i c a t i o n of t h e b r a k e s , and t h u s maintains s t e e r a b i l i t y and r e d u c e s stopping d i s t a n c e s when braking on difficult surfaces s u c h as i c e
lock-ABS allows s h o r t e r stopping d i s t a n c e s than with locked wheels, due to the friction or mu-slip c h a r a c t e r i s t i c of the tyre-to-road interface; as a wheel brakes, it slips rela-tive to t h e road surface producing a friction force A typical mu-slip c u r v e is d e p i c t e d in Figure 3 1 1 T h i s shows that peak friction o c c u r s at about 10 to 20% slip, and then falls to approximately 30% of this value at 100% slip (locked w h e e l )
100
Trang 5The aim of t h e ABS s y s t e m is to c o n t r o l the braking force
so as to s t o p t h e slip for any wheel e x c e e d i n g this mum value by m o r e than an a c c e p t a b l e window
of t h e force supplied by t h e driver via t h e b r a k e pedal
T h e s e three-way valves can c o n n e c t the b r a k e cylinders to:
• the normal master cylinder circuit, so that the ing p r e s s u r e will b e directly c o n t r o l l e d by t h e driver,
brak-• t h e return pump and a c c u m u l a t o r in t h e hydraulic modulator, s o that the p r e s s u r e in t h e brake cylinders will fall as t h e fluid returns to t h e m a s t e r cylinder,
Trang 7• neither of the a b o v e two c i r c u i t s , thus isolating the brake cylinder s o that t h e p r e s s u r e will b e maintained
at t h e value immediately preceding the move to this sition
po-T h e c o n t r o l for t h e s e valves is supplied via drive cuits from t h e output ports of t h e m i c r o c o n t r o l l e r
cir-T h e b a s i s for all e l e c t r o n i c ABS s y s t e m s is t h e
m i c r o c o n t r o l l e r ' s ability to d e t e r m i n e the s p e e d s of the individual wheels (although s o m e front-wheel drive ve-
h i c l e s s h a r e a c o m m o n s p e e d s e n s o r for b o t h r e a r
w h e e l s ) It does this via an inductive s e n s o r and t o o t h e d ring that p r o d u c e an output waveform, the frequency of which r e p r e s e n t s the s p e e d of t h e wheel This arrange-
m e n t is a l m o s t i d e n t i c a l to t h e e n g i n e s p e e d s e n s o r
d i s c u s s e d earlier, e x c e p t that s i n c e no angular position information is required t h e r e are no missing or e x t r a teeth It follows from this that the explanation previously given on determining engine s p e e d also applies to deter-mining wheel s p e e d s in an ABS s y s t e m
In this c a s e , t h e r e are around 50 to 100 t e e t h on the
en-c o d e r ring, and this en-could result in a pulse frequenen-cy of
6000 Hz when the v e h i c l e is travelling well in e x c e s s of
d e t e r m i n e 4 i n d e p e n d e n t w h e e l s p e e d s from 6 0 0 0 Hz
Trang 8signals within a 5 ms window, and still have time to c a r r y out p r o c e s s i n g on this data to determine the new valve
s t a t e s T h e s e stringent timing r e q u i r e m e n t s mean that ABS s y s t e m s are the domain of high p e r f o r m a n c e 16-bit
m i c r o c o n t r o l l e r s that can r e s p o n d quickly to interrupts from the timer s y s t e m which is capturing the s p e e d sen-sor edges
So far it has been stated that the m i c r o c o n t r o l l e r in an ABS s y s t e m must prevent t h e wheel-slip value from ex-ceeding the optimum, and we have d i s c u s s e d how the
μC m e a s u r e s the wheel s p e e d s (angular v e l o c i t y ) ever, it may not be c l e a r how t h e s e wheel s p e e d s are related to the slip values that the s y s t e m is attempting
How-to c o n t r o l T h e slip of any wheel can be defined as the difference between the angular v e l o c i t y of t h e slipping and non-slipping wheels, divided by the angular veloc-ity of t h e non-slipping w h e e l T h i s m a k e s s e n s e and sounds quite simple, but for one problem; how to find a non-slipping wheel? T h e ABS algorithm s e a r c h e s for the fastest spinning wheel and u s e s this as t h e r e f e r e n c e for calculating the slip values of the o t h e r w h e e l s If the slip value of a wheel is greater than the peak friction value
by a certain margin (i.e t h e wheel is heading towards a locked c o n d i t i o n ) , then an ABS c o n t r o l c y c l e is e x e c u t e d
de-1 0 4
Trang 9momentarily to the return position, reducing the ing effort on that wheel This pulsed r e l e a s e of p r e s s u r e
brak-is continued until the m i c r o c o n t r o l l e r d e t e c t s that the wheel a c c e l e r a t i o n is positive, at which point it s t o p s reducing the p r e s s u r e , and r e c o n n e c t s the wheel cylin-der to t h e b r a k e c i r c u i t to p r e v e n t o v e r s h o o t of t h e
a c c e l e r a t i o n This entire c o n t r o l c y c l e of ing/increasing brake p r e s s u r e is r e p e a t e d until the slip value for the wheel has been brought b a c k into the ac-
holding/reduc-c e p t a b l e window
This is obviously a simplified explanation of how ABS works and the algorithms are in fact very c o m p l e x and will vary from one ABS implementation to another When you r e m e m b e r that this algorithm must be e x e c u t e d on all wheels in just a few milliseconds, it is not surprising that ABS is among the most demanding m i c r o c o n t r o l l e r applications
An important point worth discussing about ABS is that it
is one of the most safety critical p r o c e s s o r applications
in e x i s t e n c e T h e c o n s e q u e n c e s of a faulty ABS s y s t e m could be potentially d i s a s t r o u s if the brakes were pre-vented from operating, or were applied e r r o n e o u s l y For this r e a s o n ABS manufacturers take great c a r e in the safety a s p e c t s of the s y s t e m design It is not uncommon for two identical m i c r o c o n t r o l l e r s to be implemented, running the s a m e software in parallel and continually checking e a c h o t h e r via a c o m m u n i c a t i o n p r o t o c o l for any e r r o n e o u s operation
Another solution to this problem is to have a simpler
(lower c o s t ) slave (that a c t s as a watch-dog for the
main ABS m i c r o c o n t r o l l e r T h i s s l a v e d e v i c e is
Trang 10pro-grammed to monitor the major activities of the m a s t e r and it has the ability to shut down t h e ABS s y s t e m if
a fault is d e t e c t e d , thus reverting full braking c o n t r o l to the driver
A s u b j e c t worth mentioning here is traction control tion c o n t r o l is a fairly r e c e n t d e v e l o p m e n t and can be thought of as applying ABS in r e v e r s e T h e idea of t r a c -tion c o n t r o l is to prevent wheel-slip due to e x c e s s power
Trac-on l o o s e surfaces by applying a braking force to the
slip-p i n g w h e e l ( n o t e t h a t t r a c t i o n c o n t r o l is o n l y
i m p l e m e n t e d on t h e driven w h e e l s ) T h i s feature is a natural p r o g r e s s i o n for ABS, as all the n e c e s s a r y com-ponents and m e a s u r e m e n t s required for traction c o n t r o l are inherent in the ABS s y s t e m — e x c e p t s o m e m e a n s of applying a braking force when t h e driver is not d e p r e s s -ing t h e b r a k e p e d a l T h i s is u s u a l l y a c h i e v e d via an
e l e c t r i c pump arrangement
With t h e c o n s i d e r a b l e improvement in safety provided
by ABS, t h e r e can be little doubt that the next few y e a r s will s e e this s y s t e m b e c o m i n g m o r e popular, p o s s i b l y
b e c o m i n g a s t a n d a r d feature on all but the lowest c o s t
c a r s
The future
Hopefully this c h a p t e r will have given t h e r e a d e r s o m e insight into the fascinating and challenging applications for m i c r o c o n t r o l l e r s in automotive a p p l i c a t i o n s It has,
of c o u r s e , been i m p o s s i b l e to c o v e r all of t h e tions listed earlier in this c h a p t e r , or even to c o v e r s o m e
applica-106
Trang 11of t h o s e we have in great t e c h n i c a l depth (engine agement or ABS t h e m s e l v e s could e a c h fill a text b o o k ) , but the s e l e c t i o n c h o s e n has shown just how varied in
man-c o m p l e x i t y the automotive m i man-c r o man-c o n t r o l l e r appliman-cation can b e
As a finishing thought, it may b e worth pondering what
t h e f u t u r e h o l d s for e l e c t r o n i c s , and p a r t i c u l a r l y
m i c r o c o n t r o l l e r s , in c a r s
P e r h a p s the next major advance, one which all the
ma-j o r v e h i c l e m a n u f a c t u r e r s and s t a n d a r d s b o d i e s a r e working on, is the multiplexed wiring system As the elec-
t r i c a l c o n t e n t of v e h i c l e s e s c a l a t e s even higher, t h e weight and c o s t of all the i n t e r c o n n e c t i n g c a b l e s is be-coming a major c o n c e r n , and the number of e l e c t r i c a l
c o n n e c t o r s p o s e s a reliability problem — most v e h i c l e breakdowns are due to e l e c t r i c a l faults T h e c o n c e p t of the multiplexed wiring s y s t e m is to use a very high per-
f o r m a n c e s e r i a l c o m m u n i c a t i o n s n e t w o r k b e t w e e n intelligent and semi-intelligent modules stationed at stra-tegic points around the v e h i c l e This means that only power and the serial link need be distributed about the
c a r — all the loads have s h o r t c o n n e c t i o n s to the est intelligent sub-module
near-T h e possibilities of this s y s t e m are e n o r m o u s ; the
en-gine m a n a g e m e n t s y s t e m could talk to the e l e c t r o n i c
g e a r b o x c o n t r o l l e r and to the A B S / t r a c t i o n c o n t r o l
sys-t e m No l o n g e r would sys-turning on y o u r lighsys-ts s i m p l y
c o n n e c t power directly to the bulb — it would signal one unit to send a c o m m a n d to a n o t h e r unit, instructing it to
turn on the bulb using a Smart Power device
Trang 12This s c e n a r i o is not fantasy, it is going to happen and
b e c a u s e the m i c r o c o n t r o l l e r has a place at the heart of every one of t h e s e intelligent modules, it is safe to say that its future in the automotive market is very s e c u r e indeed
108
Trang 13Any number of things from a faulty alternator to left-on headlights (or sidelights, e v e n ) can result in a flat bat-tery — and the first you are likely to know about it is when you turn the key one morning and the car won't start! This c a r b a t t e r y monitor is a useful little unit de-signed to warn you in advance by displaying the battery's
s t a t e of c h a r g e with a row of ten LEDs
The monitor c o n s u m e s a miserly 20 mA (it would take
2000 hours to d i s c h a r g e a 40 Ah b a t t e r y ) , s o it can be left permanently c o n n e c t e d to the b a t t e r y if required
Alternatively, it could be c o n n e c t e d to the ancillaries side
of the ignition switch
Trang 14The car battery monitor will even reveal faults like a ping fan-belt: a problem which prevents the b a t t e r y from charging properly, but l e a v e s t h e d a s h b o a r d b a t t e r y warning light off It will even s h o w how t h e b a t t e r y is handling the strenuous work of starting the c a r (did you know it takes s o m e twenty minutes of driving to put b a c k what a five-second start takes o u t ? )
slip-Circuit
The heart of the monitor circuit (Figure 4.1) is the LM3914 bar-graph driver IC, used to drive a row of red, orange and green LEDs which t o g e t h e r indicate a magnitude of the b a t t e r y c h a r g e voltage in ten s t e p s , approximately
V2 V e a c h step from 9 V to 14 V T h e IC c o n t a i n s an input buffer, a potential divider chain, c o m p a r a t o r s , and an
a c c u r a t e 1.2 V r e f e r e n c e s o u r c e Logic is also included
which gives the c h o i c e of bar or dot-mode operation —
the latter is used in this application T h e c o m p a r a t o r
c a u s e s the LEDs to light at 0.12 V intervals of the input voltage T R I a c t s as an amplified diode, raising the lower end of the divider chain and the negative terminal of the
r e f e r e n c e s o u r c e (ICI pins 4 and 8 ) to 1.9 V T h e upper end of the chain at ICI pin 6 is c o n n e c t e d to a r e f e r e n c e
s o u r c e output voltage of approximately 3.1 V from pin 7
T h e potential divider formed by R l and RV1 a t t e n u a t e s the supply voltage and p r o d u c e s the signal input to the
c o m p a r a t o r , such that a supply range of 9 - 1 4 V c o v e r s the span of the divider chain and is indicated over the whole of the ten segment LED display T h e LED bright-
n e s s is held c o n s t a n t by an internal c o n s t a n t current
s o u r c e
110