This is only a preview of the June 1999 issue of Silicon Chip. You can view 38 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 "An FM Radio Tuner Card For Your PC":
Articles in this series:
Items relevant to "An X-Y Table With Stepper Motor Control; Pt.2":
Items relevant to "Programmable Ignition Timing Module For Cars":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
This Programmable
Ignition Timing Module
is intended to be used in
conjunction with our
High Energy Ignition
System as described in
the June 1998 issue.
It allows you to
program the
ignition timing of
engines with points,
Hall effect or
reluctor
distributors.
By ANTHONY NIXON
T
his project was first introduced
in the March 1996 issue of
SILICON CHIP and it has proven
to be very popular: there are now
thousands of units in use.
This article updates the project and
clarifies the installation.
Since its introduction, the design
and software of the Programmable
Ignition Timing module have gone
through a number of changes to improve performance and the High Energy Ignition system was also updated
in the June 1998 issue.
These revisions have led to some
confusion as to how the system
should be connected and operated
and this is why we have decided to
56 Silicon Chip
update the project and completely
re-present it.
The Programmable Ignition Timing
module is a small PC board comprising just two ICs, a handful of other
components, a keypad and a small
display.
The simplicity and ease of construction of the circuit is made possible by
using a PIC 16F84 microcontroller.
Programming is simply a matter of
entering data with the keypad while
monitoring it on the display.
Nine parameters can be programmed into the module:
• The RPM at which ignition
advance begins
• Mid stage RPM
•
•
•
•
•
•
•
Mid stage advance
RPM limit
Rev limit advance
Dwell angle
Vacuum advance
Number of cylinders
A 2-digit security code
To make the module even more
useful, the second stage advance can
be either positive or negative and
you can store two sets of data which
can be alternated while the engine is
running.
The benefit of this is that you can
accommodate an engine that runs on
petrol or LPG and quickly change the
timing for these two fuels to get the
best possible performance.
Main Features
User programmable
Two stages of advance
Second stage advance can
be positive or negative
Keypad data entry
Security coded (2 digits)
Can store two sets of data
Tachometer drive output
Points or other sensor input
Automatic coil cutoff if motor
not running
7-segment LED display
LED indicator for initial
timing setup
Preset RPM limiting
Reproduced from the June 1998
issue of SILICON CHIP, the High Energy
Ignition system has proved to be a winner
– very good performance and highly reliable.
The programmable ignition timing module described here is designed to
directly interface with this HEI, although it can be adapted to other ignition
systems including the Multi-spark CDI described in September 1997.
Please note that while this project
has been very popular, it is not intended for high performance vehicles,
particularly those which already have
engine management systems.
What it does
Fig.1 shows how the Programmable Ignition Timing (PIT) module is
connected to the High Energy Ignition
(HEI) system. In essence, the signal
from the car’s points, reluctor or Hall
effect pickup in the distributor is
conditioned by the input circuitry of
the HEI system and we use the conditioned signal to trigger the PIT module. Depending on its programming,
each time the PIT module receives a
Fig.1: this diagram
shows how the
Programmable
Ignition Timing
module is connected
to the High Energy
Ignition system,
described in the
June 1998 issue of
SILICON CHIP.
JUNE 1999 57
trigger pulse from the HEI, it delivers
a delayed pulse to the HEI system to
fire the ignition coil.
Why are the ignition pulses delayed? In cars without engine management, the ignition timing (ie, the ignition advance curve) is controlled by
centrifugal weights in the distributor.
These cause the ignition timing to
advance as the engine RPM increases. In addition, a vacuum diaphragm
actuator mechanically increases the
advance as manifold vacuum rises.
When the PIT and HEI systems are
employed together, the car’s centrifugal advance mechanism is clamped
in the fully advanced position.
To do this, the advance weight
return springs are removed and the
weights themselves are wired so they
are held in the fully out position.
In addition, the moveable vacuum
advance plate must be clamped so
that it can’t move when the vacuum
actuator is removed.
Since the distributor is locked in
the fully advanced position, the PIT
module must provide a variable time
delay in order to allow the engine to
start and run.
In practice, it provides quite a lot
of delay when the engine revs are low
and less delay when the engine revs
are high. It also modifies the delay
depending on whether the vacuum
switch is open or closed.
How it works
Fig.2: the circuit is based on the PIC16F84 microcontroller. This processes
timing information from the car’s distributor (points, Hall effect, etc) and
varies the ignition timing accordingly.
58 Silicon Chip
Fig.2 shows the circuit of the PIT
module. The heart of the circuit is the
PIC 16F84 microcontroller. It calculates the delay period for each ignition
pulse, according to stored data which
has been previously entered via the
numeric keypad.
The keypad has four rows and three
columns (for 12 keys) and these are
connected to seven inputs on the PIC,
RB0-RB6; the columns to RB0-RB2
and the rows to RB3-RB6.
When operating, the PIC alternately
takes its RB3-RB6 outputs high and
low. When any key is pressed, this
low is then sensed by one of the
RB0- RB2 inputs and the PIC takes
the appropriate action.
For example, if key “0” is pressed,
then when RB6 is pulled high, it is
connected through the key to RB2,
which is normally held low by resistor R5.
RA4 (pin 3) is the vacuum advance
input and S1 is a microswitch that is
Fig.3: this flow chart diagram shows the PIT module functions.
activated by the vacuum actuator; ie,
the standard diaphragm unit fitted to
older distributors.
When the manifold vacuum is high,
S1 is held open and RA4 is pulled
high via resistor R8. Conversely,
when the manifold vacuum is low,
as when the accelerator is wide open,
S1 is closed and RA4 is pulled low
and this causes the PIC to retard the
ignition timing.
The 7-segment LED display is
driven from IC2, a 74HC164 serial to
parallel shift register. This receives
serial data from pin 17 (RA0) of the
PIC and it is clocked from pin 18
(RA1). It’s parallel data output drives
the 7-segment display to indicate
such things as errors, programmable
system variables and which set of data
will be used.
IC3 is an MC34064 undervoltage
sensing circuit and it is used to ensure
that the PIC resets reliably each time
the ignition is turned on.
An 8MHz crystal, in conjunction
with C6, C7 and R4, sets the clock
speed for the PIC, while LED1 is
driven from pin 13 (RB7) to provide
trigger pulse status. This LED will be
on when RA2 (pin 1) is low and off
when RA2 is high.
The power supply uses a series
diode (D1) for reverse polarity protection, a zener diode (ZD1) to clip
any large voltage spikes and a 5V
3-terminal regulator (REG1). The latter supplies the 5V rail for the ICs and
to the MC3334P on the HEI PC board.
There can be quite a lot of interference coming from the engine bay
via the wires connecting to the input
and output pins on the PIC. Diodes
D2-D7 together with resistors R17 to
R19 and capacitors C8-C10 help shunt
this interference back to the power
supply. The IN5819 diodes specified
are Schottky types and have a lower
JUNE 1999 59
Parts List
1 PC board, code 05406991,
74 x 70mm
1 12-key keypad
1 8MHz crystal
1 8-pin PC male connector
(6mm pins)
1 8-pin PC female connector
(6mm shroud)
1 14-pin wire wrap IC socket
1 18-pin IC socket (for IC1)
4 10mm plastic spacers
4 3mm x 20mm screws
4 3mm hex nuts
6 PC stakes
Semiconductors
1 PIC16F84 programmed
microcontroller (IC1)
1 74HC164 shift register (IC2)
1 MC34064 power-on reset
(IC3)
1 78L05 3-terminal regulator
(REG1)
1 1N4004 diode (D1)
6 1N5819 Schottky diodes
(D2-D7)
1 1N4745 16V 1W zener diode
(ZD1)
1 LTS312 common anode 7-segment LED display DISP1)
1 red LED (LED1)
Capacitors
1 100µF 25VW PC electrolytic
1 47µF 16VW PC electrolytic
3 0.1µF MKT polyester or
monolithic
3 .01µF MKT polyester or
monolithic
2 18pF ceramic
Resistors (0.25W, 1%)
6 10kΩ
1 2.2kΩ
8 1.5kΩ
4 330Ω
3 100Ω
1 22Ω
Note: the programmed 16F84
microcontroller can be purchased
for $27, including postage, from
Mr A. Nixon, 8 Westminster Court,
Somerville, VIC 3912.
Fig.4: two possible 2-stage advance characteristics which could be
programmed into the module. These could enable a car to run on
petrol or LPG, for example.
turn-on voltage and faster turn-on
times compared to normal diodes.
In operation, the PIT module retards the advance by 45 crank degrees
until the engine RPM matches the
minimum RPM value set by the user.
Then as the RPM rises above this
point, the programmed amount of
advance will be given. The timing is
calculated this way so that one data
set can have more or less advance
than the other.
Microswitch S1, if used, is operated
by the vacuum actuator. It operates
when the required vacuum is reached
in the intake manifold.
RPM limiting is achieved by missing every second spark when the maximum RPM value is reached. All other
variables are ignored until the engine
revolutions fall below this value.
HEI system change
As already noted, the PIT module
is teamed up with the HEI system
featured in the June 1998 issue of
SILICON CHIP.
When using the HEI with the PIT
module, the connection shown in
Fig.1 means that the collector of Q2
on the HEI PC board connects to pin 1
(RA2, trigger input) on the PIT board
and provides the PIC with timing
information. The PIT output, pin 2
(RA3), is connected to pin 5 of IC1
on the HEI board.
In this configuration, the output
from the MC3334P chip, pin 7, goes
low for the same duration that its pin
5 goes low, thus the spark and dwell
timing are both derived from the PIT
module and not the HEI board. A 5V
supply is taken from the PIT module
to power the MC3334P chip, to make
it compatible with the PIC.
Microprocessor functions
Instead of using look-up tables for
engine data, the program pre-calculates a set of variables based on the
data entered by the user and then
stores these into the PIC’s internal EE-
Table 1: Resistor Colour Codes
❏
❏
❏
❏
❏
❏
No.
6
1
8
4
3
1
60 Silicon Chip
Value
10kΩ
2.2kΩ
1.5Ω
330Ω
100Ω
22Ω
4-Band Code (1%)
brown black orange brown
red red red brown
brown green red brown
orange orange brown brown
brown black brown brown
red red black brown
5-Band Code (1%)
brown black black red brown
red red black brown brown
brown green black brown brown
orange orange black black brown
brown black black black brown
red red black gold brown
Fig.5: this shows
some timing
diagrams for a V8,
illustrating how the
unit delays or retards
the ignition timing
from a fixed setting.
PROM. The PIC uses these variables
to generate the appropriate advance
settings and therefore does not have
to do time-consuming calculations
while the motor is running.
The PIC’s ignition functions include monitoring the engine RPM,
advance timing, dwell pulse width,
maximum RPM detect, vacuum pulse
width and keeping a constant 45° retard below the minimum RPM point.
As these functions are dynamic and
are changing all the time, the PIC has
to continuously update new data at a
very fast rate.
It is interesting to note that to keep
track of all these functions, the PIC
uses about 50 words of code and takes
roughly 40µs to update everything.
Most of the program memory is taken
up by the user interface, while the
rest is used for data calculations, the
serial display and
keypad. It was quite a
task to fit all of these
functions into a chip
that has a mere 1K of
ROM.
When the PIT
module is turned
on via the ignition,
the PIC will turn
the ignition coil on,
via the HEI system.
If the motor is not
started after about
six seconds, the coil
will be switched off
but the PIC will still
wait for the motor to
be started. This eliminates the possibility of any damage to the coil caused
by leaving the ignition on without the
motor running. When the motor is
cranked over, the PIC will not allow
a spark to occur until it has received
four trigger pulses. This is to allow
the software to stabilise its timing
functions.
Fig.3 shows a flow diagram of the
functions of the PIC microcontroller.
The assembled PC board with and without the keypad. The keypad slots into the connector bottom centre of the righthand photograph. Note the IC socket used for the PIC processor – while they make life easy for constructors, in the harsh
automotive environment they sometimes give problems. Whether you use a socket or not is up to you.
JUNE 1999 61
Fig.6 (left): the
component
overlay for the
PIT module, with
keypad removed.
Fig.7 (right):
actual size
artwork for the
PC board.
Fig.4 shows two possible 2-stage advance characteristics which could be
programmed into the module while
Fig.5 shows some timing diagrams,
illustrating how the unit delays or
retards the ignition timing from a
fixed setting.
Construction
The PIT module is easy to build
and all the parts except for the micro-switch S1 are installed on the
PC board.
The component layout is shown
in Fig.6.
As always, check the PC board for
open circuit or bridged tracks before
you begin assembly. This done, fit
the three wire links followed by the
resistors, diodes and sockets for IC1
and IC2, then install the capacitors
and other components.
Depending on how the unit will be
mounted, you may choose to solder
the display directly to the PC board
or raise it by using an IC socket.
The keypad can be connected by
using a short length of ribbon cable
or it can be connected so that it can
easily be removed, by using a 7-pin
header plug and socket.
Take care with the placement of
the ICs, electrolytic capacitors and
the LED, as these components are
polarized. The keypad can be secured
to the PC board by using machine
screws and nuts with 10mm spacers.
Use nylon washers on the track side
of the board to prevent shorts.
Once the assembly is complete,
check all your soldered joints carefully and check the polarity of D1.
When you are satisfied that all is OK,
insert both chips and connect 12V to
the PC board terminals on the lower
right side of the board. The ground
connection is on the outside.
When you have done this the centre
segment of the display should light.
If this test fails, you will need to go
over the PC board again and check
for faults.
Next month we will cover the installation and programming of the module
but if you are one of those people who
just can’t wait and wants to get started,
there is a major step which must be
done first: that is to install and check
out the HEI system on your car.
Get it all going properly, according
to the procedure set out in the June
1998 issue. Naturally, this installation
will have no connections to the PIT
module.
When everything has been running
with the HEI installed for several
weeks, you are ready to proceed to
the PIT installation and programming.
SC
See you next month.
Table 2: Capacitor Codes
❏
❏
❏
Value
0.1µF
.01µF
18pF
IEC Code EIA code
100nF 104
10nF 103
18p 180
62 Silicon Chip
Again reproduced from the June 1998 SILICON CHIP, this photo shows an internal
view of the High Energy Ignition System. Your first step in building the
Programmable Timing Module is to get this ignition system working properly.
|