Motorbikes

DIY Electronic Ignition, Take Two

It’s been over a year since I threw together a proof-of-concept electronic ignition for my friend’s 1966 Honda CB77.  Not content with the original, overly generic design; I’ve been working on something a tad more bespoke.

BoardMountedOriginalPoints

The image on the left is, of course, the factory points setup for the CB77. On the right is the PCB I made to replace it, populated with two copies of my earlier design – albeit in somewhat different form.

Also, in addition to the Hall-effect triggered IGBTs, there are a number of components added for testing purposes, as well as not-yet implemented features that (testing has revealed) are in desperate need of revision. The light blue kynar is there just to break-out some test points.

Here are some more images, before and after population:
Front_UnpopulatedRear_Unpopulated
Front_PopulatedRear_Populated

As is my custom, after I laid out the major components I auto-routed the board – cleaning up traces as I saw fit (read: as much as I had patience for). There will likely be a lot more tidying before I consider it a finished product.

The primary components and functionality remain unchanged from my original design, with the Hall latches and IGBTs only translated to their surface-mount brethren. I went to great lengths to preserve reasonable isolation around anything subjected to high voltage DC, and even greater lengths to provide adequate heat-sinking for the IGBTs (via the ‘winged’ copper pours), all in a relatively aesthetic package (one that, ironically, is designed to tuck up under the points cover – completely unseen). Incidentally, I’m now quite professional at writing scripts for eagle in polar coordinates.

While the original points setup required only two wires, this design requires four. The two coil wires (just as in the points setup), with an added power and ground. Now, while the addition of the power wire was unavoidable, I fought a bit with whether or not to ground through the housing. In the end, I decided that one more wire was manageable, and would provide a more robust DC return, while also helping to preserve isolation (as grounding through the housing would require additional ground pours, encroaching on the IGBT heat-sinks).

For testing purposes, I’ve mounted this board to its parent housing, which I’ve in-turn mounted to a test fixture I cobbled together.

Test_Rig

I’m almost ashamed to say it, but a lot more effort went into building that than really shows. Regardless, it’s been invaluable in testing and evaluating the board’s functionality.

Triggering is managed by a pair of magnets (with opposite outward-facing poles) embedded in a wooden disc, mounted in the collet of a spindle motor. The spindle motor is powered by a 48V 600W supply, with variable RPM managed via PWM.

The results:
11490RPM

The blue trace is taken from the gate of the right-side IGBT, with the yellow taken from the ‘negative’ terminal of the corresponding coil (with respect to ground). 191.5Hz works out to 11,490 RPM. Plenty.

And then there’s the other end of the spectrum:
525RPM

This is roughly 525 RPM, and it’s where the limitations of my benchtop supply become painfully apparent. It’s a 0-15V 3A supply, here set to 14.6V. Current draw was sufficient to load it down to around 10 Volts – with the loading of the second coil causing some stepping in the blue waveform. Despite all this, and the pitiful 30V counter-EMF on the coils, the plugs kept firing away happily, with sharp blue sparks.

Unfortunately, despite this hugely successful outcome, there’s still a lot more testing left to do. With an appropriate trigger wheel, I’m extremely confident I could bolt this into any CB77, do some minor tuning, and be on my way. But for how long? That’s another question entirely.

While I feel I’ve provided adequate heat-sinking, and while the IGBTs remained at room temperature throughout all stages of testing; it is an air cooled motor with almost zero airflow under the points cover. Without some real-world testing and abuse, there’s really no telling what conditions will be faced. The good news is that there’s some precedent, with the max operating temp of the Hall latches and IGBTs exceeding that of the FR4 PCB, of which many other ignition conversion PCBs are made.

As for what’s next, I need to revise or eliminate the aforementioned non-functional features, further clean up the board routing, have a proper trigger wheel machined to mount on the original points cam, and do some real-world testing (volunteers?).

Once the design is finished and tested, I will be releasing everything I have – completely open source (as is everything I’ll ever post to this blog). If anyone is interested in the eagle files prior to that, just hit me up and I’ll happily share (but don’t expect a lot of sense, cleanliness, or support).


DIY Electronic Ignition Conversion

Recently, a friend of mine acquired a 1966 Honda CB77, and I offered my help in the rebuilding process.  Part of this process includes updating the electrical system, and modernizing where it won’t affect the aesthetic of the bike.

The first modernization on the list is converting from electromechanical points to a fully electronic ignition.  Unfortunately, while there are a few commercially available kits, they all run well into the hundreds of dollars.  Fortunately, there really isn’t much to a basic electronic ignition conversion, and it’s a fairly trivial DIY endeavor.

My approach is very similar to others (especially the ubiquitous PAMCO conversion), in that it’s based around an ignition IGBT triggered via a Hall effect latch.

Before I get too much into discussing the design, it’s perhaps best to review the principles behind a conventional ignition system.  (Caution: physics ahead).

So, the obvious purpose of the ignition system is to make a spark – but this is easier said than done.  The spark needs to jump a gap (the plug gap) in an atmosphere of compressed air and fuel, reliably, and at a precise time.  Why is this so difficult?  Well, the dielectric strength (effectively the maximum potential applied to a material before conduction occurs) of air/fuel under 10:1 compression is on the order of 15 *million* volts per meter.  With a typical plug gap of around 1 millimeter, the potential required to have any spark at all is around 15,000 volts!  If we want a potent, reliable spark, it’s best to up that value by about a factor of two.  (These values are all within ‘cosmological accuracy’, but ballpark figures are all we need here).

Alright, so we need roughly 30,000 volts from a 12 volt system.  How?  Well, more physics of course!

Physics gives us a neat trick for not only generating such high potentials, but also for doing  it at a precise time we can control by fairly simple means.  The phenomenon is called counter-EMF, where Ec = -L (dI/dt).  This says that the potential across an inductor caused by a change in current is proportional to the current’s rate of change.  So all we need to do is rapidly change the current flow through an inductor, and we’ll have some high voltage across that inductor.

Now, it’d be nice to say that’s all we need to do, but there are some caveats that require a little more engineering cleverness.  The first problem is that 30,000 volts is almost impossible to control directly, as most insulators become conductive long before this (which is the whole point).  Second, high inductance coils require longer times to fully ‘energize’ (due to the same phenomenon) – this ‘energize’ time in an ignition system is usually called “dwell”.  So how do we deal with these issues?  Simple, instead of a single inductor, we use a transformer – two (or more) inductors sharing a common core.  In this case, our transformer is called an ‘ignition coil’.

So now we have something of a plan.  We take a transformer of say, 1:100 turns ratio; we use counter EMF trickery to apply 300 volts to the primary side, giving us 30,000 volts on the secondary side; then we use a spark plug with a tuned gap between the terminals of that secondary side, giving the 30,000 volts something to jump across and make a spark.  Perfect!  Now we just need to generate that counter-EMF at a precise time (which, ultimately, is what this is all about).

Until the adaptation of solid state devices in automotive ignitions, the current control through the primary of the ignition coil (and subsequently all aspects of ignition timing) was handled by points – a set of contacts acting as a switch between the negative terminal of the coil and system ground.  As the engine rotates, a mechanical cam opens and closes these two contacts at “precise” times with respect to the engine rotation. ( I put “precise” in quotes because anyone who has experience with points will tell you what a pain in the ass they are to keep properly adjusted.)  The timing is such that the points make contact at the beginning of the dwell period, allowing current to flow and ‘energize’ the primary of the ignition coil.  Then, when the piston is at TDC, the points cam separates the contacts, causing a sudden change in current through the primary (a high dI/dt).  This produces the aforementioned 300 volts of counter-EMF across the primary of the ignition coil, which produces 30,000 volts across the plug gap, and we have a spark – right when we wanted it.

Phew.  That was far more painful to write than to read, I assure you.

So, here we are, with a marginally functional set of points that do the job but require more maintenance than a modern human cares to invest.  Luckily, solid state devices exist that can handle switching of large currents (fully saturated ignition primaries can draw upwards of 5 amps), while incorporating internal clamping protection against high-voltage damage.  The most common of these that I’ve found is the 14C40L series of ignition IGBTs manufactured by International Rectifier.  Even at under $4 a pop, they are still the most expensive component of this project (even more expensive than the professionally fabbed PCBs).

On to the design:

EISchem

So, how does it work?

The A1250 Hall latch can be in one of two states, and remains in that state until switched.  When ‘on’, its ouput is dumped to ground.  When ‘off’, the output is pulled high by the 10k resistor connected to VCC (I believe this particular Hall latch has an internal pull-up, but I feel it’s more robust in this configuration).  This normally-high line is connected to the gate of the IGBT through a 2k resistor (to prevent ringing on the gate).  The IGBT is an N-channel device, so the drain is connected to the ignition coil’s ‘negative’ terminal, and the source connected to ground.  C1 is simply there for decoupling, and D1 prevents reverse bias between the source and drain (this is redundant to the internal clamping circuit of the IGBT).

So, when the north pole of a magnet passes by the Hall latch, the output is pulled high, along with the gate of the IGBT.  This allows current to pass through the coil, energizing it.  When the south pole of a magnet then passes the Hall latch, the output goes low, pulling the gate of the IGBT low, causing a sudden cessation of current through the ignition coil primary, which leads to all the aforementioned physics voodoo, giving us a precisely timed spark.

So that’s all fine in theory, but does it actually work? Yes, it does.

Here is the PCB I laid out:

IgnitionBoard

I know it’s not pretty, but it’s only intended as a proof-of-concept prototype and I wanted it made as quickly and cheaply as possible.  At $1.15 for 3 boards (fuck yeah, OSH Park), the only cheaper components of the build are the 1206 discreets.

Here it is, built:

IgnitionAssembled1

Don’t ask about the Jolly Roger, it was my first order from OSH Park and I wanted to test their silkscreen capabilities.  And because I sort of want to be a pirate.

I’ve tested this thing with a couple of magnets stuck on a bolt and it certainly seems to function as intended, at extremely low cycle rates at least.  Solid state devices and magnetic fields being what they are, I have no doubts that it will scale up to higher frequencies just fine.  After all, even 15,000 RPM is only 125Hz.  Using a transistor in place of the Hall effect latch, and triggering with a 555 timer, I was able to get reliable operation well into the KHz.

The next step is to build a trigger wheel to hold the magnets and attach to the original points cam (to take advantage of the inbuilt mechanical timing advance).  My brother is a killer machinist who doesn’t seem to mind doing me favors, so I’ll probably lean on him for the final part.  Prototyping will probably be done in a very hack manner with PVC or somesuch, and you can expect updates in future posts.

Eventually I’d like to design around a microcontroller, so that all the advance (and even custom advance curves) can be handled electronically.  Right now I just wanted to make something cheap and functional, because these mechanical points simply have to go.

Oh, and speaking of cheap, final cost for a pair of these:  $11.72

Sure beats $200.

Other motorbike stuff to come:  Solid state PMA voltage regulator/rectifier, Neutral-disengagement-triggered headlight switch, Mechanical-to-digital speedometer & tachometer conversions, and probably more stuff that I haven’t even thought of yet.