Maker Pro
Maker Pro

Micro-controller controlled Spark plug

rabhishek91

Feb 15, 2013
41
Joined
Feb 15, 2013
Messages
41
Hi. I am doing a project where i need to control the spark plug based on a condition. If a pin goes high, then the spark plug should function else it should be disable. I have attached the possible circuits which can be used to interface the spark plug with the Micro-controller.

In circuit 1 , they have configured the transistors as Darlington pair. Is it used to get high current gain?

In circuit 2, only one transistor is used for switching action. Can that transistor alone drive the circuit ? :confused:

Also in the programming part. Is enough if i just turn on and off the pin (as shown below) or should i use PWM ?

if(bit_is_set(PINA,0)) //Check high on pin0 of portA
{
PORTC|=(1<<PINC0); //Turn on the pin
delay_ms_(50);
PORTC|=(1<<PINC0); //Turn off the pin
delay_ms_(50);
}

Please help.
Thanks in advance:)
 

Attachments

  • Fuction generator and spark plug (1).jpg
    Fuction generator and spark plug (1).jpg
    26.2 KB · Views: 1,070
  • Sparkplug_circuit.png
    Sparkplug_circuit.png
    37.7 KB · Views: 1,227

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
I know little about computers.

Either circuit will work, the plug will spark when the transistor is switched off. PWM will give multiple sparks if there is enough time to attain the required primary current.

There should be a high voltage (300V) zener across the transistor to limit the voltage. This can also be done with a capacitor as used with early ignition systems. The transistors should be rated for, say, 500V.

The circuit layout will be critical, a 5kV induced voltage into the computer will be bad news.
 

rabhishek91

Feb 15, 2013
41
Joined
Feb 15, 2013
Messages
41
I know little about computers.

Either circuit will work, the plug will spark when the transistor is switched off. PWM will give multiple sparks if there is enough time to attain the required primary current.

There should be a high voltage (300V) zener across the transistor to limit the voltage. This can also be done with a capacitor as used with early ignition systems. The transistors should be rated for, say, 500V.

The circuit layout will be critical, a 5kV induced voltage into the computer will be bad news.

Thanks for your reply.
"The transistors should be rated for, say, 500V"- Suppose i use 1kV ignition coil with 500V rated transistor. Does this damage the circuit ?
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
Once again, you are getting to the limit of my knowledge.

I have never met a 1kV ignition coil, I played with transistor driven coils many years ago. The coils then had a ratio of 1:20 or so, thus 300V on the primary would give 6kV on the secondary.

The coil should be protected by a spark gap in case the plug is not connected. The plug will limit the voltage seen by the transistor.

If the primary voltage is likely to go up to 1kV, then the transistor should have a rating higher than this.

Fets are reputed to be more tolerant to high voltage transients than npn transistors but I have never blown any up to decide.

Any damage that occurs will be to the driving transistor, if this gives a continuous short, then the coil may overheat, depending on its design.
 

rabhishek91

Feb 15, 2013
41
Joined
Feb 15, 2013
Messages
41
Once again, you are getting to the limit of my knowledge.

I have never met a 1kV ignition coil, I played with transistor driven coils many years ago. The coils then had a ratio of 1:20 or so, thus 300V on the primary would give 6kV on the secondary.

The coil should be protected by a spark gap in case the plug is not connected. The plug will limit the voltage seen by the transistor.

If the primary voltage is likely to go up to 1kV, then the transistor should have a rating higher than this.

Fets are reputed to be more tolerant to high voltage transients than npn transistors but I have never blown any up to decide.

Any damage that occurs will be to the driving transistor, if this gives a continuous short, then the coil may overheat, depending on its design.

Got it sir.
There are many issues to be considered. I shall start learning about this from scratch.
By the way, I was thinking to use a low voltage ignition coil. (since it is only for demonstration purpose). Shall i go for it ?
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
Yes, go for it, you will learn a lot.
A 12V source and an old 12V coil will be the way to start.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
A couple of suggestions to add to duke37's advice.

When the switching device turns off, there will be a big spike at the collector/drain which will be coupled back into the base through the Miller capacitance (*) in the switching device. Therefore you need a drive that not only pulls high strongly, to turn the active device ON, but pulls low strongly as well, to ensure the device is fully turned OFF.

I'm not sure that a Darlington would be the best choice for the switching device, because it doesn't turn OFF strongly, and the collector-emitter capacitance of the first transistor adds to the Miller capacitance of the main transistor. I believe Darlingtons are (or were) used in electronic ignitions though.

I agree with duke37 that a MOSFET is probably better than a bipolar transistor. I believe IGBTs (*) are also used in electronic ignition circuits. In either case, a proper MOSFET or IGBT driver IC is probably a good idea, to get the fast clean switching you want.

If anything unusual happens in your high-voltage switching circuit, it's possible that a large pulse will be fed back to the Arduino. So you want plenty of components between the Arduino and the switching device. This is another reason to use a driver IC. You can connect a series resistor from the Arduino to the driver IC as long as it has high input impedance and low input capacitance. You may also want to use a logic gate as a buffer between the Arduino output and the driver IC input. It's a lot cheaper and easier to replace a logic gate IC than the micro!

As duke37 suggested, you should definitely put a zener diode across the switching device. Unfortunately, this will slow the rise time somewhat, and reduce the sharpness of the output pulse. If this is a problem, you can put a fast high-voltage diode in series with the zener (cathode to cathode) and put a small-value capacitor across the zener. When the circuit is running continuously, the capacitor will charge up to the zener voltage and the only capacitance seen at the switching device will be the capacitance of the fast diode, which is a lot less than the zener capacitance.

The spark will occur when you turn the switching device OFF. You have to turn it ON some time before then, to allow the current to build up in the coil. In automotive usage, this time is called the dwell time, I think. Ideally you want the dwell time to be exactly long enough that the coil is just starting to saturate at the time that you turn the switch OFF, but that requires that you know in advance when the spark will be triggered. Since the engine speed can't change instantaneously, you could calculate when to turn the switching device ON based on the previous spark interval - once you know the ideal dwell time for your coil, subtract it from the previous spark-to-spark interval and wait that long before turning the switching device ON. Then when you turn it OFF at the exact time, it will have been ON for roughly the right length of time, since the spark-to-spark interval cannot change rapidly (because of the inertia in the engine).

Good luck! Please let us know how you get on.

(*) Google and/or Wikipedia any unfamiliar words.

Edit:

I may be wrong about the importance of having a very fast rising edge at the drain of the switching device. I assume this is important because any capacitance will delay the voltage peak, and that would cause the spark to fire shortly _after_ the switching device turns OFF. But reading duke37's post again, I remember that electronic ignition circuits do use a capacitor, and so do points ignition systems - it's the "condenser". Perhaps this improves the spark quality by reducing the impedance seen at the coil secondary. Do you know? Your circuit diagram doesn't show a "condenser". If you use one, the zener capacitance won't be significant so you won't need the diode snubber circuit I described. But be aware that there will be a short delay between the time when you turn the switching device OFF and the time when the peak voltage is reached at the coil secondary.
 
Last edited:

rabhishek91

Feb 15, 2013
41
Joined
Feb 15, 2013
Messages
41
A couple of suggestions to add to duke37's advice.

When the switching device turns off, there will be a big spike at the collector/drain which will be coupled back into the base through the Miller capacitance (*) in the switching device. Therefore you need a drive that not only pulls high strongly, to turn the active device ON, but pulls low strongly as well, to ensure the device is fully turned OFF.

I'm not sure that a Darlington would be the best choice for the switching device, because it doesn't turn OFF strongly, and the collector-emitter capacitance of the first transistor adds to the Miller capacitance of the main transistor. I believe Darlingtons are (or were) used in electronic ignitions though.

I agree with duke37 that a MOSFET is probably better than a bipolar transistor. I believe IGBTs (*) are also used in electronic ignition circuits. In either case, a proper MOSFET or IGBT driver IC is probably a good idea, to get the fast clean switching you want.

If anything unusual happens in your high-voltage switching circuit, it's possible that a large pulse will be fed back to the Arduino. So you want plenty of components between the Arduino and the switching device. This is another reason to use a driver IC. You can connect a series resistor from the Arduino to the driver IC as long as it has high input impedance and low input capacitance. You may also want to use a logic gate as a buffer between the Arduino output and the driver IC input. It's a lot cheaper and easier to replace a logic gate IC than the micro!

As duke37 suggested, you should definitely put a zener diode across the switching device. Unfortunately, this will slow the rise time somewhat, and reduce the sharpness of the output pulse. If this is a problem, you can put a fast high-voltage diode in series with the zener (cathode to cathode) and put a small-value capacitor across the zener. When the circuit is running continuously, the capacitor will charge up to the zener voltage and the only capacitance seen at the switching device will be the capacitance of the fast diode, which is a lot less than the zener capacitance.

The spark will occur when you turn the switching device OFF. You have to turn it ON some time before then, to allow the current to build up in the coil. In automotive usage, this time is called the dwell time, I think. Ideally you want the dwell time to be exactly long enough that the coil is just starting to saturate at the time that you turn the switch OFF, but that requires that you know in advance when the spark will be triggered. Since the engine speed can't change instantaneously, you could calculate when to turn the switching device ON based on the previous spark interval - once you know the ideal dwell time for your coil, subtract it from the previous spark-to-spark interval and wait that long before turning the switching device ON. Then when you turn it OFF at the exact time, it will have been ON for roughly the right length of time, since the spark-to-spark interval cannot change rapidly (because of the inertia in the engine).

Good luck! Please let us know how you get on.

(*) Google and/or Wikipedia any unfamiliar words.

Edit:

I may be wrong about the importance of having a very fast rising edge at the drain of the switching device. I assume this is important because any capacitance will delay the voltage peak, and that would cause the spark to fire shortly _after_ the switching device turns OFF. But reading duke37's post again, I remember that electronic ignition circuits do use a capacitor, and so do points ignition systems - it's the "condenser". Perhaps this improves the spark quality by reducing the impedance seen at the coil secondary. Do you know? Your circuit diagram doesn't show a "condenser". If you use one, the zener capacitance won't be significant so you won't need the diode snubber circuit I described. But be aware that there will be a short delay between the time when you turn the switching device OFF and the time when the peak voltage is reached at the coil secondary.

Thank you so much for your input sir. I'll work on it and keep you posted.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
The capacitor (condenser) in the early systems was there to give a delay so that the points had a short time to open before the high voltage occurred, thus protecting them from sparking and destruction.

A better system was the capacitor discharge system whereby a capacitor was charged to 300V or so and then discharged through the coil when required. This had several advantages including higher frequency ability, could start a car with a low battery and no possibility of burning out the coil if the engine was not started and the points were closed.

If I were you, I would get the fet and coil wired together and get the sparks going with a switch, only later thinking of adding the computer.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
duke37, thanks for the explanation.

I checked out the Wikipedia article (as I should have done earlier), but it wasn't of much help. It did mention the ballast resistor, placed in series with the primary and shorted out during cranking. The ballast resistor will affect the waveforms at the coil compared to having no ballast resistor; is this important for the engine's operation or is it just a way to reduce wear?

The electronic ignition shown in the Wikipedia article does have a "condenser".

Capacitive discharge has some good advantages, but it's a lot more complicated to implement because of the inverter.

This is an interesting discussion!
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
The coil needs to be 'charged' in between the sparks, to do this at high speed, a low inductance is required and a resistor is used to define the current and limit the dissipation in the coil if the engine is not started and left with the points closed. There were problems with 'sports' coils.

When the starter is engaged, the battery volts will drop, possibly enough to not give a decent spark. Shorting out the resistor during cranking puts the full battery voltage on the coil but there is no risk of coil burn out during the short time the starter is engaged. Thus you get more reliable starting with a more powerful (and thirsty) coil.

The nice thing about the capactor discharge system is that the capacitor will be charged when the voltage is highest during cranking but the contact system will need a spark at TDC when the speed and voltage is lowest. A regulated capacitor discharge circuit can be made which will work on a low voltage and current so that in an emergency, the engine can be started using a few torch cells - and a good push!
 
Top