free electronic ignition code!

Ruh-roh.

I like the idea of an inexpensive doit-yerself kit, suitable for amateur building, simply download the code and flash the microprocessor.

But, this TM4C123G is a monster.
View attachment 153497
View attachment 153498

The chip is a 64-pin surface mount.
View attachment 153499

I understand xjwmx's code skeleton, but my coding style for real-time applications was different. Instead of polling the inputs, I normally used a block code base for calculations/management/output, with independent/asynchronous processes (daemons) that are interrupt triggered (input state and/or timer) to process the data and deliver it to a section of shared memory, with a return vector into the base code. My coding for these were mostly in assembly.

A quickie look shows the evaluation board at $250, books/docs over $100, then there's the ancillary equipment and aspirins.

Looking at the stock TCI triggering, rotor magnet passing under 2 sense coils, the signals need a bit of looky-see. As the magnet passes under a sensor coil, the signal will be sinusoidal, and the magnet's polarity defines whether the leading lobe is negative or positive, signal voltage crossing zero as the magnet is directly under the sensor coil. The magnitude of this signal will vary with rpm. Modern crank-triggered ignitions don't use this signal as a one-shot trigger, but analyze the waveshape to determine where it is. In the stock xs650 TCI ignition box, the input waveform hits 2 series-connected diodes, which gives only the positive part of the pulse, clipping it down by at least 1.2v, and sending it on to an R/C timer/conditioner, which drives an input transistor, like an old-school analog computer.

Just some numbers to gyrate and chew on.
At 9,000rpm, the crank is rotating at 150rps, making a 1 degree rotation in about 18 microseconds. The magnet travels about 0.8mm (1/32") in that 1 degree. Chopping up the trigger signal waveform into 18 pieces would be at 1 microsecond, a 1 Mhz sampling rate.

A bit much for my handheld scope. Would need to buy something in the 20mhz class.

Sounds like a fun project.
Myself
What I was going to say. I have put a scope on some TCI boards and I have some preliminary drawings of the 12-01 TCI board. Will post some of my work later this weekend.
 
Last edited by a moderator:
^Did you look at the coil at various RPMs? In another thread I think Gary mentioned that the Pamco's dwell is 30 degrees. Of course you are interested in the time the degrees represent at various RPMs, not the degrees per se. So I'm assuming for starters that 30 degrees chosen gives a charge time on these dual coils that that is sufficient at the highest reasonable RPM and without having the coil on too long at the lowest reasonable RPM. Might be possible to use a new value for degrees starting around redline to let it wind on out... :D Or you could just base it throughout the whole range directly on time.
 
Back
Top