Micro-controller controlled Spark plug

Discussion in 'Embedded Systems and Microcontrollers' started by rabhishek91, Apr 30, 2013.

  1. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    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 :)
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,605
    Yes darlingtons have a high current gain so a controller pin doesn't get overloaded.

    Maybe. I have no idea what current the ignition coil needs. Do you have any information on that?

    Ignition coils work like so: A current is switched on thru the primary coil and allowed to build to a maximum. It may be held at that value for a time. When it is time to fire the spark plug the primary current in interrupted which in turn causes the energy stored in the coil to dump out the secondary, and since this is an inductor the voltage will rise as much as necessary to produce a current flow.

    This would look like:

    Switch ON: charge primary
    Delay_1
    Switch OFF: fire spark plug
    Delay_2

    These delays will depend on the coil, which depends on the spark plug, which depends on the engine...
     
    rabhishek91 likes this.
  3. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Thanks for your reply sir.

    "I have no idea what current the ignition coil needs. Do you have any information on that?"- No sir. I have not yet brought the components. Was learning the theory side of it.

    Instead of these circuits. Can i use a signal generator (with square waves) to drive the coil ?
     
  4. Litch

    Member

    Jan 25, 2013
    86
    7
    There are several different types of ignition coils, namely the old style use a condensor capacitor; ie:-

    1. +12V is applied to the coil
    2. The supply is severed, the magnetic flux collapses and the high voltage is induced on to the secondary. The flux also collapses on the primary as well, and an back flow, usually in the order of several hundred volts is presented to the primary side of the circuit.
    3. The capacitor absorbs most of this, saving the power supply.

    Modern coils just need a diode (like you would with a relay).

    In any case, coils require a fair amount of current, if you're going to stick with the darlington setup, then some 2N3055 should do - and I'd put them before the coil (source, not sink) and drive them with a smaller NPN.

    Also, a 800v 6A diode with a small HV capacitor will yield a better spark as the coil-capacitor will resonate for a bit expending most of the energy of that part of the circuit out the HV side of the coil.

    -KB
     
    rabhishek91 likes this.
  5. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    "smaller NPN" refers to low voltage rating NPN right like BC107 ?
     
  6. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Unless you isolate the power to your Uc, the voltage spikes from the ignition coil primary will destroy it. Ask me how I know that. Also, don't use a regulated power supply to run the coil.
     
  7. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    I have used a similar circuit when I designed an ECU for a motorbike.

    Beware the primary side on switch off can go to around 400 volts so you will need around a 600 volt mosfet.
     
  8. Litch

    Member

    Jan 25, 2013
    86
    7
    Yeah, BC107, BC548 something around that.

    Your coil is going to want around 6 Amps; the gain of a 2N3055 is around 50 so you'll need to feed around 150mA to both of the 2N3055 (~300mA total) - so a BC548 would probably be better suited (Rated @ 500mA constant, versus 100mA for the BC107)
     
  9. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Yes sir. I got to know about that.

    "Ask me how I know that"- I believe it's your experience.

    "Also, don't use a regulated power supply to run the coil"- May i know the reason sir ?
     
  10. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Thank you sir :)
     
  11. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Same reason. High voltage spikes will kill it.
     
    rabhishek91 likes this.
  12. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,015
    1,531
  13. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
  14. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Looks like they have the option of running the coil on 24V.
     
    shortbus likes this.
  15. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Thank you sir. I'll work on the circuit.
     
  16. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Sir today i built the circuit(First circuit) and tested myself from the below resource (as per your suggestion)
    http://www.rmcybernetics.com/projects/DIY_Devices/homemade_ignition_coil_driver.htm

    Everything worked fine but there was overloading at the input.
    However snubber circuits are built using R & C which should have avoided it. Please correct me if i am wrong and guide me.

    By the way, i used BC107 transistor instead of BFY51 and used 1N4007 instead of Schottkey diode due to unavailability.
     
  17. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Input of what? What do you mean by "overloading"??
     
  18. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    "Input of what?" - 12V DC supply

    What do you mean by "overloading"??- Sorry to say this. But i used 12V regulated DC supply just to test out (You had mentioned before not to use regulated supply but i was just figuring out will it work or not). As soon i turned on the overloading alarm started.

    Later i tried using a step down transformers+ rectifier (converting 230V AC to 12V DC). I worked but the transformer started heating after few mintues.

    Please throw some light on my mistakes.
     
  19. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    What you have, as others have mentioned, are large 400+ volt spikes on the primary side of the coil. That's what you need to isolate from. Seems a transformer/rectifier sould work but it needs to be pretty heavy duty. Others have just used a large 12V battery. Heck, that's how it's powered in a car, and that seems to work OK. Be careful about using snubbers. They can kill the fast rising voltage, which you need for a good spark. The best design I ever saw used a stack of zeners to make a 400V zener. That allowd a good voltage spike, but kept it to a reasonable level. Sometime in the future, I will experiment with ways to limit spikes back into the power supply. Like Tesla coils, which use a big inductor between the power supply and the coil.

    At least you didnt fry your regulated power supply, like I did :(
     
  20. rabhishek91

    Thread Starter Member

    Feb 14, 2013
    51
    1
    Thanks for your suggestion sir.
    "Seems a transformer/rectifier should work but it needs to be pretty heavy duty."- I believe Heavy duty refers to high current rating. Am i right sir ? :confused:

    "At least you didn't fry your regulated power supply, like I did"- I am sorry about it sir.
     
Loading...