This is only a preview of the April 1997 issue of Silicon Chip. You can view 25 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. Items relevant to "Build A TV Picture-In-Picture (PIP) Unit":
Articles in this series:
Items relevant to "A Digital Voltmeter For Your Car":
Articles in this series:
Items relevant to "Loudspeaker Protector For Stereo Amplifiers":
Items relevant to "Train Controller For Model Railway Layouts":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
A digital voltmeter
for your car
Main Fea
t
Have you ever experienced that sinking
feeling when your car won’t start on those
cold winter mornings? This digital voltmeter
will let you keep tabs on the condition of
your car’s battery & the charging system.
By JOHN CLARKE
Perhaps the most unreliable component in a modern vehicle is its battery.
This is not surprising considering
the work it has to do, often under
quite arduous conditions. On a cold
winter’s morning, for example, it is
expected to deliver enormous cranking currents to the starter motor, this
at a time when the battery is at its
worst.
A car battery will only last well and
perform at its best when it is properly
maintained. This means keeping an
26 Silicon Chip
eye on the electrolyte level and keeping the charging voltage within strict
limits. For a 12V battery, the charging
voltage should be kept between 13.8V
and 14.4V, while for a 24V battery, the
charging voltage should be between
27.6V and 28.8V.
If the charging voltage is too low, the
battery will never fully charge and it
will be unable to deliver the necessary
current during cold starting. Conversely, if the battery is overcharged,
the electrolyte will gas excessively,
ures
• Compact
size
• 3-digit LE
D readou
t
• 0.1V reso
lution
• Suitable
for 12V a
nd 24V
batteries
• Leading “
0”
• Display d blanking
imming a
t night
• High acc
uracy
• Negligible
drift with
temperature
• Can be u
sed as a
0-39.9V
meter
thereby reducing the electrolyte level
and shortening the life of the battery.
On some vehicles, the charging system is only marginal, particularly in
wet weather, with the lights on and in
heavy traffic. In these circumstances,
the battery is often required to deliver
power to all the electrical accessories.
This is because the alternator is only
Fig.1: block diagram of the
Digital Car Voltmeter. Most of
the work is performed in IC1
which is an ICL7107 analog-todigital (A-D) converter. This IC
directly drives the 3-digit LED
display and produces a reading
that corresponds to the voltage
at its input. The accuracy of this
reading relies on the stability of
voltage reference REF1.
driven by an idling engine and cannot
adequately top up the battery.
Similarly, if you make lots of short
trips, the battery might not have a
chance to adequately charge between
starts. The result – a flat battery and
you’re left stranded.
By fitting this digital voltmeter to
your car, you can easily keep tabs on
the condition of the battery and the
charging circuit. If the battery voltage
consistently reads low, for example,
then either the battery is on the way
out or the charging system is not working correctly. Either way, it’s time to
take action.
Conversely, if the battery voltage is
always high, then the battery is being
overcharged, as can easily happen if
the regulator fails. This can not only
damage the battery but, in severe cases,
could also damage various electronic
systems in the vehicle.
So there are good reasons for carefully monitoring the battery voltage
in a car and this unit is ideal for the
job. It boasts high accuracy, negligible
drift with temperature and a 3-digit
LED display that reads to the nearest
0.1V. It also features automatic display
dimming when the lights are turned
on, to prevent the readout from being
excessively bright at night.
Fig.2(a) shows the basic method by
which IC1 converts the analog input
voltage to a digital display value. The
two inputs, Vin and Vref, are fed to an
integrator via switch S1 which selects
between them.
To measure the voltage at Vin, S1 is
switched to position 1. The integrator
initially charges capacitor Cx at a rate
set by Vin for a fixed period of time.
The higher the voltage at Vin the higher the voltage at Vx at the end of this
time period – see Fig.2(b). Note that
slope ‘A’ in Fig.2(b) reaches a higher
Vx voltage than slope ‘B’ because Vin
is higher for ‘A’.
At the end of the fixed time period,
switch S1 selects the Vref value (position 2) which is opposite in polarity
to Vin. Thus, capacitor Cx discharges
at a fixed rate as set by Vref. During
this “de-integrate” period, a counter is
clocked at a fixed rate until the capacitor is fully discharged. The comparator
then switches and the number in the
counter is displayed.
This number is directly related to
the voltage at Vin.
How it works
Fig.1 shows the block diagram for
the Digital Car Voltmeter. Most of the
work is performed in IC1 which is
an ICL7107 analog-to-digital (A-D)
converter. This IC directly drives the
3-digit LED display and produces a
reading that corresponds to the voltage at its input. The accuracy of this
reading relies on the stability of voltage
reference REF1.
Fig.2: how the A-D converter works. To measure the voltage at Vin, S1 is first
switched to position 1. The integrator then charges capacitor Cx at a rate set by
Vin for a fixed period of time. At the end of this time, S1 is switched to Vref and
the capacitor discharges. During this time, a counter is clocked at a fixed rate
until the capacitor is fully discharged.
April 1997 27
Fig.3: the reference voltage for A-D converter IC1 is derived using an
LM336Z-2.5 (REF1). It's output is divided and applied to the REF HI and REF
LO inputs. IC2 and its associated parts condition the signal input, while IC3
provides the display dimming feature.
This method of A-D conversion is
often used in digital voltmeters. It
has the advantage that the accuracy
is only dependent on the accuracy of
the reference voltage. Although the
technique uses a clock to set the fixed
time during the integrate period and
the count rate during the de-integrate
phase, the stability of the clock is not
overly important as far as conversion
accuracy is concerned. That’s because
28 Silicon Chip
the resulting digital value is not dependent on the clock rate.
To understand why, let’s consider
what happens if the clock is slower
than normal. In that case, the Vx value
will be higher than expected after the
integrate stage and it will take longer to
discharge Cx to 0V (ie, the de-integrate
stage will take longer). However, that’s
compensated for because the counter
is clocked at a slower rate over this
longer time period.
As a result, the same value will be
recorded, regardless of clock rate. Of
course, if the clock rate is far too slow,
the integrator may saturate because its
output reaches the limit of the supply
voltage.
Conversely, if the clock is too fast,
Vx will be lower but the counter will
be clocked at a faster rate during the
discharge period. Thus, any drift in
the clock rate over time is cancelled in
the conversion process, provided that
the clock rate does not drift between
conversions.
PARTS LIST
Fig.4: this is the waveform at the output of the 555 timer (IC3) when the car’s
lights are on. Because the waveform is low for only 17% of the time, Q3 is only
on for this time and so the displays are dimmed.
Returning to Fig.1, the car battery
voltage is applied to regulator REG1
and to a signal conditioning circuit
based on IC2. The regulator provides
a 5V supply rail, while the signal
conditioning circuit converts the input
signal to a voltage range suitable for
feeding to IC1 .
The display is controlled using
dimming and leading “0” blanking
circuitry. Leading “0” blanking is a
cosmetic feature that blanks the first
digit when the reading is below 10V.
The leading zero blanking circuit
works by detecting when the “f” segment in the most significant display is
driven and then switching the whole
display digit off. The “f” segment is
only driven if 0, 4, 5, 6, 8 and 9 are to
be displayed. Since we are only interested in displaying values well below
40.0, blank
ing the leading digit for
values above “3” is of no consequence.
The display is dimmed when the
dimming input is pulled high. This
activates an oscillator which turns
the displays on for only 17% of the
time, thereby effectively reducing
the average display brightness. The
switching speed of the oscillator is
set high enough so that the display
doesn’t flicker.
Circuit details
Refer now to Fig.3 for the circuit
details. At the heart of the design
is an Intersil ICL7107CPL 31/2-Digit
Single Chip A-D Converter (IC1). It
directly drives the three 7-segment
LED displays and only requires a few
extra components to make it work.
The clock components are at pins 38,
39 & 40, while the RC network for the
integrator is at pins 27 & 28.
To improve accuracy and remove
any offsets in the internal op amps, an
auto zero capacitor has been included
at pin 29. A reference capacitor at
pins 33 & 34 is used to store the refer
ence voltage during the de-integrate
stage of the dual-slope D-A conversion.
The reference voltage is derived
using an LM336Z-2.5 (REF1). This
device is connected between the +5V
rail and the REFLO input of IC1. The
current through REF1 is set to about
1mA using a 2.2kΩ resistor, while
diodes D3 and D4 are used to com
pensate the reference for temperature
variations. Trimpot VR1 is adjusted to
set the reference to 2.490V, at which
point it has a minimum temperature
coefficient.
VR2 divides the 2.490V from REF1
to provide a stable 1V reference voltage
between REFLO and REFHI. This sets
the full scale input for IC1 to 1.999V.
However, because we are only using
three digits, the display can only show
1 PC board, code 04304971,
117 x 102mm
1 PC board, code 04304972, 88
x 30mm
1 front panel label, 132 x 28mm
1 ABS case, 140 x 110 x 35mm
1 red transparent Perspex sheet,
46 x 22 x 2-3mm
1 small TO220 heatsink, 30 x 25
x 13mm
1 3mm x 6mm long screw plus
nut
4 9mm untapped standoffs
4 3mm x 15mm screws
9 PC stakes
1 60mm length of 0.8mm tinned
copper wire
3 HDSP-5301 12.7mm high
common anode LED displays
2 10kΩ horizontal trimpots (VR1,
VR3)
1 50kΩ horizontal trimpot (VR2)
Semiconductors
1 ICL7107CPL 31/2 digit A-D
converter (IC1)
1 LF351, TL071 single op amp
(IC2)
1 555 timer (IC3)
1 7805 5V regulator (REG1)
1 BC548 NPN transistor (Q1)
2 BC328 NPN transistors
(Q2,Q3)
1 LM334Z-2.5 reference (REF1)
1 1N4752 33V 1W zener diode
(ZD1)
1 1N4732 4.7V 1W zener diode
(ZD2)
4 1N914, 1N4148 diodes (D1D4)
Capacitors
1 100µF 63VW PC electrolytic
6 10µF 16VW PC electrolytic
1 0.22µF MKT polyester
2 0.1µF MKT polyester
1 0.047µF MKT polyester
1 100pF MKT polyester or
ceramic
Resistors (0.25W, 1%)
1 470kΩ
2 2.2kΩ
3 100kΩ
3 1kΩ
1 39kΩ
1 390Ω
3 10kΩ
1 47Ω
2 4.7kΩ
1 150Ω 1W 5%
Miscellaneous
Automotive wire, automotive
connectors, solder, etc.
April 1997 29
CAPACITOR CODES
Fig.5: the 7-segment displays must be installed with their decimal points at top
left, as shown here. Make sure that all polarised parts are correctly oriented.
up to 999mV (ignoring the leading zero
blanking).
The COM pin (pin 32) sits at a nominal 2.8V below the +5V supply rail;
ie, at 2.2V. This means that INLO also
sits at 2.2V, since it is tied to COM.
The 10kΩ resistor between the COM
pin and the +5V rail ensures that the
Value
IEC Code
0.22µF 220n
0.1µF
100n
0.047µF 47n
100pF
100p
EIA Code
224
104
473
101
COM pin supply is biased correctly.
With no input, INHI also nominally
sits at 2.2V. That’s because the 2.2V on
COM is applied to pin 3 of op amp IC2
via 1kΩ and 47Ω resistors. This stage
operates with a gain of 1.01 due to the
1kΩ and 100kΩ feedback resistors and
so its output is biased to 2.2V.
IC2 and its associated input stage
are also used to process and buffer the
battery voltage before it is applied to
IC1. The battery voltage is monitored
via the ignition switch and is divided
by 100 via a 100kΩ input resistor and
the 1kΩ resistor connected to COM.
This divided voltage is effectively
added to the 2.2V bias voltage and
then fed to IC2.
Let’s say, for example, that 10V is
applied to the input. This is divided to
100 and added to the 2.2V bias to give
2.3V on pin 3 of IC2. IC2 then buffers
this voltage and applies it to the INHI
input of IC2.
As a result, the difference between
the INHI and INLO inputs is 2.3V - 2.2V
= 100mV. This is then displayed as
10.0 (ie, 10.0V) on the LED readouts.
Diodes D1 & D2 are included to
suppress any voltage spikes which
could otherwise go beyond the supply
rails and damage IC2. The associated
10µF capacitor also damps any voltage
TABLE 1: RESISTOR COLOUR CODES
No.
1
3
1
3
2
2
3
1
1
1
30 Silicon Chip
Value
470kΩ
100kΩ
39kΩ
10kΩ
4.7kΩ
2.2kΩ
1kΩ
390Ω
47Ω
150Ω
4-Band Code (1%)
yellow violet yellow brown
brown black yellow brown
orange white orange brown
brown black orange brown
yellow violet red brown
red red red brown
brown black red brown
orange white brown brown
yellow violet black brown
brown green black
5-Band Code (1%)
yellow violet black orange brown
brown black black orange brown
orange white black red brown
brown black black red brown
yellow violet black brown brown
red red black brown brown
brown black black brown brown
orange white black black brown
yellow violet black gold brown
not applicable
The display board is soldered at right angles to the main PC board, as shown
here (see text). Note the U-shaped heatsink fitted to REG1. This should be
securely fastened to the board so that it can’t short against other parts.
spikes. Trimpot VR3 is used to adjust
the offset of IC2’s output so that the
display reads 0.0 when the input is
connected to ground.
The LED displays are common
anode types and are all con
trolled
by Q3. In addition, the leading digit
(DISP1) is controlled by Q1 and Q2.
Normally, the “f’ segment output from
IC1 is high and so Q1 & Q2 are on and
DISP1 is turned on via Q3. However, if
the “f” segment output for the DISP1
digit goes low (eg, if a zero is to be
displayed), Q1 turns off. This then
turns off Q2 and so DISP1 also turns
off to provide the leading zero blanking feature.
Display dimming
When the car’s lights are off, pin
4 of 555 timer IC3 is pulled low and
so its pin 3 output is also low. This
means that Q3 is on and so the displays run with a 100% duty cycle for
full brilliance.
When the lights are turned on, pin
4 of IC3 is pulled to 4.7V (as set by
ZD2) and so IC3 begins to oscillate.
Its operating frequency is set to about
244Hz while the duty cycle is about
83%, as set by the RC timing components on pins 2, 6 & 7.
This means that pin 3 is low for only
about 17% of the time. And since Q3
is only on when pin 3 is low, it follows
that the displays only operate with
a 17% duty cycle. This reduces the
display brightness, so that they don’t
become intrusive at night.
Power supply
Power for the circuit is derived from
the car’s battery via the ignition switch.
The 15Ω resistor and zener diode ZD1
provide transient suppression, while
the 100µF capacitor provides filtering.
The filtered voltage is then fed to a
3-terminal regulator which produces
a 5V supply for IC1, IC2 and IC3.
Normally, the supply voltage to the
SPECIFICATIONS
•
•
•
•
•
•
•
Voltage range 8-33V (0-39.9V when separately powered)
Resolution 0.1V (100mV)
Accuracy within 0.1V
Temperature drift less than 0.5% from 0-60°C
Quiescent current 130mA <at>15V, 150mA <at> 30V (full brightness)
Input impedance 100kΩ
Input current -27µA <at> 0V, 0µA at 2.2V, 122µA <at> 15V
April 1997 31
Alternatively, if a separate power
supply is used to drive REG1, the
circuit can accurately measure input
voltages down to 0V. As a result, the
+12V supply and input terminals are
not connected on the PC board so that
the unit can be used in applications
where low voltage measurements are
required.
Construction
Another view of the completed module, showing how the two boards are
soldered together. Note how the 10µF electrolytic capacitors are bent over so
that they clear the base of the case.
The completed module is mounted upside down in the case, so that the display
decimal points are at bottom right. The board is secured on 9mm spacers using
12mm-long screws which go into integral standoffs on the base of the case.
circuit is connected to the input so that
the battery voltage can be measured.
However, if the input voltage to the
regulator drops below about 8V, the
circuit will give misleading results
because of low voltage to the ICs.
This is of no concern for a car battery
voltmeter.
DIGITAL CAR VOLTMETER
32 Silicon Chip
Building this unit is easy since most
of the parts are mounted on a main PC
board coded 04304971. The only parts
not on this board are the three 7-segment displays. These go on a separate
display PC board coded 04304972 and
this is then soldered to the main PC
board at right angles.
Before mounting any of the parts,
carefully check the PC boards for
any shorts between tracks or broken
sections. If necessary, cut out the
rectangular section at the front of the
main board, where it meets the display
board.
Fig.5 shows the assembly details.
Start by installing PC stakes at the
four external wiring points and at test
points TP1-TP5. This done, install the
wire links and the resistors. Table 1
shows the resistor colour codes but
it is also a good idea to check each
value using a digital multimeter, just
to make sure.
Next, install the ICs, followed by
the capacitors, diodes, zener diodes
and the transistors. Make sure that all
these parts are correctly oriented and
that the correct type number is used
at each location. In particular, don’t
confuse transistors Q1 and Q2.
The regulator (REG1) is mounted
horizontally on the PC board with
its leads bent at rightangles. It is
then secured to both the board and a
U-shaped heatsink using a screw, nut
and lockwasher. A second heatsink
should also be fitted to the copper side
of the board if the unit is to be used
with a 24V battery. Make sure that this
second heatsink doesn’t short out any
of the tracks.
The display board can now be
Fig.6: this full-size front
panel artwork can be used
as a template for cutting out
the display window.
functioning correctly and you can
proceed with the calibration.
Calibration
Fig.7: check your etched PC boards against these full-size artworks before
installing any of the parts.
quickly assembled by installing the
three LED displays. These must all be
oriented with their decimal points at
top left, as shown on Fig.5.
Final assembly
The unit is housed in a small ABS
case measuring 140 x 110 x 35mm.
This is fitted with a self-adhesive
front panel label, while a red Perspex
window covers the display area.
The main job in the final assembly
is to solder the two PC boards together
at right angles. To do this, first mount
the main PC board upside down on
the base of the case and secure it on
9mm spacers using 3mm x 12mmlong screws. This done, the display
board is butted against the main board
and the two large end pads soldered.
Make sure that the two boards are at
rightangles and that the bottom edge
of the display board rests against the
case before making these connections.
The PC board assembly should
now be removed from the case and
the remaining edge pads soldered
together. Apply a generous fillet of
solder to the two large end pad connections to ensure sufficient mechanical
strength.
Now for the smoke test but first go
back over your work and carefully
check for any errors. In particular,
check that all parts are correctly oriented, that the correct part has been
used at each location and that there
are no missed solder joints.
If everything is correct, apply power
and check that the display lights up
(note: only the last two digits should
light). If it doesn’t, check transistor Q3.
Now check for +5V at the output of the
regulator (REG1), at pin 1 of IC1, at pin
7 of IC2 and at pin 8 of IC3.
Next, check that the display dims
when +12V is applied to the LIGHTS
input. If it does, the unit is probably
The calibration procedure is quite
straightforward – just follow this stepby-step guide:
(1) Connect a multimeter between
TP1 and TP2 and adjust VR1 for a
reading of 2.490V (this will give the
minimum temperature drift for REF1).
(2) Connect a multimeter between
TP1 and TP3 and adjust VR2 for a 1V
reading. This calibrates the full scale
reading for the A-D converter.
(3) Connect the INPUT terminal on
the PC board to GND and adjust VR3
for a 0.0V reading. This sets the offset
output of IC2.
(4) Connect the INPUT and +12V
terminals together and connect the
multimeter between these terminals
and GND. Check that the dis
play
shows the same reading as the multi
meter. If not, adjust VR2 slightly until
the readings are the same.
That completes the calibration.
Connect suitable flying leads to the
four external wiring terminals and
drill a small hole in the rear panel to
provide an exit for these leads. The
board assembly can now be finally
secured to the base of the case.
Finally, complete the construction by fitting the front panel. One
approach is to substitute a piece of
red Perspex for the whole of the front
panel, with the area outside the display panel suitably masked (eg, with
a stick-on label). Alternatively, you
can cut a display window out of the
existing panel and fit this with a red
Perspex window for the displays.
Installation
The Digital Car Voltmeter can be
installed on the dashboard of the vehicle. It is wired to the ignition, lights
and ground connections on the fused
side of the fusebox. Use automotive
connectors for all wiring.
The ground connection can be made
to the chassis using an eyelet crimp-lug
which is secured to the metal using
a self-tapping screw. The separate
INPUT connection to the voltmeter
can be made at the fusebox, at a point
which is switched via the ignition
switch but which has a low current
drain. This will ensure that the voltmeter is not measuring a low voltage
due to drops across the vehicle wirSC
ing.
April 1997 33
|