This is only a preview of the October 1995 issue of Silicon Chip. You can view 27 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Build A Compact Geiger Counter":
Articles in this series:
Items relevant to "A Fast Charger For Nicad Batteries":
Articles in this series:
Articles in this series:
|
Digital speedom
& fuel gauge
74 Silicon Chip
meter
Update your car’s dashboard
to this fancy electronic display.
It gives digital readouts of
speed and the fuel remaining,
and includes a 6-position
overspeed alarm as well.
Pt.1 – By JEFF MONEGAL
Many modern cars have digital instrument panels and these are preferred
by some people because they are easy to read at night. Not only that but they
look fancy as well. If your car’s dashboard could do with an update, this
electronic version will do the job.
To simplify things as much as possible, the circuit is based on a Motorola
68705P3 microprocessor. This accepts inputs from a speed sensor, the fuel
tank sender (via an A-D converter) and an overspeed switch and provides
outputs to drive the displays, alarm buzzer and warning lamp.
The speedo display consists of a 3-digit 7-segment LED module which
directly indicates the speed in km/h (kilometres per hour). An identical
3-digit display module is used for the “fuel gauge” and can display the fuel
remaining in the tank in either litres, gallons or as a percentage (set during the
calibration procedure). Both the speedo and fuel displays are automatically
dimmed at night, so that they are not too bright.
A dash-mounted “low-fuel” warning lamp lights when the reading drops
below 9 (ie, below 9 litres, 9 gallons or 9%). As the amount of fuel in the
tank hovers around 9, the lamp will slowly switch on and off as the fuel
sloshes around in the tank.
There are six overspeed alarms and these are selected by the driver using
a simple rotary selector switch. The alarm speeds chosen are 62, 72, 82,
92, 102 and 120km/h. These figures were chosen to allow the driver to sit
comfortably on the speed limit while still providing sufficient warning if
the limit is exceeded.
If the preset speed is exceeded, the circuit immediately sounds a buzzer
and flashes the speedo display at a 1Hz rate (ie, once every second). This
continues for as long as the preset speed is exceeded but, if necessary, the
buzzer can be silenced for 30 seconds by pressing an “Alarm Mute” button.
The display continues to flash even after the Alarm Mute button has been
pressed, unless the speed drops back below the warning threshold.
How it works
Fig.1 shows the main circuit details of the Digital Dashboard. As indicated
earlier, most of the action takes place inside IC2, the 68705P3 microprocessor.
Crystal X1 (3.58MHz) and capacitor C8 (27pF) are the external clock components, while Q2 and IC1 are used to generate the interrupts. This circuit
works as follows.
When power is first applied, C1 charges via a 1MΩ 10-turn trimpot (VR1).
As the voltage across C1 rises, the voltage on pin 2 of comparator IC1 eventually exceeds the 4V bias voltage on pin 3 (set by R4 & R5) and the output
at pin 6 switches low. This, in turn, forward biases D4 and provides an
October 1995 75
+12V
+5V
R4
1.5k
R2
1.5k
R8
47k
IC1
2 TL071
4
CAL.
VR1
1M
PA7
2
6
S1
6
S1
1 : 62
2 : 72
3 : 82
4 : 92
5 : 102
6 : 120
C2
22
R5
6.8k
6
7
VPP TMR/BT
26
PA6
RN2
D4
1N914
7
3
C1
0.47
ALARM
MUTE
S2
R3
10
5
1
20
2
4
21
3
22
23
24
25
C
INT
18
+5V
PA1
17
5
R36
10k
PA3
PA4
PA5
4
FUEL GAUGE
A-D CONVERTER
START CONVERSION
12
COUNT
13
END CONVERSION
14
Q3
BC548
7
E
R18
100k
R17
10k
Q4
BC548
C
B
+12V
B
C
Q5
BD679
E
C10
100
LOW
FUEL
12V
+5V
PB5
XTAL
PC0 8
9
PC1
10
PC2
D6
1N914
CLK
SPEED
DISPLAY
RESET
LATCH
BRIGHTNESS
EXTAL
R15
10k
PB0
CLK
PB1
RESET
PB2
PC3 11
FUEL
DISPLAY
LATCH
BRIGHTNESS
1
10
D9
1N914
PLASTIC
SIDE
B
E
E
C
B
+12V VIA
IGNITION
SWITCH
V+
O/P
DIGITAL SPEEDO AND FUEL GAUGE
C
IN
OUT
D3
1N4004
C12
470
R7
10
ZD1
15V
GND
IN
C3
2200
C4
2200
IC5
78L08
IC4
7805
GND
OUT
C13
10
C14
0.1
OUT
C5
22
+8V TO
FUEL
GAUGE
+5V
C6
0.1
CHASSIS
Fig.1: the circuit is based on IC2 which is a 68705P3 microprocessor. It accepts
pulses from a speed sensor and the fuel gauge A-D converter and drives the
speed and fuel displays. It also drives an overspeed alarm buzzer (via IC3) and
a low-fuel lamp via Q4 and Q5.
interrupt signal to the microprocessor
(IC2) which then executes an interrupt
routine in its software.
IN
GND
VIEWED FROM BELOW
I GO
HALL
DEVICE
(SMOOTH
FACE)
GND
76 Silicon Chip
C
PB4 16
RESET
28
C7
10
R14
56k
C11
0.1
R11
4 10k B
+5V
+5V
9
R13
1k
R16
10k
C8
27pF
+8V
IC3c
14
PB6
X1
SPEED SENSOR
8
6
IC2
68705P3
V+ HALL
SENSOR
O/P
D7
D8 1N914
R12
CAR 1N914
15k
LIGHTS
D5
1N914
C9
10
PA2
RN9
+5V
5
R9
82k
PA0
19 PB7
GND
IC3b
3
ALARM
BUZZER
E
E
MAGNETS
2
R10
33k
PB3 15
R6
10k
B
1
RN1
10k
RN3-RN8
Q2
BC548
27
IC3a
4093
During this interrupt routine, pin
18 (PB6) of IC2 briefly goes high and
turns on Q2. This discharges C1 and
thus resets the interrupt timebase. VR1
sets the timebase frequency to provide
calibration of the speed display, while
C2 decouples the bias voltage set by
R4 & R5.
A Hall Effect device is used as the
speed sensor. It provides a 5V signal
+8V
A
LED2
YELLOW
R19
470
SET
EMPTY
VR2 1k
R20
33k
2
3
TO
FUEL
SENDER R22
10k
R26
470
6
LDR
A
C16
100
LED1
+8V
Q6
BC548
R25
10k B
R24
100k
E B
R28
2.2k
Q8
BC558
2
C18
100
R33
10k
END OF
CONVERSION
R34
10k
D10
1N914
7
IC7
CA3140
R31
22
C19
10
C
E
3
K
C
+5V
C
R27
680k
C17
4 0.47
C15
10
B
R29
1k
7
IC6
CA3140
K
R23
100k
R21
100k
R30
1k
D11
1N914
6
4
SET
FULL
VR3
50k
4
Q9
C BC548
B
8
IC8
555
6
2
1
C21
.01
R32
10k
Q7
BC548
COUNT
5
C20
.01
E
R35
1k
3
START
CONVERSION
E
+8V
R19
820
SET
EMPTY
VR2 1k
B
3
TO
FUEL
SENDER
2
7
IC6
CA3140
4
6
A
C17
0.47
K
E
C
VIEWED FROM
BELOW
R23
100k
R20A
33k
COMPONENTS FOR
POSITIVE SENDER
FUEL GAUGE A-D CONVERTER
Fig.2: this circuit converts the analog output of the fuel sender to a digital signal
that can be applied to the microprocessor. IC6 functions as an amplifier and this
drives comparator IC7 which, in turn, controls oscillator stage IC8.
at its output each time a magnet passes its sensitive area. In practice, two
magnets are used and these are secured
to the drive shaft of the vehicle, with
the Hall Effect device mounted nearby
– see Fig.7.
The output from the Hall Effect device is fed to pin 17 (PB5) of IC2. Note
that the output is normally pulled low
via a 10kΩ resistor to ground.
The signals to drive the speed
display module appear at pins 8-10
(PC0-PC2) of IC2. These signal lines are
labelled Clk, Reset and Latch. Note that
the same Clk and Reset lines are also
applied to the fuel display module.
Only the Latch signals are different,
the fuel display module being driven
from pin 11 (PC3) of IC2.
Speed buzzer & dimming
Pin 27 (PA7) of IC2 is the speed
alarm output. This output switches
high when the vehicle’s speed exceeds
the overspeed setting, as selected by
switch S1. Depending on its position,
S1 simply pulls one of the PA0-PA5
inputs (pins 20-25) to +5V. The remaining inputs are normally held low
by 10kΩ resistors RN3-RN8 (part of a
resistor array).
When the set speed is exceeded
and pin 27 goes high, it activates a
Schmitt trigger oscillator based on
IC3a. R9, R10, D5 & C9 set the oscillator frequency to about 3Hz, with the
output appearing at pin 3. This drives
transistor Q3 via inverter stage IC3b to
pulse the buzzer on and off.
IC3c is also connected as a Schmitt
trigger oscillator but in this case is
used as a brightness control for the
two display modules. This oscillator
is permanently enabled since pins 8 &
9 of IC3c are connected together.
When the car’s lights are off, the
duty cycle is about 50:1, as set by
R13 and D9 in the feedback path. The
output appears at pin 10 of IC3c and
drives the blanking input (pin 4) of a
4511 display driver in each display
module.
If, however, the lights are turned
on, D8 becomes forward biased which
means that R12 is effectively connected in parallel with R14 each time pin
10 of IC3c goes high. This reduces the
duty cycle to about 12:1 and this in
turn considerably reduces the brightness of the displays.
D7 is necessary to protect IC3
against excessive voltage (+12V) from
the lights circuit. It does this by clamping the inputs of IC3c (pins 8 & 9) to
the +5V rail – ie, pins 8 & 9 of IC3c can
never rise above 5.6V.
Low fuel lamp
Q4 and Q5 control the low fuel
lamp. When the microprocessor detects low fuel (via an A/D converter),
pin 15 (PB3) switches low. This turns
Q4 off and so C10 slowly charges via
R18. As the voltage across C10 rises,
the voltage on the emitter of Darlington transistor Q5 also rises and so
the lamp gradually turns on to full
brilliance.
October 1995 77
+5V
3
16
Q0
12 CLK
13
MR
10
LE
CLK
RESET
LATCH
Q1
Q2
Q3
7
9
7
1
6
2
5
6
4
IC1
4553
4
C1
.001
3
C1A
C1B
DIS
11
A
B
IC2
4511
C
D
BI
LE
5
DS3
DS2
16
LT
8
15
R1-R7
DIS3
68 7
a
a
12
6 b
b
a
11
4 c
c
f g b
10
2 d
d
c
9
1 ee
e
15
9 f
d
f
14
10 g
g
COM
3,8
R9
120
B
DIS2
3,8
3,8
E
Q2
BC558
C
1
B
E
Q3
BC558
C
B
DS1 2
8
DIS1
D1 4x1N914
BRIGHTNESS
Q4
BC558
C
+5V
D2
B
D3
E
E
Q1
BC558
C
B
E
C
VIEWED FROM
BELOW
D4
R8
27k
SPEEDOMETER/FUEL GAUGE DISPLAY
Fig.3: the display driver circuit is based on a 4553 3-digit counter (IC1) and a
4511 BCD to 7-segment decoder (IC2). The displays are multiplexed by using IC1
to switch driver transistors Q2, Q3 and Q4 on and off at the appropriate times.
Diodes D1-D4 and transistor Q1 provide leading zero blanking.
Conversely, if the microprocessor
detects more than 9 (gal
lons, litres
or percent) in the fuel tank, pin 15
goes high. This turns on Q4 which
discharges C10 and the low fuel lamp
dims to off.
R18 and C10 set the lamp dimming
time constant to about 10 seconds. As
well as ensuring that the lamp gradually comes up to full brilliance at the
low fuel point, it also prevents the
lamp from rapidly fluctuating between
on and off as the fuel sloshes around
in the tank.
Power supply
Power for the circuit is derived from
the car’s battery via the fusebox. D3
provides reverse polarity protection,
while R7 and ZD1 provide protection
against any abnormally high voltage
spikes that may be present. The resulting +12V rail is then filtered using C3
and C4 and fed to 3-terminal regulator
IC4 which provides a +5V rail.
This +5V rail is used to power the
ICs, the timebase cir
cuitry and the
78 Silicon Chip
LED display modules. In addition, a
second 3-terminal regulator, IC5, is
used to provide a +8V rail to power the
A/D converter circuitry. The low-fuel
lamp driver circuit (Q4 & Q5) and the
buzzer driver circuit (Q3) are powered
from a +12V rail derived from the
input to IC4.
A/D converter
Fig.2 shows the fuel gauge A/D
converter circuit. This circuit is necessary to convert the analog output of
the existing fuel sender in the car to
a digital signal that can be applied to
the microprocessor (IC2).
The sender in most cars consists
of a rheostat with the movable arm
connected to some sort of float arrangement. When the tank is full, the
resistance is at minimum. Conversely,
maximum resistance is obtained when
the tank is empty.
However, some vehicles have fuel
senders that work in the opposite
sense. This type of sender is catered
for by making a few minor changes to
the input circuitry, as shown on Fig.2.
Note, however, that the circuit will not
work with cars that have capacitive
type fuel senders. To our knowledge,
the only vehicle that uses this type of
sender is the Ford Falcon range from
model XD and on.
Tests showed that the resistance of
most senders varies from 0Ω when
full to 2kΩ or more when empty. As
the resistance varies, in response to
a changing fuel level, the voltage applied to the inverting input (pin 2) of
IC6 varies accordingly.
IC6 is wired as an inverting op amp
with a gain of three, as set by R23 and
R20. R21 and R22 bias its non-inverting input to about 0.7V, while the
amplified signal output appears at pin
6. As the fuel level falls, the voltage at
pin 6 also falls and vice versa.
Following IC6, the signal passes
via a filter network (R27 & C18) to
pin 3 of comparator stage IC7. This
filter network provides a long time
constant (68s) to prevent short-term
fluctuations in the reading as the fuel
sloshes around in the tank.
Q8, LED 2, R29 and R30 form a constant current source and this charges
C19. The resulting linear saw
tooth
YOU CAN
AFFORD
AN INTERNATIONAL
SATELLITE TV
SYSTEM
This view shows the speed sensor assembly and the two magnets which are
mounted on the tailshaft (or on a drive shaft). The sensor assembly is covered in
heatshrink tubing and sealed with silicone sealant to make it waterproof.
waveform is applied to pin 2 of IC7
and compared with the DC voltage
across C18.
When the microprocessor starts the
conversion process, its pin 12 output
(PB0) pulses high. This briefly switches on Q9 which discharges C19. As a
result, pin 6 of IC7 goes high and this
starts an oscillator stage based on 555
timer IC8.
C19 now charges via the constant
current source (Q8). When the voltage
on pin 2 of IC7 rises above that on pin
3, pin 6 switches low and stops the
oscillator. At the same time, it pulls
pin 14 (PB2) of the microprocessor
low via D10 to signal the end of conversion (EOC). Note that D10 and R33
provide 8V to 5V level translation for
the microprocessor.
During the conversion process, the
microprocessor counts the pulses at
the pin 3 output of the oscillator (IC8).
This count is then processed and the
resulting information used to indicate
the amount of fuel in the tank. VR2
provides the zero calibration when the
tank is empty, while VR3 adjusts the
frequency of the oscillator and allows
the reading to be correctly set when
the tank is full.
The circuit based on Darlington
pair Q6 and Q7 is used only at power
on. Because of the long time constant
formed by C18 & R27, the fuel readout
would not otherwise be accurate for
several minutes when the ignition is
first turned on. This problem is solved
as follows.
When power is first applied, C16
pulls the base of transistor Q6 high via
R25. This switches on the Darlington
pair (Q6 & Q7) and lights LED 3. This
LED is positioned against the face of
an LDR connected to pin 6 of IC6. As
a result, when the LED turns on, it
lowers the resistance of the LDR to
SATELLITE ENTHUSIASTS
STARTER KIT
WARNING!
The fuel gauge circuit in this
design derives its input from the
car’s existing fuel sender. As a
result, the existing fuel gauge
in the car must be disconnected
and is thus rendered inoperative.
If you don’t want to do this,
then you might consider building
only the digital speedometer
section of the design. Alternatively, you can install a 2-position
switch (with break before make
contacts) to select between the
existing fuel gauge and the digital
fuel display.
Finally, readers are reminded
that it is illegal to tamper with
a car’s odometer. In particular,
it should not be disabled or removed from the vehicle.
YOUR OWN INTERNATIONAL
SYSTEM FROM ONLY:
FREE RECEPTION FROM
Asiasat II, Gorizont, Palapa,
Panamsat, Intelsat
HERE'S WHAT YOU GET:
●
●
●
●
●
just a few hundred ohms.
C18 can now charge up quite
quickly via the LDR & R28 and so
the correct fuel level is displayed
almost immediately after the ignition
is switched on.
In the meantime, C16 charges via
R24. After a few seconds, Q6, Q7 and
LED 1 turn off and the resistance of
the LDR rises to over 5MΩ. As a result,
C18 now mainly charges via R27 and
so the time constant is increased to
over one minute to prevent fluctua
tions due to fuel slosh as described
previously.
Fig.2 also shows the alternative
circuit for fuel senders that work in
the opposite sense to normal (ie, low
resistance when the tank is empty;
high resistance when the tank is
full). In this case, IC6 is configured
●
400 channel dual input receiver
preprogrammed for all viewable satellites
1.8m solid ground mount dish
20°K LNBF
25m coaxial cable
easy set up instructions
regular customer newsletters
BEWARE OF IMITATORS
Direct Importer: AV-COMM PTY. LTD.
PO BOX 225, Balgowlah NSW 2093
Tel: (02) 9949 7417 / 9948 2667
Fax: (02) 9949 7095
VISIT OUR INTERNET SITE http://www.avcomm.com.au
YES GARRY, please send me more
information on international band
satellite systems.
Name: __________________________________
Address: ________________________________
____________________P'code:
__________
Phone: (_______) ________________________
ACN 002 174 478
October 1995 79
PARTS LIST
MAIN MODULE
1 main PC board, 168 x 85mm
2 10-way ribbon cables with IDC
sockets
2 10-way PC-mount IDC plugs
1 case to suit (not part of kit)
1 12V mini buzzer
2 button magnets
1 U-shaped heatsink to suit
1 6-position single-pole rotary
switch (S1)
1 momentary contact pushbutton
switch (S2)
1 knob to suit rotary switch
1 1MΩ 10-turn trimpot (VR1)
1 1kΩ 10-turn trimpot (VR2)
1 50kΩ 10-turn trimpot (VR3)
1 12V panel-mount lamp & bezel
1 28-pin IC socket
1 14-pin IC socket
4 8-pin IC sockets
Semiconductors
IC1 – TL071/TL081 op amp
IC2 – 68705P3 programmed
microprocessor
IC3 – 4093 quad Schmitt trigger
IC4 – 7805 regulator
IC5 – 78L08 regulator
IC6,IC7 – CA3130 op amp
IC8 – 555 timer
Q2,Q3,Q4,Q6,Q7,Q9 – BC548
NPN transistor
Q5 – BD679 Darlington transistor
Q8 – BC558 PNP transistor
D3 – 1N4004 silicon diode
D4,D5,D6,D7,D8,D9,D10,
D11 – 1N914 silicon diode
ZD1 – 15V 1W zener diode
LED1 – 5mm high brightness
LED
LED2 – 3mm yellow LED
X1 – 3.58MHz crystal
1 Hall Effect sensor
Capacitors
C1 – 0.47µF MKT
C2,C5 – 22µF 16VW electrolytic
C3,C4 – 2200µF 16VW
electrolytic
C6,C11,C14 – 0.1µF monolithic
C7,C9,C13,C15,C19 – 10µF
16VW electrolytic
C8 – 27pF ceramic
C10,C16,C18 – 100µF 16VW
electrolytic
C12 – 470µF 16VW electrolytic
C17 – 0.47µF monolithic
80 Silicon Chip
C20 – .01µF MKT
C21 – .01µF monolithic
Resistors (0.25W, 5%)
R2,R4 – 1.5kΩ
R13,R29,R30,R35 – 1kΩ
R3 – 10Ω
R5 – 6.8kΩ
R6,R11,R15,R16,R17,R22,R25,
R32,R33,R34,R36 – 10kΩ
R7 – 10Ω 1W
R8 – 47kΩ
R9 – 82kΩ
R10, R20,R20a – 33kΩ
R12 – 15kΩ
R14 – 56kΩ
R18,R21,R23,R24 – 100kΩ
R19 – 470Ω or 820Ω (see test)
R26 – 470Ω
R27 – 680kΩ
R28 – 2.2kΩ
R31 – 22Ω
RN1-9 – 10kΩ resistor network
1 LDR (as supplied)
DISPLAY MODULE
(1 each required for speedo and
fuel displays)
2 PC boards, 56
x 46mm
ADVERT
4 12mm spacers
1 10-way PC-mount IDC plug
1 red perspex sheet
2 16-pin IC sockets
Semiconductors
D1,D2,D3,D4 – 1N914 silicon
diode
Q1,Q2,Q3,Q4 – BC558 PNP
transistor
IC1 – 4553 3-digit BCD counter
IC2 – 4511 BCD to 7-segment
LED display driver
DIS1,DIS2,DIS3 – 7-segment
LED display
Capacitors
C1 – .001µF ceramic
Resistors (1/4W, 5%)
R1-R7 – 68Ω
R8 – 27kΩ
R9 – 120kΩ
Where to buy parts
Kits for this design will be available
from CTOAN Electronics and this
company has retained copyright
of the PC board designs.
as a non-inverting amplifier instead
of being an inverting amplifier. The
remainder of the circuit is identical.
Display modules
Fig.3 shows the circuit for the two
display modules (ie, the speedo and
fuel displays).
IC1 is a 4553 3-digit counter with
multiplexed outputs. It counts the
pulses on its clock input from pin
8 (PC0) of the microprocessor and
outputs the resulting data in BCD
form. This data appears on the Q0-Q3
outputs of IC1 and drives IC2 which
is a BCD to 7-segment decoder. IC2 in
turn drives the a-g segments of the LED
displays via current limiting resistors
R1-R7.
The displays are multiplexed by
using IC1 to switch driver transistors
Q2, Q3 and Q4 on and off at the appropriate times.
A crude form of leading zero blanking is used to blank the leading digit
(DIS1) when ever its value is zero. This
is achieved using diodes D1-D4 and
transistor Q1.
D1-D4 monitor the Q1-Q4 BCD outputs of IC1. When the leading digit has
a value of zero, the four BCD outputs
will all be low and so D1-D4 will all
be reverse biased. As a result, Q1’s
base is pulled low via R8 and so Q1
turns on and Q2 turns off and blanks
the leading display digit.
For other leading digit values, one or
more of the BCD lines from IC1 will be
high. Because D1-D4 effectively form
a 4-input OR gate, Q1’s base will also
be high. Thus, Q1 will be held off and
Q2 operates as normal.
Note that no blanking has been
applied to the second digit (DIS2), as
this would add greatly to the circuit
complexity. In any case, this digit only
reads “0” on the speed display when
the vehicle is travelling at less than
10km/h, and “0” on the fuel display
when there is less than 9 litres (or
gallons, or percent) remaining in the
fuel tank.
The clock, latch and reset signals
for the display module come from
the microprocessor (IC2 on the main
board), while the brightness signal
comes from pin 10 of oscillator stage
IC3c as described previously.
Next month, we shall give the full
constructional details and describe
the calibration procedure. Note that
several kit versions will be available
SC
from CTOAN Electronics.
|