This is only a preview of the July 1999 issue of Silicon Chip. You can view 36 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 "A 10µH to 19.99mH Inductance Meter":
Items relevant to "An Audio-Video Transmitter":
Articles in this series:
Items relevant to "An X-Y Table With Stepper Motor Control; Pt.3":
Purchase a printed copy of this issue for $10.00. |
Last month, we presented
part 1 of this 2-part article
on the Programmable
Ignition Timing module
which is teamed up with
our High Energy
Ignition System, as
described in the June
1998 issue. This month
we give the details of
installation and
programming.
By ANTHONY NIXON
Pt.2: Installation & Programming
A
S WE NOTED LAST month,
do not attempt to hook up the
PIT module to the High Energy
Ignition (HEI) system until you have
had the HEI system running in your
car for at least a few weeks. This is
good practical advice, as a number of
constructors have installed the two
systems straight into their cars and
then had a torrid time trying to get it
all working.
So now we assume that you have
the HEI installed and working and
that the PIT module has been assem60 Silicon Chip
bled and the initial checks have been
performed.
The exact installation of the PIT
module will depend on your particular vehicle but it should be somewhere not too obvious. Don’t mount
the unit in the engine compartment
though, as the parts are not rated for
high temperatures. The keypad can
be removed from the PC board after
programming if you wish, as an added
security measure.
Be sure to run all the wiring in a
professional manner, using automo-
tive cable and connectors to ensure
reliability.
HEI connections
You will need to make five wire
connections from the PIT module
to the HEI board, as shown in Fig.8.
The +12V supply from the ignition
switch is fed to the HEI board, which
then supplies 12V and 0V for the
PIT module. A +5V connection is
taken from the 78L05 (REG1) on the
PIT module to the HEI to power the
MC3334P chip. Two other wires are
used to connect the “Trigger In” from
the HEI board and the output from the
PIT module to pin 5 of the MC3334P
on the HEI board.
DO NOT connect a separate ground
wire from the PIT module to the vehicle chassis. If the ground wire from
the HEI board goes open-circuit, the
high coil currents will try to flow
through the small PC board tracks
on the PIT module, possibly causing
them to burn off and damage the ICs.
Vacuum switch
Fig.9 shows the mounting details
for microswitch S1. It is mounted on
a rightangle bracket which is attached
to the vacuum actuator. The arm of the
microswitch sits in a slot cut into the
vacuum actuator and in the absence
of vacuum, is normally held down.
When vacuum is present, the actuator
moves upward and the microswitch
arm releases.
Be sure to connect the leads to the
microswitch exactly as shown; ie, the
lead from pin 3 of the PIC goes to the
contact marked “NO”). As mentioned
previously, the advance plate in the
distributor must be clamped with the
weights in the outward position. If
you do not wish to use the electronic
vacuum advance, then you can leave
the original setup as is and leave the
vacuum advance input (RA4) disconnected.
Another use for the vacuum advance input is to interface it to the
Knock Sensor project, as published in
the April 1996 issue of SILICON CHIP.
The filtered output from the knock
sensor is fed to an LM311 comparator.
When this voltage goes higher than
that preset on the inverting input pin
3, the output at pin 7 will go high.
When the PIC detects this high it will
retard the ignition by an amount set
This view shows the assembled PC board without the keypad. The keypad plugs
into the connector located near the bottom edge.
by the user. Fig.10 shows the circuit.
In effect, it works in the opposite
manner to which it was intended. As
the output of the LM311 is open-collector, it provides compatibility between the 8V circuitry of the Knock
Sensor and the 5V supply of the PIT
module. Note: this circuit arrangement has not been tested on a vehicle.
Rotor contact modification
Normal ignition advance in a conventional distributor is achieved with
a mechanical setup using bob weights
and springs and the amount of advance depends on the throttle opening and engine RPM. The changes in
advance also change the position at
which the rotor button passes by the
spark lead contacts in the rotor cap
when a spark is produced. To cater
for this, the end of the rotor button
contact is usually flared so that it is
able to conduct the high voltage to
the spark plug contacts over the full
advance range. Fig.11 shows what is
required.
The PIT module has 45° of advance
JULY 1999 61
Fig.8: use this diagram when connecting the PIT module to the HEI system.
available. This means that your rotor
button may need to be modified so
that it will stay in contact with the
spark lead connections over this advance range.
Remember that we are talking about
45° of crank advance. This translates
into 22.5° of distributor advance because the distributor cam turns at half
the speed of the crankshaft.
Therefore the flared end of the rotor
button must be elongated to function
over 22.5° and possibly more, if the
62 Silicon Chip
original vacuum advance is left connected. If the extension is too narrow or too wide, then a spark might
be missed or worse, the spark may
“jump” to the wrong spark contact,
causing misfiring. Fine tuning this
part of the project may require a little
trial and error to get it right.
Initial timing setup
When the engine is first started,
the PIT module retards the ignition
by 45 crank degrees (22.5 distributor
degrees) and stays constant at this
value until the engine RPM reaches
the user programmed MIN RPM value.
The timing will then begin to advance
at the programmed rate.
Before attempting to modify the
distributor or change its position,
make a note or mark the position it is
currently in. In last month’s article,
it was mentioned that the distributor
is modified by wiring its advance
weights in the fully out position and
the vacuum advance plate is clamped
Fig.9: the vacuum actuator is modified to operate a microswitch. At low vacuum, the microswitch arm is held
down. Conversely, when manifold vacuum is high (ie, at light engine loads), the microswitch arm is released.
so that it cannot move. This will give a
certain amount of advance from your
base setting.
Use a protractor to find out how
much “distributor” advance this
is and subtract it from 22.5. If the
answer is positive, advance the dis
tributor from its original position by
this amount. Then when the engine
starts, the PIC will retard the timing
back to the original base setting and
begin advancing it again as the RPM
rises. If the result was negative, the
advance value that your engine gives
is greater than the advance range that
this system can cater for and may
not work.
When the ignition is timed (using
a timing light), the vacuum advance
must be disabled. This is accomplished by removing and blocking
off the vacuum hose so that it has no
effect on the vacuum switch.
Static timing
To time the engine with the engine
stopped (ie, static timing), turn the
crankshaft to the correct position,
then rotate the distributor until the
LED just turns on. This indicates that
the points have just opened. The LED
will be off when the PIC detects that
the points are closed. This method
will not work with a reluctor pickup.
Note that because the LED drive
signal frequency is proportional to
the engine RPM, this signal can be
used to drive a tachometer.
Programming
There are nine parameters that
must be programmed into the PIC to
make up each data set. Every parameter, as well as the correct number
of digits for these parameters, must
be entered. The PIC will monitor the
digit entry and display each numerical keypress.
After the last digit of the last parameter has been entered, only the
centre segment of the display will
be illuminated. If this segment fails
to light, then you have not entered
enough data. If the segment lights
before you have finished, then you
are trying to enter too much data. In
Table 1: Data Set Contents
Parameter
Digits
Example
Mi n RPM
4
0800
Mi d RPM
4
3000
Mi d Advance
2
20
Max RPM
4
500 0
Max Advance
2
30
D w el l
2
20
Vacuum Advance
2
10
C yli nders
2
06
Security Code
2
99
either of these two cases, you must
enter the complete set of data again.
You will notice that the data for the
MIN RPM and Cylinders both have
leading zeros. The MIN RPM value
is allocated four digits, so four digits
must be entered. Similarly, the Cylinders value is allocated two digits,
so two digits must be entered.
You cannot enter an RPM value
that is lower than a previous RPM
value. For example, MID RPM cannot
be lower than the MIN RPM value
of 0800. The PIC has two internal
advance ranges from 30 to 300 RPM
and then from 300 RPM to the MIN
RPM value that you specify and for
this RPM range the timing is fully
retarded.
The MAX Advance value can be
greater than, equal to, or lower than
the MID Advance value. This allows
the second stage advance to have a
retarding effect, if needed, rather than
continuing to advance the timing until MAX RPM is reached. The negative
advance feature is common to both
data sets, which means that if you
want a negative advance setting for
one set, you must also have a negative
advance setting for the other. If one is
positive and the other negative, then
the positive data set will malfunction
(see the note at the end of this article).
The absolute minimum dwell
width that the software will generate
JULY 1999 63
Fig.10: this circuit could be used to enable the PIT module
to operate in conjunction with the Knock Sensor featured
in the April 1996 issue of SILICON CHIP.
Fig.11: the trailing end of the rotor button contact needs to be
extended and the leading edge trimmed to cope with the
modified operation of the distributor. Note that fine tuning this
part of the project may require some trial and error to get it
right.
64 Silicon Chip
is 1ms. In this system, this is the time
that the coil is OFF. If you enter a “00”
value for the Dwell, then a constant
1ms will be set automatically. If any
angle is calculated to be less than 1ms,
then 1ms will be used. In addition,
as the engine RPM increases, a point
may be reached when the dwell width
is calculated to be less than 1ms.
When the PIC detects this, it sets
the minimum to 1ms. The dwell
angle from any input device has no
effect on the system dwell times,
however it is good practice to set the
points normally, as specified by the
manufacturer. The PIC will debounce
the points signal, whether points or
electronic sensors are used.
If you do not wish to use the electronic vacuum advance then enter
“00” for that parameter.
After you enter a security number,
you must remember it. If you forget,
you will not be able to gain access to
the system unless you tediously go
through the 99 code combinations,
one by one. If you do not want to use
a security code then just enter “00”.
You must press the “*” key after
entering all the data as this tells the
PIC to run the calculations and store
the results into the EEPROM. If you
do not do this before removing power,
the new data set will be lost. Due to
memory restrictions, the PIC does not
do any error checking on entered data.
The Cylinder value and the Security Code are common to both data sets.
If you change the cylinder value in
one data set, then you must re-enter
the other data set with the new cylinder value as well and run the calculations again. For example, if you
entered 6 cylinders for data set one,
and afterwards you enter 8 cylinders
for data set two, then the calculations
will be wrong in data set 1 because
they were based on 6 cylinders.
You only have 45° of advance to
“play” with, so any data you enter that
goes outside this range may result in
erratic operation. The software can
handle an advance value plus a dwell
value greater than 45° but as soon as
the points open, the PIC will “chop”
the last timing sequence off in favour
of the new one when it becomes necessary for the coil to be switched off.
This may only result in a shorter
dwell time but it may also result in
misfiring. The software is trying to
cater for a wide range of operating
conditions, but it may not be able to
operate with values that are too far
out of the ordinary.
Operational modes
There are two modes of operation
for this system: Data Entry Mode and
Engine Run Mode. If you look at the
system flow chart featured in last
month’s article, you should be able to
follow how everything works.
If there is no data set stored in EEPROM for the current level, then the
system will power up in Data Entry
Mode and the centre display segment
will be lit. If there is data, then the
system will power up in Engine Run
Mode.
Data Entry Mode
The PIC will be waiting for a keypress to select a particular programming function. These are the ones that
are available:
Function Key
Read RAM 3
Read EEPROM 4
Enter New Data 5
Clear Display 6
Change Data Set 7
Display Data Set 8
Calculate/Store data *
Exit #
•
Read RAM - Key 3: After pressing
this key, repeatedly pushing the “*”
key will display the data stored in
RAM. Each parameter is separated
by a “-” character. If there is no data
in RAM then an error condition will
be displayed. Press key “#” to exit.
• Read EEPROM - Key 4: This transfers the current data set from EEPROM
to RAM. Any previous RAM contents
will be lost but the EEPROM contents
will remain unchanged. After pressing this key, repeatedly pushing the
“*” key will display the data now
stored in RAM. Each parameter is
separated by a “-” character.
If there is no data in the EEPROM
then an error condition will be displayed. Press key “#” to exit.
• Enter New Data - Key 5: After
pressing this button, a “0” will be
displayed and you can then enter a
new data set. From the example in
Table 1, you would enter the data as
follows:
080030002050003020100699
After the last “9” key is pressed, the
display will show “-” to indicate that
all data has been entered.
Because all timing is now controlled electronically, the advance plate inside
the distributor must be securely clamped in the fully-advanced position and its
advance weights wired in the fully out position. In effect, the Programmable
Ignition Timing Module retards the timing from the preset maximum to give the
correct value according to engine speed and load.
If a mistake is made while entering
the data set, you can press the “#” key
to abort. Press key “5” again to restart
the data entry process.
• Clear Display - Key 6:
“-” is displayed.
• Change Data Set - Key 7: This
key alternates between the two data
sets available. When data set one is
selected, “1” is displayed. Similarly,
when data set two is selected, “2” is
displayed.
You can alternate between the two
sets even though they do not have
data stored, but you will not be able to
start the engine if the selected set does
not have valid data. This key can also
be used while the engine is running
but only if both sets have valid data.
• Display Data Set - Key 8: This
key displays the currently selected
data set.
• Calculate/Store Data - Key *: When
this key is pressed, a set of engine operating parameters will be calculated
according to the data that was entered.
The results, along with the user data
in RAM will be stored into EEPROM
so that they are available each time
the ignition is turned on.
If there is no valid data in RAM an
error message will be displayed.
•
Exit - Key #: Pressing this key
terminates functions 3 and 4. If the
system is in Data Entry Mode waiting
for a function to be selected and there
is data available in the current set,
then the system will go into Engine
Run Mode and wait for the engine
to start. If the current data set is not
valid then the system will stay in Data
Entry Mode.
The error condition that is displayed is similar to a “?” character.
Quick programming review
(1) Turn Power on.
(2) Select data set – Key “7”
(3) Begin data entry – Key “5”
(4) Key in data –
eg, 080030002050003020100699
(5) “-” will be displayed
(6) Calculate/Store data – Key “*”
(7) Either enter other data set, back
to step 2, or press key “#” to allow
engine start.
Engine Run Mode
If the “#” key was pressed while in
Data Entry Mode with a valid data set
available, then the current data set
will be displayed, and the system will
wait for the engine to start.
If the system is powered up and
JULY 1999 65
Reprogramming Existing Chips
Any new software can be reprogrammed into your existing chips if they
are sent to the author with a $5.00 fee for postage, etc. There is one small
problem here. Originally the software was written for the PIC 16C84 which
only has 36 bytes of RAM. These chips are now obsolete and were replaced
by the newer 16F84s which have 68 bytes of RAM. The latest software
needs 38 bytes of RAM to operate so the 16C84s cannot be reprogrammed.
Programmed 16F84s are available and are still at the original $27 which
includes postage & packing.
Chips can be returned for reprogramming or ordered from: Anthony
Nixon, 8 Westminster Court, Somerville Vic 3912.
If you return the chip, please make sure it is properly packaged to prevent
mechanical as well as static damage, as no responsibility can be taken by
the author if a chip is damaged in transit.
There is some basic information about the ignition module as well as an
email link at http://www.picnpoke.com
the current data set is valid, then two
things can happen.
If there is no Security Number then
the software will wait for the engine
to start and the display will show the
data set that is being used.
If there is a Security Number then
the display will be blank and you
must type in the exact two-digit code
to unlock the controller. If the wrong
code is entered, then the software will
do nothing at all, so you must turn
the power off and start again. If the
correct code is entered, the software
t
bu
d
e
l
i
o
s
p
o
h
S
E!
C
I
R
P
F
L
HA
will wait for the engine to start and
the display will show the data set that
is being used.
While the PIC is waiting for the
engine to start, you can go into Data
Entry Mode by pressing key “9”. You
cannot do this after the engine starts.
When the engine is running, you
can alternate between data sets by
pressing key “7”. There must be valid
data in both sets for this to happen.
Problems with installation
The PIC is a pretty robust little chip
but it is sensitive to static electricity
and also to electromagnetic interference (EMI), so when handling the
chip try not to touch the pins. Do not
be tempted to try the project out on
the bench if it is connected to the HEI
module and a coil and spark plug.
The open spark will cause the PIC to
run erratically due to the EMI produced and will fool you into thinking
something is wrong.
Keep all of the PIT module wiring
away from the ignition coil as the
electrical noise produced here may
interfere with the PIC.
Negative advance addendum
Nearly all of the PICs that have been
supplied in the past with the negative
advance feature have a small white
dot on the top surface of the chip.
When using these chips, both data
sets must be programmed for either
positive or negative advance, not
mixed, or the positive data set will
treat the data as being negative and
give improper operation.
There was a great deal of time taken
to scrounge up enough memory to
change this so that this restriction no
longer applies. Either set can now be
positive or negative. The PICs programmed with this software will have
a coloured dot instead of white placed
SC
on the top surface of the chip.
14 Model Railway Projects
THE PROJECTS: LED Flasher; Railpower Walkaround Throttle;
SteamSound Simulator; Diesel Sound Generator; Fluorescent
Light Simulator; IR Remote Controlled Throttle; Track Tester;
Single Chip Sound Recorder; Three Simple Projects (Train
Controller, Traffic Lights Simulator & Points Controller); Level
Crossing Detector; Sound & Lights For Level Crossings; Diesel
Sound Simulator.
Our stocks of this book are now limited. All we have left are
newsagents’ returns which means that they may be slightly
shop-soiled or have minor cover blemishes.
SPECIAL CLEARANCE PRICE: $3.95 + $3 P&P (Aust. & NZ)
This book will not be reprinted
Order by phoning (02) 9979 5644 & quoting your credit card number; or fax the details to (02) 9979 6503; or mail your
order with cheque or credit card details to Silicon Chip Publications, PO Box 139, Collaroy, NSW 2097.
66 Silicon Chip
$
|