Trigger Wheel Decoder / Coil driver

Ecu Hardware Modifications
BennVenn
Posts: 487
Joined: Fri Mar 04, 2016 10:35 am
cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
Location: Windellama, NSW
Contact:

Trigger Wheel Decoder / Coil driver

Post by BennVenn »

I'm working on fitting a Saab ignition coil pack to the old pulsar, main reason being it comes with stand-alone built in Ionic Knock Detection which is the only reliable way to detect knock and cylinder combustion pressure. No false positives, no false negatives, but first:

I plan on keeping the 808 running the show so I'll need a gizmo that'll process a 36-1 trigger wheel, generate the reference pulses for the ECU, handle cranking spark and switch over to wasted spark / sequential ignition at the request of the ECU as per a stock 808.

Here begins the build log of my Trigger wheel decoder. I plan on making it fully configurable via USB, set the trigger wheel tooth count / pattern, set the missing tooth crank angle position, output reference angle pulses, any number of cylinders and V angle, any number of coil outputs, sequential or wasted spark (with cam angle input or Saab Combustion Cylinder Pressure input)

If anyone else here might find this gadget useful, let me know down below and I'll get a few extras made up. Or if you have a feature request, now's the time to add it in before the hardware is finalised.

Estimated price for the gadget will be around AUD $40. Logic level outputs (no direct ignition coil drivers on board, inbuilt ignitor coils/packs only). VR or Hall sensor inputs. Delco compatible (Ref out, EST in, Bypass in)
User avatar
antus
Site Admin
Posts: 8250
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by antus »

Yes please! I'd love to switch from GM 6+1 to 32-1 pattern and with LS1 coils.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
Dylan
Posts: 3356
Joined: Mon Aug 02, 2010 6:35 pm
cars: VR Commodore V8

Re: Trigger Wheel Decoder / Coil driver

Post by Dylan »

This will be popular
BennVenn
Posts: 487
Joined: Fri Mar 04, 2016 10:35 am
cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
Location: Windellama, NSW
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by BennVenn »

If anyone is looking for a custom trigger wheel, you can get them cut at PCBway for $30 USD which isn't too bad (1 - 4mm mild steel). Cheaper for 2+. Only takes 10min to draw it up in CAD - happy to draft one up if you need.
PCBWAY_Triggerwheel.JPG
Video on the build progress from my Instagram @willitboost
SaveInsta.App - 3075436611088791835.mp4
(11.33 MiB) Downloaded 2065 times
BennVenn
Posts: 487
Joined: Fri Mar 04, 2016 10:35 am
cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
Location: Windellama, NSW
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by BennVenn »

A bit more work on the software side of things:

It's processing the tooth pattern from the VR circuit, it's detecting the missing tooth, generating the reference pulse as well as 10deg before Top and Bottom dead center. 60deg before is fine too which I think is what V6's expect?

The TDC and BDC angles can be set in software so it'll be compatible with 4,6&8 cylinder engines. I'm not sure if 'fine' angle adjustment will be necessary in software, a hardware solution which moves the VR/hall sensor will probably be fine? A course adjustment in software is available (10deg increments for a 36tooth wheel)

There's also code to detect the wrong number of teeth per rotation which sets a Loss Of Sync flag and LED until the next full trigger wheel count is detected then it continues on. I think it's more important to just cut the spark than to allow early ignition timing.

Loss of sync shouldn't occur in normal operation, unless the sensor is too far from the wheel, there's significant runout/wobble on the wheel or an unusually noisy electrical environment. I might test a few different VR conditioner circuits on the lathe and play around with sensor gap and adding interference to see which is most robust.

Cranking dwell - Right now it's set up in tens of degrees. 10deg = roughly 6mS of dwell at cranking RPM which is right on the money for most coils with battery voltage around 10v or so. It wouldn't be too hard to set up a timer to fire a more precise dwell for cranking. Let me know if you think its needed?

Running dwell and timing is all controlled through the Delco. The angle at which to change coils/pack pairs can be defined but it seems more logical to use the falling edge (moment the plug fires) to select the next coil to fire. The MCU will keep it in sync and watch out for a loss of sync.

MCU processing latency - It is measured at 2uS between the detection of the missing tooth, to the generated reference pulse. At 1000rpm this = 0.012degrees of error, at 10,000rpm this = 0.12degrees of error. To keep this error at the absolute minimum, the MCU won't be processing any other signals, the pulse distribution to the coils will be handled by a programmable logic IC, as will cam syncing for coil-on-plug setups. The MCU is only there to process the trigger wheel signal and make the delco ref pulses.

Waveforms from the logic analyser:

Missing tooth detection:
MissingTooth.JPG
Loss of Sync Detection:
LossOfSync.JPG
User avatar
antus
Site Admin
Posts: 8250
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by antus »

Rather than cut the spark I think your better off with some kind of prediction and fall back to that for a short moment to re-sync, and fire the coils off a timer. That way the engine keeps running instead of getting a noticeable hesitation. On the VL400 implementation I believe it was running its own timing then it'd be monitoring the trigger signal, throwing away data so bad it had to be trash and tweaking its own timing on difference. That way a momentary glitch wouldn't affect things too much during normal operation, and it could afford to miss an event and resync at runtime.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
BennVenn
Posts: 487
Joined: Fri Mar 04, 2016 10:35 am
cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
Location: Windellama, NSW
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by BennVenn »

That's a good idea. I think i'll do something like that, have a timer running in the background firing a few degrees after the expected pulse and then substitute as needed.

I've just finished up code to filter the incoming signal for a minimum pulse-width based on the previous rotation's RPM. This has just about completely eliminated sync loss from small noise spikes. So far in my signal captures i've not seen anything other than uS sized noise in the stream. I might need to install it into the car to test further with alternator noise, idle motors and coils firing
BennVenn
Posts: 487
Joined: Fri Mar 04, 2016 10:35 am
cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
Location: Windellama, NSW
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by BennVenn »

Up and running on the lathe. I've never seen such a rock solid timing mark. Far more accurate than the cam driven distributor but more importantly a hotter spark than running through a distributor.

Tested from around 100RPM up to around 3500rpm, lathe won't go much higher than that.

Proto is proven so I'll whip up a pcb and get a couple made.

Slight design change, I don't think there is need for USB to change settings, I'll just add two rotary switches - one to set the cylinder count, the other to offset the base timing in 10deg increments. Mechanical adjustment of the pickup will adjust sub-10deg. This should be fine for 1/2/4/6/8 cylinder wasted spark setups.

I'll code in the Delco side of things, REF/EST/Bypass and this little project will be done!

[youtube]https://youtube.com/shorts/tWIJ4WMoj0U?feature=share[/youtube]
https://youtube.com/shorts/tWIJ4WMoj0U?feature=share
Charlescrown
Posts: 1833
Joined: Sat Aug 06, 2011 7:58 am
cars: V8 VR Commodore BT1
LB Lancer 2L turbo & Delco
Starion TBI with Delco
Mitsubishi Lancer EVO4 track car
NA MX5
3 vintage motor bikes
Location: Padstow NSW

Re: Trigger Wheel Decoder / Coil driver

Post by Charlescrown »

Very interesting project. I'd be surprised if the Saab ECU has no input or control over the spark. I do know they have a control module used as well. They also use Delco so interesting project indeed.
BennVenn
Posts: 487
Joined: Fri Mar 04, 2016 10:35 am
cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
Location: Windellama, NSW
Contact:

Re: Trigger Wheel Decoder / Coil driver

Post by BennVenn »

The Saab ECU controls ignition timing, it uses a timing map like our delcos but is heavily dependent on the cylinder pressure output from the coil pack. It's a single analog 0-5v output which represents cylinder pressure. Supposedly you can watch it with an oscilloscope and see compression, ignition and combustion events in real time. Detonation is typically an order of magnitude higher output than normal combustion which makes detection simple enough.

That's the plan anyway....
Post Reply