ECU functionality

The next thing I was curious about functionality wise was the ignition timing operation. Starting with the HEI module, I wanted to understand a bit deeper what was going on especially around how the timing advance was controlled. Here’s the basic 7-pin HEI module block diagram.

HEI1.jpg

I’ll focus on the R, E, and B pins on the HEI module,

The R pin is the reference pulse sent to the ECM. If the engine is turning, the HEI module continually sends this reference pulse to the ECM. The ECM uses the signal for ignition functions but also RPM, fuel injector timing and other functions. It’s a key signal the ECM needs to function. The important thing to remember about this signal is it’s always being sent to the ECM and the frequency changes with RPM.


The B pin is the EST bypass control. The bypass signal is zero volts during cranking (less than 400 rpm or 5 to 15 seconds), then there is 5 volts on this pin after the engine starts to signal the 7-pin module that it should use the signal on the R pin to control timing. When 5v is ‘not’ applied to this pin the HEI module is In bypass mode. Basically meaning the module is operating autonomously and not under the control of the ECM. The pick-up coil signal is the trigger signal for the ignition coil. When the engine is cranking below a predetermined threshold (400 rpm), the computer has no control over the timing. Only when RPM reaches the threshold speed, does the computer take over timing and 5v is applied to the B pin. At this point, the ECM is in full control of the timing advance.

HEI2.jpg



In starting (By-Pass) mode
HEI3.jpg


In run mode (ECM providing timing control)
HEI4.jpg



Pulses and other neat stuff:

The following is info from the Megasquirt site that goes in-depth describing the HEI and interfacing it to their ECM. I modified the section below some to be a bit more generic as I assume the GM ECM works in a similar manor.
http://www.megamanual.com/ms2/GM_7pinHEI.htm

More related info and ECM advance & dwell calculation details. http://www.megasquirt.info/HEIgn.htm

Another detailed HEI write up http://chevythunder.com/ignition_systems_hei_operation.htm

The 4-pin HEI uses a negative-to-positive transition, while the 7/8-pin uses a positive-to-negative transition (though this *might* have changed in some applications). Thus polarity of the reluctor signal is critical to proper function.
In the GM 7/8-pin HEI, the module converts the AC signal from the variable reluctor pick-up {on pins P & N} in the distributor to a 'square wave' tach signal {on pin R} suitable ECM.
HEI does not use the reluctor for dwell control, this is accomplished in the module. Dwell needs to be independent of RPM. Variable reluctor output is RPM dependent with regard to both its width and amplitude of its output. The only thing constant with a variable reluctor output is the location of the zero crossing point with respect to the passing tooth.
Be sure to get the variable reluctor pick-up wires connected properly. Reversing the variable reluctor sensor wires and thus the polarity of the sensor causes the leading voltage to go negative first and the electronics ignores the positive going transition. Thus trigger signal, if ever recognized, is the falling edge of the voltage as the end of the tooth passes.

The only way to get proper triggering at the center of the tooth is to have the positive ½ cycle first (tooth approaching) and the negative ½ cycle last.
The 7/8-pin HEI uses a "next cylinder" advance calculation method. That is, you get the square wave out of the module at (say) 10° BTDC which is used for cranking and limp home mode. To advance the timing ECM waits until the NEXT cylinder to fire to provide an altered signal to the coil.

Reference (tach) pulses come into ECM from pin R at 10° BTDC. At each reference pulse, the period between it and the previous reference pulse is calculated. The difference is used (with a time interpolation technique) to set up the timing pulse for the next ignition event. Specifically, the reference period is added to the time of the current pulse, a calculated amount subtracted for the advance, another amount subtracted for the dwell to determine the rise time.

When the signal is 'high', current flows. When the signal is pulled low, current stops, the magnetic field in the coil collapses, and a spark is produced. Thus, the HEI module fires on the 'trailing edge' of the advance signal. The advance signal is generated by ECM from the tach signal by modifying its duty cycle (pulse width). Larger duty cycles mean less advance, as the spark is delayed by a larger amount. The timing of the trailing edge determines the amount of advance: a longer pulse width means a more delayed, 'retarded' spark, while a shorter pulse width means an earlier 'advanced' spark.

heiest (1).gif

The paragraph above is the key part I was trying to figureout. There is not much out there on this. I figure if this is how the Megasquirt interfaces to the 7-pin module and controls the ignition advance, the GM ECM must send the same modified pulse width signal to the module as well.



Timing Advance Calculations for GM HEI Modules:
This info again is from the Megasquirt site and I assume the GM ECM timing is determined in a similar manor. I’m digging into that now.
In order to fire the coil, the coil must have a dwell period that ends when the advance timing for a spark is correct. The dwell itself must fall within certain limits, or the coil will overheat if dwell is too long, and produce a weak spark if the dwell is too short. So the spark is controlled by the start and stopping of current to the coil. In the MegaSquirtII code:

adv_deg = ign_table(rpm, kpa) + adv_offset + cold_adv_deg

heiest.gif MSIItime.gif

Note that the adv_deg is relative to the trigger, not to TDC. However, MegaTune's ignition table corrects for this, and you fill the table with values relative to TDC. Futhermore, the advance reported by MegaTune is with respect to TDC.

In any ignition system, all of the required events must take place within the time available:

time available = latency time + dwell time + advance

In the MegaSquirtII code, this is calculated as:

dtpred = charge_time + coil_dur + adv_us

It is important to note that we need to estimate dtpred in order to have the correct amount of igntiuon timing advance. The better we estimate dtpred, the more accurately our actual timing will reflect the table and other parameters.

The process of determining the timing events (coil charging and coil spark) is performed as follows:

first, MegaSquirtII predicts the amount of time until the next TDC reference pulse (dtpred). This is done using the time between the last two pulses, the amount by which that time has changed since the pulse before that (the first derivative - dtn), and the amount that the 'change' has changed (second derivative - ddtn).

The equations are:
dtn = tn - tn-1
ddtn = (dtn - dtn-1) / ((dtn + dtn-1)/2)
ddtn-1 = (dtn-1 - dtn-2) / ((dtn-1 + dtn-2)/2)
dddtn = (ddtn - ddtn-1)/((((dtn + dtn-1)/2) + ((dtn-1 + dtn-2)/2))/2)
ddtpred = ddtn + dddtn * dtn
dtpred = dtn + ddtpred * dtn = dtn + (ddtn * dtn) + (dddtn * dtn * dtn)

MegaSquirtII also uses a Kalman filter random error correction algorithm to filter out noises in the ignition signal. The Kalman filter correction is proportional to the difference between current dt2 and last predicted dt2.

Next, the desired amount of ignition advance, in engine degrees, is determined from the appropriate cell of the spark advance table, and converted to µsec based on the current speed of the engine. This value is adv_us.

Finally, the time required for ignition coil dwell (coil_dur) is calculated. In order to optimize both the spark energy and the coil life, MegaSquirtII controls both the firing point (ex. the trailing edge) as well as the charging point (the leading edge) of the signal to the coil. The pulse width of the square wave is the dwell, and it is held within specific limits by MegaSquirtII. Typically, dwell time is between 2.0 milliseconds and 4.0 milliseconds for most ignitions systems.

For the OEM HEI coils set the dwell to
3.5 milliseconds for an in-cap coil (7-pin module),
2.5 milliseconds for a small cap distributor with an external coil (7-pin module).

If the amount of desired dwell is longer than the remaining amount of time available (i.e. coil_dur + adv_us > dtpred, and charge_time = 0), the coil_dur time is shortened and the amount of time available is used (otherwise the timing would be increasingly delayed).
The coil is supplied with 12 volts when the charge_time has passed after the TDC signal from the distributor/crank sensor. It begins to charge. When a further time equal to coil_dur has passed, the current to the coil is shut off, and a spark is produced. Both charge_time and coil_dur vary based on engine rpm (dtpred), desired spark advance (adv_us + adv_offset), and dwell parameters.



 
Last edited:

Your going to have another college degree when you finish with this thread. ;)

You are digging up some great info!!!

 
YES a DARN IMPRESSIVE BIT OF INFO WITH GREAT GRAPHS AND DETAILS MOST GUYS HAVE EITHER OVER LOOKED OR IGNORED
 
MAT Relocation, does it do anything????

Interesting observation, I have seen a lot of info on the internet regarding relocation of the Manifold Air Temperature (MAT) sensor out of the plenum to the air filter plenum providing a cooler air signal to the ECM. This thinking is this tricks the ECM into advancing the ignition timing a bit and provides richer fueling. On the 87/88 TPI Vettes, I’m not sure that’s the case. I have been poking around in the actual ECM code and there are two places where the MAT temperature is programed.

One is the MAT sensor voltage hi/low ALDL code 23 & 25 determination programing.

The only other reference to the MAT temperature in the entire ECM code is in the EGR programing. The MAT variable is used to disable the EGR operation if MAT is below a certain temp.

That’s it, the MAT is not used in timing and fueling decisions at all..
Based on this, all the MAT relocation kits don’t do squat with improving performance related to timing and fueling. This is my observation only on 86/87 setups. On later L98’s and LT1’s I’m’ sure the MAT plays more in the ignition and fueling.
 
Have you found or read any work done by DR. J Bytor.
Used to read his posts. Knows C4 TPI.

Have you found the BIN FILE FOR TPI WOT FULL FUEL ENRICHMENT ?
AFR GOES TO 9.0-10.0 :1 FOR 3-5 SECONDS.
SO THE FIBERGLASS FLOORPAN DON'T CATCH ON FIRE FROM THE SUPER HEATED MAIN CATALYTIC CONVERTER.
WHY THERE IS A HIGH SPEED BOG IN ALL TPI CORVETTES EHEN MASHING THE GAS DOWN INSTANT.
NOT A TRUE BOG BUT ACCELERATION DROPS .
THEN PUCKS UP AGAIN.
FUEL QUENCHING .
 
87vette81big said:
Have you found or read any work done by DR. J Bytor.
Used to read his posts. Knows C4 TPI.

Have you found the BIN FILE FOR TPI WOT FULL FUEL ENRICHMENT ?
AFR GOES TO 9.0-10.0 :1 FOR 3-5 SECONDS.

I have seen some of DR. J's stuff but not the CATALYTIC CONVERTER QUENCHING stuff.

Sounds interesting, I'll take a look..... Thanks.
 
bytor said:
87vette81big said:
Have you found or read any work done by DR. J Bytor.
Used to read his posts. Knows C4 TPI.

Have you found the BIN FILE FOR TPI WOT FULL FUEL ENRICHMENT ?
AFR GOES TO 9.0-10.0 :1 FOR 3-5 SECONDS.

I have seen some of DR. J's stuff but not the CATALYTIC CONVERTER QUENCHING stuff.

Sounds interesting, I'll take a look..... Thanks.
Look on CFC4 RACE TUNING ARCHIVES Bytor.
About 2009-2010.
Dr. J is also involved in a few Hotrod magazine Race engine builds featured.
 
This discussion got me wondering how I could use my LM-2 wideband O2 to see whats going on with the AFR while I drive the car. I didn't want to install another bung in the exhaust so I wondered if the Innovate LM-2 could emulate a narrowband O2 sensor and sure enough it can. The analog outputs on the LM-2 can be configured to output an equivalent narrowband signal derived from the LM-2 wideband OS sensor.

So, the idea is....
> Remove my stock narrowband O2 sensor and install the wideband O2 sensor in it's place.

> Make pigtails for my MAF, TPS and HEI and connect these signals to the LM-2. The pigtails will allow me to split the signals to the LM-2 and ECM at the same time. Also, no wire cutting required. When I'm done, take the pigtails out and everything is back to normal.

> Install the LM2 so I can log the AFR, MAF, TPS and RPM while driving.

The LM2 will be providing the correct O2 signal to the ECM while at the same time I can see the actual AFR. It will be intersting to see the fuel curve for the MAF TPI engine. This would also be a good aid while working on a custom tune for a modified engine.

I have the connectors for the pigtails on order and will report back once everything is hooked up.

LM2.jpg
 
Last edited:

It will be most interesting to see the relationship between the MAF, AFR, TPS
as the ECM responds to engine demand. It should be good practice for me that
will help when I get back on the road this summer and logging data with the AQ-1.


 
I will have to spend time this week catching up reading Bytor by You.

I have always wanted to drop a Chevy Model Vertex Magneto into my 1987 C4 vert Corvette.
With the factory Tuned Port.

I have been told in the past its possible with an aftermarket stand alone FAST OR XFi Fast.
Not sure how it can be done.
Alpha Numeric programming ?
 
E85 is real hot to use where I work at in Chicago .
The stuff is a SOB To light off clean when the engine is cold in the morning.
Not even Capacitive Discharge MSD Has the balls...Joules of energy at the the spark plugs to do correct.
Ditto for modern coil on plug LS-X.
 
Made anymore progress Bytor?

I layed out and made a wiring harness to cable up the LM2 wideband in place of my narrowband O2 back in the spring. (as depicted above) I got busy with summertime activities and have been enjoying driving the car so I haven't had a chance to get back to it. I plan to get on it soon though.

My last writeup on the ECU functionality was focused on the 7 pin HEI and its control signals. The next installment in a month or so will be a primer on how the ignition timing advance is calculated in the ECU code.
 
Back
Top