This is only a preview of the November 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 "Build A Radar Speed Gun, Pt.1":
Items relevant to "DC Relay Switch For High-Current Loads":
Items relevant to "LED Tachometer With Dual Displays, Pt.2":
Items relevant to "PICAXE Net Server, Pt.3":
Purchase a printed copy of this issue for $10.00. |
LED Tachometer
Com p le t in g t h e c on s t r uc t ion &
ch a n gin g t h e s e t t in gs
Pt.2: By JOHN CLARKE
Setting up the LED Tacho mainly involves
stepping through and reprogramming the
default software settings in the PIC to suit
your vehicle. Here’s how it’s done.
H
AVING COMPLETED the PC
board assemblies and made up
the connecting cable as described
last month, it’s now time to test the
tachometer. However, before applying
power, check that all parts are in their
correct locations and are correctly
oriented. Check also for any solder
shorts between the board tracks and
IC pads.
Do not connect the display PC board
to the main board yet – that step comes
later, after the initial voltage checks. In
addition, the PIC micro (IC3) should
be left out of its socket.
Once you are satisfied that every80 Silicon Chip
thing is correct, apply power (12V DC)
to the main PC board and check that
pins 4 & 14 on IC3’s socket are at +5V.
That done, monitor the voltage at TP1
(with respect to 0V) and check that this
voltage can be varied from about 2-5V
using trimpot VR1.
If this checks out, switch off the
power and install IC3 in its socket –
see Fig.5 last month. Make sure that
this IC is oriented correctly; ie, with
its notched end towards the adjacent
100nF capacitor.
Next, connect the display board to
the main board using the IDC cable,
then set VR1 fully anticlockwise and
VR6 fully clockwise. Trimpots VR2,
VR3, VR4 & VR5 should all be set to
mid-position.
Apply power and you should be
greeted by a single “0” on the digital
display (ie, on the righthand digit). In
addition, LED1 in the bargraph should
light. If this does not happen, switch
off immediately and check for assembly errors (ie, parts placement, faulty
or missed solder joints, solder shorts
between IC pads, etc).
Testing the displays
Assuming everything is OK so far,
you can now test the displays by
switching off and then pressing the Up
switch (S3) while you re-apply power.
If you keep this switch pressed, the
display should show all “eights”, with
the two far-left decimal points also
lighting. In other words, you should see
8.8.88 (do not expect the two righthand
decimal points to light).
siliconchip.com.au
At the same time, each LED on
the circular bargraph should light in
sequence, followed by the shift LED
when the bargraph sequence is completed. The lighting sequence should
then start again.
Now release the switch – the display should now show a “1” and the
unit will be placed in the settings
mode. To exit from this mode,
simply switch off and re-apply
power without pressing the Up
switch.
If any of the LEDs fails to
light, check its orientation and
the soldering. Check also for
broken tracks or shorts between
pads and tracks. Alternatively, the
LED itself may be faulty.
Operating The Tacho From 24V DC
Want to operate the LED Tachometer and DC Relay Switch from 24V DC?
Here’s how to do it:
Tachometer
•
•
•
Change the 220W resistor feeding zener diode ZD1 to 1kW 1W
Increase the voltage rating of the 100mF 16V capacitor at the input of
regulator REG1 to 35V
Increase the voltage rating of the 470mF 25V low-ESR capacitor following D1 to 35V
DC Relay Switch
•
•
•
Use a 24V relay instead of a 12V relay – eg, the Altronics S 4208A 24V
30A relay (Jaycar do not have a 24V version).
Increase the voltage rating of all capacitors to 35V.
Change the 2.2kW resistor in series with LED1 to 4.7kW 0.25W.
Dimming response
The next step is to adjust the dimming response but first adjust VR1 so
that the display is reasonably bright.
You can do this using just the “0”
display on the righthand digit to judge
the brightness or you can use the preceding display test mode to light all
the display segments.
There are two sets of dimming controls and these allow you to balance
the segment brightness on the 7-digit
displays. This is necessary because
the top and bottom segments of each
display are driven by different driver
ICs.
Begin by adjusting VR2 and VR3 so
that the top segments have the same
brightness as the bottom segments. In
practice, you should not need to vary
these much from the previously set
half-way position. Do not turn these
trimpots fully anticlockwise, otherwise the dimming effect will be lost.
Trimpot VR6 sets the dimming
threshold – ie, the ambient light level
where dimming begins. You can simulate this by placing your finger over
the LDR. It’s just a matter of turning
VR6 so that the displays begin to dim
as the LDR is shadowed. That done,
cover the LDR completely and adjust
VR4 & VR5 to set the minimum display
brightness.
Changing the settings
As mentioned, the various settings
for the tachometer are changed using
a special mode of operation (ie, the
“settings” mode). As described above,
this mode is invoked by holding down
the Up switch and simultaneously applying power to the unit (if this switch
siliconchip.com.au
is not pressed, the tachometer operates
in “normal” mode).
Initially, the unit will go through the
display test cycle just described and
this is repeated for as long as the Up
switch is pressed. Releasing the Up
switch then causes the display to show
a “1” and invokes the settings mode.
The Green Mode LED will also be lit
and this indicates that the display is
showing the current mode selection
(the default is mode 1). You can now
change the mode by using the Up or
Down switches to select from mode 1
through to mode 13.
For each mode, you can force the
display to show its current setting by
pressing the Toggle switch. During this
time, the Red settings LED will light
and the Mode LED will be off. The
settings are changed by using the Up
and Down switches
Basically, you have to step through
and set each mode in turn. These
modes and their options are as follows:
Mode 1 – No. Of Cylinders: enter in
the exact number of cylinders for a
4-stroke engine (1-12 cylinders). In
operation, each cylinder in a 4-stroke
engine fires once every two-engine
revolutions. This means that a 4-cylinder 4-stroke engine delivers two
pulses per revolution to the tachometer, while 6-cylinder and 8-cylinder
engines respectively deliver three and
four pulses per revolution.
A selection of “11” (or “7”) should
be made for a 2-cylinder asymmetrical
4-stroke motorcycle engine, where the
firing spacings between each cylinder
are uneven. This gives a steadier RPM
reading compared to using the 2-cylinder option. Similarly, use a “9” setting
for an asymmetrically fired 3-cylinder
4-stroke engine.
Two stroke engines are also catered
for. For these, simply use a cylinder
number that’s double the actual number of cylinders. For example, select
“2” for a 1-cylinder 2-stroke, 4 for a
2-cylinder 2-stroke, etc.
Mode 2 – Red LEDs: this setting refers
to the number of red LEDs used for the
red line. During construction, you may
choose how many red LEDs to use and
these are placed at the clockwise end
of the bargraph display. The number of
LEDs is nominally set at “5”, however
any number from 0-10 can be accommodated.
Mode 3 – Red Line: this mode is used
to set the maximum (or red-line) RPM
recommended for your engine. The
default setting is 9000 RPM but you
can alter this in 100 RPM steps from
0 RPM to above 30,000 RPM. Note
that this display is shown in a x1000
RPM format. So 9000 RPM will be
shown as 9.00 and 10,000 RPM will
be displayed as 10.00. The tachometer
will light the first of the red LEDs at
the red-line RPM.
Mode 4 – RPM/LED: this mode shows
the RPM increment for each LED in
the bargraph. It is automatically recalculated when ever the number of
red-line LEDs is changed (see mode 2)
and when the red line RPM is changed
(see mode 3).
The calculation subtracts the num
ber of red LEDs from the total of 32
November 2006 81
Table 1: Tachometer Settings
Mode
Possible Settings
Notes
1. Cylinder Number
From 1-12
Select exact number for a 4-stroke engine or use twice the cylinder number
for a 2-stroke engine. Select 11 (or 7) for an asymmetrical 2-cylinder
4-stroke engine, 9 for an asymmetrical 3-cylinder 4-stroke and 6 for a
3-cylinder 2-stroke.
2. No. Of Red LEDs
From 0-10
Allows changes to red-line bargraph display length.
3. Red-Line RPM
From 0 to above 30,000 RPM
Sets red-line RPM at first red LED.
4. RPM/LED
Automatically changed
No manual adjustment. Automatically adjusted with changes to Modes 2
and 3.
5. Shift Light RPM
From 0 to above 30,000 RPM
If not required, set RPM well above red-line RPM.
6. Limiter RPM
From 0 to above 30,000 RPM
Limiter output changes at limit RPM (see mode 12).
7. Hysteresis
0-255 RPM
Prevents LEDs flickering on and off at threshold.
Set at less than the RPM/LED value from mode 4.
8. Display Update
0-510ms in 2ms steps
Sets digital display updates to a comfortable rate.
9. Display Format
0, 1, 2
1: 9999 RPM, 2: Decimal shift from 9.999 to 10.00, 3: 9.99 to 10.00.
10. Fixed Digits
0, 1, 10
Use 0 for 1 RPM resolution; 1 to fix units digit at 0 (10 RPM resolution); 10
to fix units and tens digits at 0 (100 RPM resolution).
11. Dot or Bar
0 or 1
Use 0 for dot bargraph display, 1 for continuous bargraph display.
12. Limiter Sense
0 or 1
Use 0 to set limit output normally low (0V). Use 1 to set limit output normally
high (ie, +5V).
13. Limiter On Period
0-510ms in 2ms steps
Sets the minimum time that the limiter output is active.
LEDs used in the bargraph and divides
this number into the red-line RPM.
This then sets the calibration of the
tachometer so that the first red LED
lights at the correct red-line RPM.
As a result, the number of red LEDs
determines the total RPM range of
the tachometer. This “RPM per LED”
value is set automatically and cannot
be changed manually.
Mode 5 – Shift Light: this mode allows
the shift-light RPM to be set. It can
be altered in 100 RPM steps from the
default value of 8000 RPM, over the
range from zero to above 30,000 RPM.
The setting is in a x1000 RPM format;
eg, 8000 RPM is displayed as 8.00.
Mode 6 – Limiter RPM: this mode sets
the limiter RPM. In operation, the
limiter output changes when the measured RPM goes above this setting and
the output level depends on the sense
setting (see mode 12).
82 Silicon Chip
This setting can be altered in 100
RPM steps from the default of 9900
RPM over a range from zero to above
30,000 RPM. Once again, the display
is in a x1000 RPM format; eg, 10,000
RPM will be displayed as 10.00.
Mode 7 – Hysteresis: this setting controls the way the LEDs light in the
bargraph. As the RPM increases, successively higher LEDs will light up
but at the threshold RPM where a LED
just lights, there will tend to be some
flicker as engine RPM varies slightly
(ie, the LED rapidly switches on and
off). To prevent this, you can add hysteresis. The hysteresis does not affect
the RPM at which each LED will light
with rising RPM but it prevents the
last lit LED from extinguishing unless the RPM drops by the hysteresis
RPM setting.
The default hysteresis setting is 50
RPM and this can be altered in 1 RPM
steps from 0-255 RPM. Note that the
hysteresis value must be less than the
RPM/LED value (see mode 4).
Mode 8 – Digital Display Update Period:
the LED bargraph is updated every
1ms but this is much too fast for the
digital display to be read if there are
any RPM changes. As a result, the
digital display update is slowed down
to a more comfortable rate.
Typically, a 200ms update period (or
five changes per second) is suitable. It
can be altered from the default setting
of 250ms in steps of 2 from 0-510ms.
Mode 9 – Display Format: this adjustment is mainly to cater for engines
that rev above 10,000 RPM. The initial
setting of “0” sets the display to show
RPM from 0-9999 RPM. Above this figure, the display shows a “0” for 10,000
RPM, “1000” for 11,000 RPM etc. Use
this setting for engines that do not rev
above 10,000 or which only occasionsiliconchip.com.au
Fig.8: this diagram shows how to make the bracket and rear panel for the
display housing, while the cross-section diagram at left shows how the
display assembly goes together.
ally rev to this RPM level.
For engines that do rev above 10,000
RPM, a “1” or “2” setting will be best.
The “1” setting shows the RPM with a
shifting decimal point. Below 10,000
RPM the display will show, for example, 9.999 RPM (ie, 9999 RPM), while
at 10,000 RPM and above the display
decimal point will shift to the right
and show the RPM using two digits
for the 1000’s value.
For example, at 10,000 RPM the
display will show 10.00.
siliconchip.com.au
This is the rear panel (inside view) prior to mounting the PC board. Note
the three nuts soldered around the periphery.
November 2006 83
The PVC tubing is fitted with a neutral-tint filter and is secured to the
PC board and rear panel assembly using three Nylon screws. A black
display mask made from film ensures that only the LEDs are visible.
If you don’t want the shifting decimal point, select “2”. This will fix the
decimal point for two 1000’s digits
so, for example, 9999 RPM will be
displayed as 9.99, while 10,000 RPM
will be displayed as 10.00.
Note that for a “2” setting, resolution
is reduced to 10 RPM (ie, there’s no
units digit). Similarly, for a “1” setting,
the resolution is reduced to 10 RPM
for RPM values above 9999.
Mode 10 – Resolution: in some cases,
displaying the RPM to 1 RPM resolution will only be a distraction since
the engine may never be stable enough
to keep this digit steady – even at a
constant throttle. In this case, you
can select a “1” for this mode so that
the far righthand digit always shows
a zero (ie, the resolution is reduced to
10 RPM). Note that this won’t change
the display for a “2” setting in Mode
8, because the units digit is not shown.
Alternatively, selecting “10” in this
mode sets both the units and tens digits to 0. The resolution for the digital
display will then be 100 RPM.
Mode 11 – Dot or Bargraph: you use
this mode to select whether the LED
bargraph operates in dot mode (ie, one
84 Silicon Chip
You will have to drill and cut suitable holes in the rear panel to accept the
power supply and input signal wiring and the IDC cable header.
LED lit at any time) or as a continuous
bargraph. Select a “0” for dot mode or
a “1” for continuous bargraph mode.
Mode 12 – Limiter Sense: this mode
selects the output sense of the limiter. If “0” is set, the limiter output is
normally at 0V and goes to +5V when
the RPM rises above the limit setting.
Conversely, if “1” is set, the limiter
output is normally at +5V and goes to
0V when the limit setting (set in Mode
6) is reached.
siliconchip.com.au
Connecting A Rev Limiter To The LED Tachometer
The limiter output from the tacho
meter can optionally be used to drive
a separate circuit that limits the maximum engine RPM. You can either use
an ignition control circuit to do this or
a fuel control circuit.
Let’s take a closer look at both
these options.
(1) Ignition Control Limiting
An ignition limiter control was published in SILICON CHIP for April 1999.
Called a “Rev Limiter”, it’s suitable
for use with cars that have a single
ignition coil.
When the rev limit is reached, the
tachometer’s limit output activates
the engine limiter, which then acts
to reduce the number of sparks per
revolution.
Note that you don’t have to use the
whole circuit from the Rev Limiter. Instead, you only have to use the Ignition
Switcher circuit that was assembled
on the separate PC board.
This Ignition Switcher uses a single
555 timer IC and several transistors
to drive a high-voltage Darlington
output transistor. When the rev limit
is reached, this transistor shunts out
the main switching transistor in the
car’s ignition system for about 50%
of time, thus reducing the
engine power and thereby
limiting the engine RPM to
the red-line.
The two circuits are
easy to marry – all you
have to do is connect the
limit output from the LED
Tachometer directly to the
terminal marked “From Rev
Limit Controller” on the Ignition
Switcher. A suitable value for C1 must
be chosen for the Ignition Switcher
from the table published in the April
1999 issue. This sets the requisite
Mode 13 – Limiter On Period: this sets the
minimum period that the limiter output is active in order to reduce engine
RPM to a point below the limit setting.
We suggest experimenting with the on
periods at a low RPM limit setting and
then altering the RPM limit (in Mode
6) to its final value afterwards.
OK, that completes the setting up
siliconchip.com.au
Fig.9: here’s how to wire the tachometer to the DC Relay Switch board
to provide fuel-cut limiting of engine
RPM.
number of sparks that are blocked out
during the limiting action.
Note that if the LED Tachometer
derives its input signal from the coil, it
will sense that the RPM has dropped
as soon as the coil is prevented from
“sparking” via the limiter action. This
means that the limit action may not
be as smooth as it would be if the
tachometer signal were derived from
a different source, such as the tacho
meter output from the ECU.
The limit output from the tachometer
will remain low to disable the spark for
the period that you select. A value of
300ms should provide sufficient time
for the limit action to take place. Note
that you must set the tachometer’s
limiter sense to a “1”, so that the limiter
output is normally at 5V and goes to
0V at the limit point.
(2) Fuel Cut-Out Limiting
A suitable fuel cut-out circuit is
published elsewhere in this issue of
SILICON CHIP. It’s called a “DC Relay
Switch” and it can be used with the
procedure. Now let’s complete the
construction
Tachometer housing
If you have an old car, you may
be able to install the display board
within the existing instrument cluster.
Depending on the car, it could either
be fitted into a blank space or used
tachometer’s limit output to switch off
the supply to the fuel injectors.
Note that it is suitable only for cars
with injectors that are electrically
driven (as used in most cars).
The tacho’s limiter output drives the
relay board as shown in Fig.9. When
the red-line limit is reached, the normally closed (NC) relay contacts open
and interrupt the positive supply rail
to the fuel injectors.
The unit is easy to install – just
break the +12V supply lead to the
injectors and connect the supply side
to the relay’s COM (common) terminal.
The NC (normally closed) contact is
then connected to the injectors.
Note that you must set the tachometer’s limiter sense to “0” (in Mode
12), so that the limiter output is normally at 0V but goes to +5V at the limit
point. You may need to experiment
with the limiter on period (set up in
Mode 13) for best results. Start with
a period of 100ms and decrease or
increase this value until you are happy
with the limiter action.
to replace an unused instrument (eg,
a clock).
Alternatively, the display board can
be built into a small cylindrical housing (see photos). This can be mounted
inside the car by attaching it to the
windscreen using a suction cap, or it
can be fastened to the dashboard via
a custom mounting bracket.
November 2006 85
Fig.10: the LED Tachometer can derive its input signal from a variety of trigger sources, as shown here. In most
modern cars, you will be able to use the tachometer output signal from the engine control unit (ECU).
A suitable housing can be made using a 90mm-diameter PVC pipe cut to
a length of 21mm. In addition, you will
need a 90mm-diameter galvanisedsteel plate for the rear panel and this
should be cut and drilled as shown
in Fig.8.
Three M3 nuts are then soldered
around the circumference of this disc
in the locations shown. Having done
that, carefully mark out and drill three
3mm-diameter countersink in the PVC
tube, to exactly line up with these nuts.
These holes must also be positioned
5mm in from the rear edge of the tube
and should all be countersunk using
a slightly oversize drill.
Be sure to accurately position these
holes around the circumference of the
PVC tube, so that they line up with the
nuts on the rear plate.
The IDC cable passes through a slot
in the edge of the plate. This is made
by making two cuts and then folding
the edge over to as shown in one of
the photos.
That done, fit four M3 x 6mm-long
tapped Nylon spacers to the four inner
86 Silicon Chip
holes marked “X” on Fig.8 and secure
them using M3 x 12mm Nylon screws.
The PC board can then be mounted
on these spacers and secured using
Nylon nuts.
The next job is to make up the aluminium bracket shown in Fig.8. This
bracket is attached to the rear plate using M3 Nylon screws, nuts and washers and is fitted with a suction cap to
secure the display to the windscreen.
You will have to bend the bracket by
20-30° before attaching it to the end
plate, to compensate for the rake of
the windscreen.
Note that it may also be necessary to
fit a Nylon washer between the bracket
and the rear panel at each mounting
point, so that the bracket clears the
rear lip of the PVC tube.
Alternatively, you can fashion a
suitable bracket to attach the display
to the dashboard.
All that remains now is the final assembly. The cross-sectional diagram in
Fig.8 shows how it all goes together.
As with the rear plate, the neutraltint front display filter is also 90mm
in diameter and should be a tight fit
into the PVC tube, so that it stays in
place. Apply a couple of small blobs
of silicone sealant to the inside rim to
secure it in place if it’s a loose fit.
If necessary, a black display mask
(made from film) can be used to blank
out all but the LED displays, so that
the PC board and other components
cannot be seen through the filter. This
will most likely be included in any kits
supplied by retailers but if not, you
can download the artwork file from
the SILICON CHIP website and print it
out on clear film.
Finally, the PC board and plate assembly can be pushed into the PVC
tube and secured using three M3 x
12mm countersink Nylon screws.
Installation
The first job here is to mount the
control box in a suitable location.
This needs to go somewhere under the
dashboard in a car or inside the side
panels of a motorcycle (use silicone
sealant to waterproof the cases).
Power for the unit can be derived
siliconchip.com.au
Want cheap, really
bright LEDs?
We have the best value, brightest LEDs
available in Australia! Check these out:
Luxeon 1, 3 and 5 watt
All colours available, with
or without attached
optics, as low as
$10 each
Low-cost 1 watt
Like the Luxeons, but much lower cost.
•Red, amber, green, blue
and white: Just $6 each!
Lumileds Superflux
These are 7.6mm square and can be
driven at up to 50mA continuously.
•Red and amber: $2 each
•Blue, green and cyan: $3 each
Asian Superflux
Same as above, but much
lower cost.
•Red and amber: Just 50 cents each!
•Blue, green, aqua and white: $1 each.
The IDC cable emerges from
the display unit via a 15mmwide slot in the rear panel. At
top right is a close-up view of
the bracket and suction-cup
assembly which allows the
unit to be easily attached to a
car’s windscreen.
from an ignition-switched +12V supply, along with an earth (ie, chassis)
connection. In most cars, you will be
able to make the +12V connection at
the fusebox. Connect to the fused side
of the switched +12V supply and use
automotive cable and crimp connectors to make the connections.
Depending on the car, the input
signal for the tachometer can be obtained from the switched (negative)
side of the ignition coil primary, from
a reluctor or from a tachometer signal
provided by the engine control unit
(ECU). It’s also possible to use the
signals from a Hall effect trigger and
from optical triggers. Fig.10 shows all
the options.
In most modern cars, you can use the
ECU’s tachometer signal (C), in which
case the link on the control board
should be fitted to the LK2 position
(ie, to select a low-level input).
The link should also go in the LK2
position if you are deriving the signal
siliconchip.com.au
from a Hall effect sensor (E) or from
an optical pick-up (F & G).
Alternatively, fit the link in the LK1
(high-level signal) position selection if
the signal is derived from the switched
side of the ignition coil (A or B). This
selection should also be suitable for
most reluctors (D).
Note that you will need to experiment to determine which lead to use
for a reluctor. A reluctor has two leads
and only one will have a signal that’s
suitable for driving the tachometer. If
the tachometer only operates at higher
revs and stays at 0 RPM at lower revs,
then the reluctor signal level may not
be high enough for reliable triggering.
In this case, change the link to the LK2
position.
Note also that if the tachometer’s
reading is erratic when connected to
an ignition coil, try adding the second
47nF capacitor. In stubborn cases,
this 47nF capacitor may need to be
SC
increased to 100nF.
Go to www.ata.org.au or call
us on (03)9419 2440.
Serial-to-TCP/IP
Converters
from
TRUSYS
Trusys BF-430 & BF-450 universal serial device
servers allow your industrial serial devices –
such as PLCs, flow meters, gas meters, CNC
machines and biometric identification card
readers – to be monitored from your network.
They support web management & firmware
upgrade, while PPPoE & DDNS protocol allows
Internet connection without static IP. Event
alarm trigger is supported using e-mail & SMS
(Short Message Service) to do real-time
management for your system.
Applications:
] Factory automation ] Hospital automation
] PLC instrument control ] Access control
and security ] Time recording system
For more information, call, fax,
email or visit our website!
TRUSYS
95 McCanns Rd Mt Duneed Vic 3216
Tel: 0428 282 222 Fax: 03 5264 1275
Email: sales<at>trusys.com.au
www.trusys.com.au
November 2006 87
|