auto advance ignition

bluejets

Senior Member
Thinking about making auto advance ignition for a miniature multi-cylinder engine I am currently building and need a couple of guidelines. For a starter, now that the 08m2 is available with high speed, perhaps any previous drawback there can be eliminated.
The idea was, as most are, to position a sensor before the required maximum firing advance (allowing for coil saturation time also) detect the speed of the engine and then perhaps a look-up table to give reference to when to fire. I have not used lookup tables before but also if there are any examples I could be directed towards.
Any input greatly appreciated.
 

Jaguarjoe

Senior Member
You should also know the load on the engine along with the speed. The simplest method is with a "MAP" (Manifold Absolute Pressure) transducer looking at the intake manifold pressure. Cars that use speed-density controlled ECM's have MAP's. That would be almost every fuel injected car built prior to those that use mass air flow meters (~1983 to ~1992).
US made GM and Chrysler MAP's need a 5v supply and their output is 0-5vdc.
US made Ford MAP's also run on 5v but their output is a varying frequency of a few hundred Hz or so.
Any of these can be had for peanuts at a wrecking yard (breakers) here in the states.
If you are not in the US and would like one or two of these MAP's, let me know and I will send them to you at cost.

What kind of engine are you building?
 

pilko

Senior Member
Since the sensor position is fixed and since you will be measuring speed,then the ignition position can be determined using time.
Also use MAP as suggested by JJ.

pilko
 

bluejets

Senior Member
You should also know the load on the engine along with the speed. The simplest method is with a "MAP" (Manifold Absolute Pressure) transducer looking at the intake manifold pressure. Cars that use speed-density controlled ECM's have MAP's. That would be almost every fuel injected car built prior to those that use mass air flow meters (~1983 to ~1992).
US made GM and Chrysler MAP's need a 5v supply and their output is 0-5vdc.
US made Ford MAP's also run on 5v but their output is a varying frequency of a few hundred Hz or so.
Any of these can be had for peanuts at a wrecking yard (breakers) here in the states.
If you are not in the US and would like one or two of these MAP's, let me know and I will send them to you at cost.

What kind of engine are you building?
OK..thanks..I will keep that in mind. Engine is 50cc V8 water cooled spark ignition with pressure fed oil system...normal carby arrangement and twin cam....already built a 25cc four and it runs really well...alcohol fuel glow ignition...runs up around 10,000rpm....presently fitting into a chris craft style 40's type wooden hull (scale about 1/5)
 

Goeytex

Senior Member
OK..thanks..I will keep that in mind. Engine is 50cc V8 water cooled spark ignition with pressure fed oil system...normal carby arrangement and twin cam....already built a 25cc four and it runs really well...alcohol fuel glow ignition...runs up around 10,000rpm....presently fitting into a chris craft style 40's type wooden hull (scale about 1/5)
Rotational speed and position can be done with Pulsin or with on of the timers and interrupts.

After having successfully completed a Picaxe based ignition on a twin cylinder wasted spark system, I can tell you that a single 8M or even 8M2 will not do the job, especially if you expect a timing curve on an inductive based ignition system. A CDI system needs much less processor "power" as dwell calculations are eliminated.

A good ignition system in not only based upon mass flow inputs but also upon temperature ,RPM. crank position, as well as other factors. MAF is just as much related to fuel mixture anyway. I doubt I would even bother with MAF in your application. A TPS might be nice though.

Due to the high processing overhead in ALL Picaxe microprocessors and very limited math capabilities, it becomes a real challenge. Timing errors will abound due to processor overhead delays and must be compensated for where possible. This is why automotive based ECU's use processors capable of multi-piped/ multi-threaded operation. They do not suffer from having to use an interpreter with its high overhead, and can, for example, perform at up to 50 - 100 MIPS vs a Picaxe that takes as long as 500us to process one single command and move to the next. An example of a good automotive microprocessor might be a Silabs C8051F51x.

Good luck with whatever you do.

Goeyex
 
Last edited:

geezer88

Senior Member
To keep things in perspective, and remembering all the engines that ran well even before computers, here's what works and would not be too tough to do with a picaxe.

If your engine is four stroke, then the simplest advance could be driven by the single input variable of intake pressure. This is what was done with all old auto engines, using manifold vacuum on a rubber diaphram that advanced spark as the pressure was reduced. You would not need to calculate the setting every revolution of the crank.

For two stroke engines, the outboard motors could be the model. They used a combination of throttle and spark advance to increase speed. From idle up to about half of throttle position, the carburetor butterfly was opened. Then, with the butterfly wide open by half throttle, the remaining half of throttle position was simply accomplished by increasing spark advance. All this was done open loop, of course, so again the cycle time of your controller program would be well inside the picaxe capabilities.

Have fun going back to the future,
tom
 

Jaguarjoe

Senior Member
If your engine is four stroke, then the simplest advance could be driven by the single input variable of intake pressure. This is what was done with all old auto engines, using manifold vacuum on a rubber diaphram that advanced spark as the pressure was reduced. You would not need to calculate the setting every revolution of the crank.

Have fun going back to the future,
tom
Speed has to be included because it takes a finite amount of time for a fuel mixture to ignite and reach its peak pressure point (PPP) a few degrees (~20) ATDC. At slow speed, the spark can occur later than at high speed because at slow speed there is more time to get to the PPP. At high speed, the spark has to occur much sooner to keep PPP close to optimum.

Vacuum advance didn't exist until GM created it in the late 40's.

A really cool ignition system skips all that junk and simply controls PPP. The simple but expensive way uses an instrumented spark plug that has a pressure port as well as a pressure transducer attached to it. The more complicated but economical way utilizes the spark plug gap as an ionization pressure sensor. Either way, it tunes the spark advance for optimum cylinder pressure which generally occurs around 20 degrees ATDC for a lot of engines.
 

geezer88

Senior Member
I totally forgot about the speed variable. The mechanical way to handle that was with a mechanism that advanced timing with speed. Again, though, that would not have to be calculated every cycle, so a relatively slow device would work.
tom
 

bluejets

Senior Member
Throttle position I could get easily from the position sent to the servo that drives it from the R/C input. Speed is fairly easy to get. Perhaps I should forget about lookup tables as no one seems to have mentioned them and just go for a servo driven advance plate that holds the hall effect sensor. ok...thanks for all the input. Many things to consider but as Geezer88 says, one must keep things in perspective. Too many complications and the thing may never work.
 

Goeytex

Senior Member
Throttle position I could get easily from the position sent to the servo that drives it from the R/C input. Speed is fairly easy to get. Perhaps I should forget about lookup tables as no one seems to have mentioned them and just go for a servo driven advance plate that holds the hall effect sensor. ok...thanks for all the input. Many things to consider but as Geezer88 says, one must keep things in perspective. Too many complications and the thing may never work.
Lookup tables are a common way to go and can speed things up. But, in the case of a Picaxe, by the time the Picaxe reads its raw input (speed, TPS, MAP, MAF) data, looks up table data, makes dwell calculations, and then sends a "fire coil" signal .... quite a few engine revolutions will have already passed.

Don't think that I am unfairly picking on the Picaxe. I am not. Picaxe is my favorite proof of concept and home project platform, and they are great at what they do. It's just that an 8 cylinder "modern" electronic ignition system is beyond what is reasonable expect from a Picaxe based system.

You may want to slip over to the Megasquirt Web Site (Ignition section) for some ideas on your ignition system.
 

boriz

Senior Member
"a servo driven advance plate that holds the hall effect sensor."

This is exactly what I was thinking. The servo driven by a Picaxe using a RPM sensor and a lookup table. The lookup table gives the required servo position for the currently detected RPM. The lookup table is initially constructed (calibrated) with an experimental testbed where the RPM and the servo setting can be accurately monitored and manually adjusted. A small offset can be added when RPMs are changing rapidly.

You'll need a good servo though. Able to move quickly with high precision.
 

Jaguarjoe

Senior Member
One of the Megasquirt spinoffs is "Megajolt Lite", a relatively inexpensive stand alone ignition system.
When all of the Mega-X stuff started, it was all entirely open source- code and circuitry. When it became evident that Mega-bucks could be made, it's not so open source anymore. The code for MJ-L used to be readily available so you could build your own stuff.
 

bluejets

Senior Member
"a servo driven advance plate that holds the hall effect sensor."

This is exactly what I was thinking. The servo driven by a Picaxe using a RPM sensor and a lookup table. The lookup table gives the required servo position for the currently detected RPM. The lookup table is initially constructed (calibrated) with an experimental testbed where the RPM and the servo setting can be accurately monitored and manually adjusted. A small offset can be added when RPMs are changing rapidly.

You'll need a good servo though. Able to move quickly with high precision.
Ah...great minds think alike.....
yes... servos are pretty quick anyhow, I think around 200ms for 60 degrees travel and I think i will only be using about 25degrees. I don't believe there is a necessity to move the servo for every n-th increase or decrease in speed, rather maybe 6 or 8 steps from idle to full range would be acceptable. Usually the problem with setting a fixed timing of say around 15-20 degrees is that the engines are rather snakey at startup so this will overcome that problem quite nicely.
 

boriz

Senior Member
Spitballing:

So say an absolute maximum of 10000 RPM, giving 6mS per rev.

The PULSIN command (on an 08M operating at 4MHz) has an interval unit of 10uS. That gives a minimum PULSIN value of 600.

And the timeout from the PULSIN command @8MHz is about 655mS, equivalent to about 370 RPM.

Using just the PULSIN command, 370RPM - 10000RPM seems like a useful range to me.

So the program would look something like this:

Code:
'Pseudocode
initialise servo
DO
    get an average pulsin reading over several revs and a trend
    lookup appropriate servo position value from table
    if trend is large, make slight adjustment to position value
    set servo
LOOP
You can't update the servo position for every rev. Servos like an update rate of about 20mS. This happens automatically and continuously in the background once a SERVO command is issued. If you try to change the servo position too often, it can interfere with this 20mS update and cause jittering. So plan for a servo position change about once every 100mS.

The new 08M2 is supposed to have enhanced jitter rejection (dunno how that works), so might allow faster updates. You'll need to experiment.

Looking ok so far?
 

Charlie_M

New Member
Interesting

Hi everyone,
I am currently working on something similar. I am working a auto advance for model airplane use.
 

bluejets

Senior Member
Hi CharlieM,
I can remember when we used to convert model aircraft OS glow engines to spark. Still ran methanol fuel though. Aim was to get better idle without costly nitro.(in 4 stroke engines)
All we did there was to connect the hall sensor plate which was mounted on a swivel plate just behind the prop driver, to the throttle. Advance throttle gave advanced ignition. Worked well too.
Maybe there is no real need to include electronic advance but it is a challenge.
 

zanger

New Member
idea

Throttle position I could get easily from the position sent to the servo that drives it from the R/C input. Speed is fairly easy to get. Perhaps I should forget about lookup tables as no one seems to have mentioned them and just go for a servo driven advance plate that holds the hall effect sensor. ok...thanks for all the input. Many things to consider but as Geezer88 says, one must keep things in perspective. Too many complications and the thing may never work.
Hi bluejets

I suppose y're using CDI ign.? CDI only needs a triggerpulse at right moment. I'am using 2 Hall sensors. H-1 located at top d.c. H2 at bottom d.c. H-sensors triggering a Flip-Flop. H-1 sets positive, H-2 zero. Pulsin reads Flip-Flop into W0. W0 compares with 180degr. crankrev. If you want f.i. 39 degr. fixed advance then pulsout W1 = (180-39)/180 * W0 = (with resp. to calc. limitations of PicAxe) W0*36/46. Pulsout command starts after pulsin. One has to compensate for calc.time of PicAxe prog. so in my case W1= W0*36/46-365. Pulsout low triggers your CDI. PicAxe 08M @ 8MHz.
Its easy to use W0 for calculating/composing an ignitioncurve f.i. 0 degr. at start (<600rpm), 13 degr. at idle, advancing from 1500...3600rpm to max adv. etc.
 

bluejets

Senior Member
No...not using cdi at this stage. Originally said I would have to allow for coil saturation time.
Making the coil to produce 300-400 volts seems to be a bit of hit and miss to get it just right for the cdi.
 

Goeytex

Senior Member
No...not using cdi at this stage. Originally said I would have to allow for coil saturation time.
Making the coil to produce 300-400 volts seems to be a bit of hit and miss to get it just right for the cdi.
Coil saturation time is gonna kill you on a V8 at high RPM unless you go with
a COP or similar setup. (One coil per cylinder).

A typical modern ignition coil has a saturation time of about 4- 5 ms.
Specialty racing coils (IGN1-A) have a saturation time of as low as 2.5ms.
These coils have the driver / ignitor built in. An example would be a GM LS2 Coil. All these coils need is a 12V Supply and a logic signal to fire given ample "charge" time between "fire" signals from a microprocessor, ECM or whatever.

So do the math and you can see what the coil requirements will be to maintain a constant energy spark over your expected rpm range. With the best of coils ( 2.5ms dwell) you will get 2 full energy sparks every 5 ms.

Also to consider is the timing as to when to start the coil charging at lower RPMs to prevent coil overheating due to being in saturation too long. The microprocessor has to do these calculations quickly and accurately for each coil used. It also has to calculate the firing point ( timing point) based upon engine speed, or whatever other factors you chose to include.

Timing accuracy is another issue. At 1000 rpm 400 microseconds of processor overhead represents less than 1 degree error. However at 5000 RPM it becomes much much more in terms of degrees. Do the math. This has to be compensated for in your program with processor delay error correction built into your dwell & timing algorithms.

A single picaxe cannot be expected to do all of this . In an 8 cylinder inductive ignition you are looking at using at least 2 if not 4 Picaxe's to do the job of 1 C8051xxxx. And you still have to do a lot of correction for processor overhead since it takes a Picaxe 400us to do what a C8051xxx
(intended for Automotive use) 5 microseconds to do.

On my twin cylinder wasted spark system using LS2 Coils, I use 2 Picaxe
processors. One does the Speed detection and dwell calculations , and the other does the timing/firing. It's good to 8,000 RPM.

Using CDI will eliminate the need for dwell calculations and take a lot of the load off the processor(s).
 

Jaguarjoe

Senior Member
Well, you wouldn't be the first. Sometime in the late 60's or early 70's, the US Navy developed a torpedo that had a triaxial accelerometer in its head, or nose? It sent xyz data back to the mothership via wire. If the torpedo's attitude was correct when it hit the enemy ship, it would be detonated via command from the mothership. I spent week after week making and remaking the signal conditioner on a 25mm dia. PCB long before SMT was popular. I'd build one, pot it, send it across the hall for G testing and see it die the first time they'd drop it. We'd patiently chip away the potting, see what failed, rectify it and do it all over again, and again, and again.
I have no idea if that thing ever came to fruition.
 

Goeytex

Senior Member
You can use just about any 300-400vdc power supply for a CDI.
All kidding aside, CDI get its voltage from a battery/ alternator supplied flyback transformer circuit. These are specialty circuits designed specifically for CDI ignitions. Sorry, but "any 300-400vdc Power Supply" is not gonna do it well. The supply must be capable of repeatedly charging a specialized 1uf - 3uf capacitor to 300 - 350v in less than 4 ms.

Check out the LT3750 / 3751 Capacitor Charger IC's. I have tested the 3750 with a Coilcraft GA3460-BL transformer and it works very nicely. Charges a 3.3 uf cap to 340V in 3.4 ms. Picaxe triggers the discharge through an Automotive IGBT into an MSD CDI coil. Makes a hell of a spark.

There's nothing iffy about it at all.
 

papaof2

Senior Member
A CDI system can make a big change in the way an engine runs. I installed one on a Chevy Vega some years ago and first obvious change was that the idle speed went up by 200 RPM (about a 20% increase). No other changes or adjustments. Having the better spark squeezed that much additional power out of the same amount of fuel with the same timing.

John
 

bluejets

Senior Member
All kidding aside, CDI get its voltage from a battery/ alternator supplied flyback transformer circuit. These are specialty circuits designed specifically for CDI ignitions. Sorry, but "any 300-400vdc Power Supply" is not gonna do it well. The supply must be capable of repeatedly charging a specialized 1uf - 3uf capacitor to 300 - 350v in less than 4 ms.

Check out the LT3750 / 3751 Capacitor Charger IC's. I have tested the 3750 with a Coilcraft GA3460-BL transformer and it works very nicely. Charges a 3.3 uf cap to 340V in 3.4 ms. Picaxe triggers the discharge through an Automotive IGBT into an MSD CDI coil. Makes a hell of a spark.

There's nothing iffy about it at all.
Beautiful....thanks very much.
Yes, I have read about the problems people had getting the right components together to charge the capacitor to the desired level in the required time.
This is why I tended to avoid the CDI. However, now it might be worth reconsidering.
Revs quoted for the four cylinder will definetely not be even considered for the V8. A more realistic level with it will be around 5,000-6000RPM tops. CDI has many things going for it I must admit. Size for one.
...................................Thanks again. Just one question...what is an MSD coil??
 

Jaguarjoe

Senior Member
Here's how you can garner the crankshaft information:

http://usdigital.com/products/ma3#description

MSD is a company that sells CDI ignition systems and numerous accessories for them. Their original claim to fame was multiple spark discharge or "MSD". CDI ignitions do not work well with lean mixtures, hence the MSD's multiple sparks. At very low speed and load the AFR is very lean and the MSD puts out IIRC, 3 sparks/plug in short succession. As RPM rises, the number of multiple sparks diminishes until it's down to one spark. This happens, IIRC, around 3,000RPM in a V-8 motor. At higher speeds, most engines run richer to avoid burning valves and pistons and a single spark suffices. Because the rise time of a CDI spark is so fast, punchthrough between plug wires needs to be addressed. Very neatly laid out and high quality plug wire is required to avoid problems.
 
Last edited:

zanger

New Member
Here's how you can garner the crankshaft information:

http://usdigital.com/products/ma3#description
Bluejets, Are you considering one or (two) distributers and 1 (or 2) ign.coils? You can make use of 4 HT-coils with wasted spark without the need of a distr.? Each individual channel can then be controlled by a PicAxe?

Thanks Jaguarjoe, this link is brilliant. I made a camshaft vs. valvelift measuring device with a PicAxe 08M and a incremental encoder. It works well but only by slow handturning the cam.
 

zanger

New Member
Aw, shucks! Every couple of years something useful falls out of my head, that was my 2011 contribution.

How'd you measure the valve lift?
I 've used a 5 kOhm lineair pot RS 317-780 from RS components with a max stroke of ca. 9.6 mm. Just enough for small motor cams.
A 30mm / 8mm upside down "mushroom" (with some fantasy) rests at the cam and can make accurate vertical movements. On top of it rests the lineair pot which position is vertical adjustable to zero the measurement. I 've used the readadc10, put the result into w0 and did a number of compressions, to get a tabel w0 vs. mm. Then I put things into Excel, made a best lineair fit and it resulted in: w0 * .968 = mm*100 (rather lineair). Then I used pwmout 255, w0, fed it into a RC network and buffered the output by a LM358. LM358 inputs from 0 to Vcc-(ca 2) so I fed the LM with 7.5V to range the full span of Pic's output . At its output I placed a potdivider and adjusted it at a voltage of 0.968 @w0=1000. When connected to a 1.000V display and with it's digit relocated in the middle it will display xx.xx mm. Accuracy is sub 0.1 mm
The other LM (it's a double package) is also coupled to the RC and ouputs to a datalogger.
I did some filtering by putting 5 w0 readings into a shift register and devided the sum by 5. After a lot of fiddeling, zeroing of the measurement is best done by a power interruption of the PicAxe. The w0 after the interupt is my 0-reference. The system will measure from reference but it can not display sub 0 when extended beyond 0. No need for at this moment

Regards from a very wet and windy Holland and I 'am looking forward to your 2012 contribution :)
 

bluejets

Senior Member
Just a note Zanger.......
cam follower in your instrument must be the same diameter and shape as used in the engine otherwise the readings will be out. Usually followers have a slightly curved face where they contact the cam to make them turn during use. Also if you use larger/smaller diameter on your test instrument, the cam will strike the follower earlier/later than in the engine.
 

zanger

New Member
Just a note Zanger.......
cam follower in your instrument must be the same diameter and shape as used in the engine otherwise the readings will be out. Usually followers have a slightly curved face where they contact the cam to make them turn during use. Also if you use larger/smaller diameter on your test instrument, the cam will strike the follower earlier/later than in the engine.
Hi Bluejets

It's strickly spoken a 30mm diam flat disk that mimics a cylindrical follower. The line of contact moves neatly within this diameter during a complete revolution of the cam. We have to measure and compare cams which control the valves by that type of follower and the diam of a real follower (in our case) never exceeds 30mm. In the real world there's sometimes a small offset between cl cam and cl follower to make the follower rotate. Purpose is to let it wear evenly but that doesn't bother us (the offset)
Nice project your 50ccV8, what is it going to power?
I made once a 3cil 10cc radial but it took that much time to build that I didn't dare to fit it into a modelaircraft and to see it crash.
 
Top