This is only a preview of the December 2006 issue of Silicon Chip. You can view 37 of the 112 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 "Cordless Power Tool Charger Controller":
Items relevant to "Build A Radar Speed Gun, Pt.2":
Items relevant to "A Heartbeat CPR Training Beeper":
Items relevant to "Super Speedo Corrector":
Items relevant to "PICAXE Net Server, Pt.4":
Purchase a printed copy of this issue for $10.00. |
Super
Speedo
Corrector
By JOHN CLARKE & JULIAN EDGAR
Get your electronic speedo reading accurately
T
HESE DAYS, having an accurate
car speedo is vital if you’re to
avoid fines and loss of licence points.
But how do you correct the speedo if
it is reading high or low? It’s easy with
our Super Speedo Corrector which
will work with any electronic speedo,
either digital or analog. It allows you to
alter the speedo reading in 1% increments, either up or down.
Before you can use the Speedo Cor-
rector, you’ll have to find and identify
the speedometer sensor output wire or
the speed signal output wire from the
ECU. In some cars that’s easier said
than done, so make sure you have
a wiring diagram and that you can
physically access the speedo input
wire which is normally at the back
of the instrument cluster. If you can’t
find the right wire, you won’t be able
to install the Speedo Corrector.
Speedo Corrector: Main Uses
•
•
•
•
Correct inaccurate speedos in standard cars.
Correct inaccurate speedo caused by changed differential or gearbox
ratios.
Correct inaccurate speedo caused by changed tyre diameters.
Correct tachometers
72 Silicon Chip
This project is a development of the
Speedo Corrector first published in
the SILICON CHIP book “Performance
Electronics for Cars”. Advantages
over the original project include an
automatic set-up procedure where
the Super Speedo Corrector calibrates
itself to suit the speed signal output
characteristics, an on-board status LED
that flashes to show correct operation
and an AC output signal that will work
with Nissan speedometers.
Circuit description
The circuit (Fig.1) is based on microcontroller IC1 which is programmed
to alter an incoming frequency by a
set amount. The exact amount is set
using two rotary switches, which alter
the frequency in 1% steps.
The speedometer signal is applied to
the input of the circuit that has the opsiliconchip.com.au
Fig.3: all the clever stuff in this circuit is done by PIC microcontroller IC1. It takes the speedo signal and multiplies
it by a factor set by two rotary BCD switches (S1 & S2). The speedo signal frequency can be either increased or
decreased in 1% increments – see text.
tions of a 1kW pull-up resistor selected
with transistor Q4 or a 1kW pull-down
resistor selected with transistor Q2.
By selecting either link LK1 or LK2,
the pull-up resistor can be connected
to either the +8.2V supply or the +5V
supply. The input signal is then fed
via a 10kW resistor to zener diode ZD2,
which ensures that levels cannot go
above +16V or below -0.6V. A parallel
10nF capacitor filters the signal which
then drives transistor Q1 via a voltage
divider consisting of 10kW and 6.8kW
resistors.
This 6.8kW resistor at the base of Q1
can be either connected to ground via
the RA4 output of IC1 or left floating
when the RA4 output is set as a highimpedance input. When the resistor is
connected to ground, the signal level
required to switch Q1 is about 2.5V.
Alternatively, when this resistor is efsiliconchip.com.au
At only 105 x 61mm, the Super Speedo
Corrector is small enough to fit behind
the dash. It’s easy to set up and simply
intercepts the speedometer signal.
D
December
ecember 2006 73
Mechanical Speedo?
Features & Specifications
The Super Speedo Corrector
will work only on electronic speed
ometers – ie, those that don’t have
a mechanical rotating cable driving
them. If you have an older car with
a mechanical speedo, then you
won’t be able to correct it – at least
not using this circuit.
Main Features
•
•
•
•
•
Allows alteration of speedo reading so it reads faster or slower.
Automatic or manual set-up of input signal detection.
Three output signal types catered for.
LED indication of valid speed sensor signal being received.
LED indication of output operation.
resistor and a 150W series resistor. A
1nF capacitor filters out any highfrequency voltage variations. Pin 6
includes an internal Schmitt trigger
to ensure a clean signal for measurement.
The rotary BCD switches (S1 & S2)
are monitored via the RB1-RB7 inputs
and the RA1 input. The RB inputs are
normally held high via internal pullup resistors within IC1, while the RA1
input uses a 10kW resistor to ensure
this input is high, unless pulled low
via S2. The switches provide a unique
BCD (binary coded decimal) value on
these inputs for each setting.
The output signal is at RA0 (pin
17). This drives the indicating LED
(LED1) via a 1kW resistor and the base
of transistor Q5. Q5’s collector is held
high via a 1kW resistor which connects
to either the +8.2V or +5V supply (via
link LK1 or LK2).
Q5’s collector provides the pull-up
output signal and also drives Q6 which
has a pull-down resistor at its collector to provide the pull-down output.
Coupling the pull-down output via a
100mF capacitor provides an AC output. The 10kW resistor provides the
discharge path, while links LK3, LK4
and LK5 select the pull-up, pull-down
and AC outputs, respectively.
An internal power-on reset for IC1 is
provided using the MCLR input (pin 4)
Specifications
•
•
•
•
•
•
•
•
•
•
Output Rate: adjustable in 1% steps from 0 to 99%.
Output: either faster or slower than the input rate.
Input and output types: Pull up or pull down resistance or AC.
Output swing: 0 to 8.2V or 0 to 5V or 8.2V peak-peak AC or 5V peakpeak AC.
Minimum operating frequency: Adjustable from 1-16Hz.
Maximum input frequency to maintain 1% change resolution: 1.2kHz.
Maximum input voltage: 50V RMS.
Minimum input sensitivity: 0.7V peak (on high sensitivity setting).
Minimum input sensitivity: 2.5V peak (on low sensitivity setting).
Power 9-15V at 25mA.
fectively out of circuit, the sensitivity
is lowered to around 0.7V peak.
The RA2 output of IC1 is used to
select the pull-up resistor. When this
output is at 5V, it switches on transistor Q3 and this in turn switches on
Table 1: Capacitor Codes
Value
100nF
10nF
1nF
mF Code IEC Code
0.1mF
104
.01mF
103
.001mF
102
EIA Code
100n
10n
1n0
transistor Q4. Q4 then connects the
1kW pull-up resistor connecting from
the input to Q4’s collector. This then
connects the pull-up resistor to the
+8.2V or +5V supply rail. If RA2 is at
0V, Q3 and Q4 are off and there is no
pull-up resistor in circuit.
The RA3 output selects the pulldown resistor when its output is at
5V. This output drives transistor Q2
to connect the 1kW resistor at its collector to ground. When RA3 is at 0V,
the pull-down resistor is out of circuit.
Q1’s collector inverts the signal and
drives pin 6 of IC1 via a 10kW pull-up
Table 2: Resistor Colour Codes
o
o
o
o
o
o
o
o
No.
11
1
5
1
1
1
1
74 Silicon Chip
Value
10kW
6.8kW
1kW
470W
220W
150W
10W
4-Band Code (1%)
brown black orange brown
blue grey red brown
brown black red brown
yellow violet brown brown
red red brown brown
brown green brown brown
brown black black brown
5-Band Code (1%)
brown black black red brown
blue grey black brown brown
brown black black brown brown
yellow violet black black brown
red red black black brown
brown green black black brown
brown black black gold brown
siliconchip.com.au
Tacho As Well?
The Super Speedo Corrector
will also work with electronic
tachos that take their feed from
the ECU (ie, all cars with engine
management).
The configuration procedure
is the same as for use of the
device as a speed interceptor,
except that the “speed sensor”
becomes the tacho output signal
from the ECU. This application is
particularly suited to engine and
gearbox swaps.
Fig.2: when assembling the PC board, take care with the orientation of the
BCD switches, the PIC and the other polarised components. Use this diagram
and the photos of the completed project (below) to help you in your assembly.
24V Operation
The Super Speedo Corrector
can be used on 24V vehicles if
the following changes are made:
change ZD1 to 33V 1W; change
the 220W 0.5W resistor that feeds
ZD3 to 1kW 1W; change the 100mF
16V capacitor at the input to REG1
to 100mF 35V.
Non-Linearity?
Corrections are easy to dial-up – just set the two rotary switches to give the
up or down percentage correction that’s needed. Here, the Super Speedo
Corrector is configured to reduce the speedo reading by 3%.
which is connected to the 5V supply
via a 1kW resistor. This keeps the IC
reset until the power supply voltage
is correct.
IC1 operates at 20MHz using crystal
X1. This frequency was chosen so that
the software program runs sufficiently
fast to operate with speedometer signals up to 1.2kHz. Note that the Super
Speedo Corrector will operate with
speedo signals above these frequencies, however the accuracy of speedometer correction will be reduced.
Power for the circuit is applied
via diode D1 which provides reverse
polarity protection. Zener diode ZD1
and the 10W resistor provide transient
protection to protect the input of
REG1. The 100mF capacitor at REG1’s
input provides a further degree of
transient voltage suppression. A 10mF
siliconchip.com.au
The Super Speedo Corrector
will not compensate for non-linear
errors. In other words, if the speed
reads 10% high at 25km/h and 4%
high at 100km/h, you won’t be able
to use the Super Speedo Corrector
to get the speedo accurate at all
speeds. However, most speedo
errors are proportional and so can
be dialled-out with the Speedo
Corrector.
filter capacitor is provided directly
at REG1’s output and the 100mF and
100nF capacitors decouple the supply to IC1.
An 8.2V supply is derived from the
supply at REG1’s input via a 220W
resistor and zener diode ZD3. This
supply is for the pull-up resistors if
required.
even though they look the same.
The BCD switches must be mounted
with their dots positioned as shown on
the overlay diagram (Fig.2). The BCD
switch with 0-9 capabilities is S1 and
the BCD switch with 0-F on it is S2.
Construction
Making adjustments
The Super Speedo Corrector circuit fits onto a small PC board coded
05112061 and measuring 106 x 60mm.
Fig.2 shows the parts layout.
Construction is straightforward
but be sure to correctly install the
polarised components such as the PIC
microcontroller, electrolytic capacitors
and the diodes. Note that Q4 and Q6
are not the same as Q1, Q2, Q3 & Q5,
The speed reading can be altered
in 1% increments. This is most easily explained if you use a test speed
of 100km/h. If the speedo is wrong
by 5km/h at 100km/h, the adjustment
needed is about 5%.
S1 (the switch nearest the bottom
when the PC board is orientated with
the connections at the right) corrects
the speedo reading in single units
December 2006 75
Once located, the speed sensor wire
must be cut. The wire that goes to the
speed sensor connects to the Super
Speedo Corrector’s “IN” terminal and
the wire going to the speedo connects
to the “OUT” terminal.
Finding the speed input wire to the speedo can involve a dash disassembly job.
In this Honda, the steering column had to be dropped, the dash fascia removed
and the speedo cluster unbolted and pulled forward. Make sure you’re aware of
the safety precautions that need to be taken if the car is equipped with airbags.
and S2 changes the output in tens. So
where you want a correction of 5%,
simply set S1 to “5” and S2 to “0”. If
the required correction is 16%, set S1
to “6” and S2 to “1”.
Using the two BCD switches in
combination allows the speedometer
reading to be altered by as much as
99%, in increments of just 1%.
The default output reduces the reading of the speedo. This default was
picked because most speedos read fast
(often by about 5%). Alternatively, if
you wish to increase the speedo reading
, set S2 to its F position and wait for a
2-flash acknowledgement from the LED.
This needs to be done with the unit
connected and powered up.
You will need an accurate reference
to set the speedo. This can be provided
by a handheld GPS, another car with
a known accurate speedo or even, if
you ask nicely, a police car. Just make
sure that you have an assistant to do
the adjusting as you drive!
You can also use the “speedo check”
distances that are marked on some
roads – although strictly speaking,
this is intended for checking the accuracy of the odometer rather than the
speedometer.
Installation
Now for the installation but first, a
word of warning: if you need to pull
the dash out to locate the speed input
wire to the speedo, make sure you’re
Table 3: Functions Of S2 Settings
Switch Setting
Function
IC1 Pin Status
A
Autoset (automatically finds a suitable input
setting)
Pins 1, 2 & 3 change.
Pin 17 goes from 0V to 5V to 0V at a 1-second rate to flash
LED when automatic sensing is complete
B
Pull-up resistor
(low sensitivity <at> 2.5V peak)
Pin 1 <at> 5V, Pin 2 <at> 0V, Pin 3 <at> 0V
C
AC input (high sensitivity <at> 0.7V peak)
Pin 1 <at> 0V, Pin 2 <at> 0V, Pin 3 open circuit
D
Pull-down resistor
(low sensitivity <at> 2.5V peak)
Pin 1 <at> 0V, Pin 2 <at> 5V, Pin 3 <at> 0V
E (initial setting)
No pull-up resistor or pull-down resistor
(low sensitivity <at> 2.5V peak)
Pin 1 <at> 0V, Pin 2 <at> 0V, Pin 3 <at> 0V
F (default is slow)
Fast or slow option (LED acknowledgement: 1
flash = slow, 2 flashes = fast)
Note 1: in most applications, only the ‘A’ (automatic) setting will need to be used during set-up.
Note 2: switch setting must be selected for a minimum of four seconds to initiate new function.
76 Silicon Chip
siliconchip.com.au
Digital Speedo Lag
If the Speedo Corrector is fitted to a car with a digital speedo, some lag may
occur in the action of the speedo. Typically, this is noticeable when abruptly
coming to a stop from a slow speed (eg, 10km/h), where the speedo may
keep displaying a number greater than zero for up to a second, even when
the car is stationary.
Lag may also make itself evident when moving away from a standstill, where
the speedo initially shows 0km/h before then jumping to 15km/h or 16km/h.
This problem can be overcome by the use of the special “digital speedo
function” built into the Corrector. This function is enabled during set-up by
setting S1 to a position other than 2 before selecting A on S1. Positions 1–9
on S1 vary the number of pulses for which the Speedo Corrector calculates
the output frequency of the speedo sensor (odd switch numbers calculate
over one pulse and even numbers calculate over two pulses) and the time
delay before the corrector stops sending a signal to the speedo after the
input signal ceases.
The delays are: positions 0 & 1 – 1 second; positions 2 & 3 – 500ms;
positions 4 & 5 – 250ms; positions 6 & 7 – 125ms; positions 8 & 9 – 62.5ms.
If the speedo reading noticeably lags behind actual vehicle speed, try different positions of S1 before each time setting S2 to A and proceeding with
the self set-up process described in the main text. The optimal setting is that
which gives the shortest lag while still reliably operating the speedo.
aware of the safety precautions that
need to be taken if the car is equipped
with airbags.
In the vast majority of cars little
set-up will be needed – the corrector
will mostly work out for itself what
configuration is required. These are
the steps to follow:
(1). Connect power (use an ignitionswitched source), ground, speedo “in”
and speedo “out” (to the speedo). Position the corrector so that a passenger
can observe the on-board LED.
(2). Set S1 to 2.
(3). Set S2 to A.
(4). Install link LK2.
(5). Drive the car for a minute (the
speedo will not work).
(6). Observe that the LED flashes at
1Hz when the car is moving. This
shows that the Speedo Corrector has
set itself for the type of speedometer
signal that is present and is receiving
a valid signal from it.
If the LED doesn’t flash, install link
LK1 (instead of LK2) and try again.
(7). Set S2 to 0
(8). Set S1 to 0
(9). Try the link options LK3, LK4 or
LK5 until speedo works (the speedo
should read as it did with the car
standard).
(10). Set S1 & S2 to give the required
correction (S1 is for single units, S2
for tens).
siliconchip.com.au
Table 4: Link Functions
Link
Function
LK1
8.2V max. output
LK2
5V max. output
LK3
Pull-up output
LK4
Pull-down output
LK5
AC output
(11). If the speedo reading needs to be
corrected upwards rather than the default downwards, set S2 to F and then
wait for the LED to flash twice. Then
set S2 back to its required correction
value. To return to downwards speed
correction, again set S2 back to “F”
and wait for a single flash acknowledgement.
If the required settings are already
known (eg, in the case of auto electricians fitting large numbers of the
design to just one type of car), Table 3
shows how S2 can be used to manually
set the input configuration, while Table 4 shows the output configurations
achievable by the different link positions. Any changes to the switches will
not be registered by the circuit until
after about four seconds, so make sure
you don’t switch off power during this
Parts List
1 PC board, code 05112061,
105 x 61mm
1 UB3 plastic utility box, 130 x
68 x 44mm
2 2-way PC-mount screw terminal blocks
1 DIP18 IC socket
3 2-way 2.5mm jumper headers
1 3-way 2.5mm jumper header
2 jumper shunts
1 20MHz crystal (X1)
1 0-9 BCD rotary switch (S1)
1 0-F BCD rotary switch (S2)
Semiconductors
1 PIC16F628A-I/P microcontroller programmed with speedcor.hex (IC1)
4 BC337 NPN transistors
(Q1,Q2,Q3,Q5)
2 BC327 PNP transistors
(Q4,Q6)
1 1N4004 1A diode (D1)
2 16V 1W zener diodes
(ZD1,ZD2)
1 8.2V 1W zener diode (ZD3)
1 3mm high-intensity red LED
(LED1)
Capacitors
3 100mF 16V PC electrolytic
2 10mF 16V PC electrolytic
1 100nF MKT polyester
1 10nF MKT polyester
1 1nF MKT polyester
Resistors (0.25W 1%)
11 10kW
1 220W 0.5W
1 6.8kW
1 150W
5 1kW
1 10W
1 470W
time! This delay allows you to rotate
the switches to the required position
without any unwanted changes occurring.
Conclusion
Once the Corrector is working properly, it can be mounted in its UB3 box
and tucked up behind the dash out of
sight. But don’t then assume that your
speedo is then always going to be dead
accurate – accuracy depends on tyre
diameter, which changes with wear
and when new tyres are fitted.
Of course, with the Super Speedo
Corrector, it’s easy enough to then
make the required speedo calibration
change!
SC
December 2006 77
|