Please help with switching of P channel mosfet?

Thread Starter

hasie

Joined Sep 28, 2009
35
Hi guys

I have a problem which I cant really get the hang of, and I thought that id maybe try my luck here.

Would just like help on 2 questions if anybody maybe knows?

1. for general interest -----> Why does one always switch the negative input of a automotive ignition coil? Meaning that the coil wants a permanent +12v and the pulsing is on the negative pin? why can it not work the other way around? The only coils that I have seen that work with a +12V pulse are later model coilpack coils that allready have embedded driver cct's and require a perm +12v aswell and a ground with the +12v pulse.

2. Then the main problem -----> I am trying to build a tester for these units, after thorough research i decided on using power mosfets, for the ease of pulsing from a microcontroller. I need this unit to have a fixed GND and generate +12v pulses for some coil packs, and a constant +12v with negative pulses(or switching to ground if you understand what im trying to say) for other coils.

All the MCU programming is complete, just struggling with the driver circuit.

___________________________________________________
For the constant 12v and negative(GND) pulses, I used a N Channel mosfet, like described mostly over the net(In a common emitter type config). It works pretty well
and I get 11.9V which I think is pretty decent for a 12V source.

Here is the circuit I am using for the constant +12v and the negative (GND) pulses:
PLEASE NOTE I HAVE NOT ADDED IN THE SNUBBER PROTECTION CCT OVER THE "SIMULATION COIL", the circuit is just to give an idea.



________________________________________________________

However, for the constant GND and +12v pulses circuit, i use a P channel mosfet which according me needs a GND to open, and needs to be pulled up. So im driving it with a PNP transistor which switches the P channel gate to GND. Now for some reason I am getting a Max voltage of 10.6 over the load(coil) in simulation. I am quite new to mosfets and was under the impression this should switch the gate to open fully and give a 12v over the load, but no matter how I move my config it does not happen.

Here is the circuit I am using for the constant GND and the +12v pulses:
PLEASE NOTE I HAVE NOT ADDED IN THE SNUBBER PROTECTION CCT OVER THE "SIMULATION COIL", the circuit is just to give an idea.



______________________________________________________________
Is there any reason why this is like this? Anybody maybe know? like I said I am fairly new to mosfets, and would really appreciate help if possible?



3. Last question, is it better to use a proper RC Snubber over the coil in the above mentioned circuits, or will a simple Flywheel diode do the trick in protecting from back EMF? are there any advantages in using a proper snubber cct?




Many thanks in advance

Cheers
 

t_n_k

Joined Mar 6, 2009
5,455
Rds on for the IRF9Z24N is quoted as .175Ω at 12A

At a coil "charging" current of 10A (say) you would lose ~1.75V across the mosfet.
 

SgtWookie

Joined Jul 17, 2007
22,230
You're using a resistor to simulate your coil primary. That's not so good.

Try using a transformer instead. Perhaps 1mH on the primary, 100mH on the secondary.
 

jpanhalt

Joined Jan 18, 2008
11,087
Hi guys

I have a problem which I cant really get the hang of, and I thought that id maybe try my luck here.

Would just like help on 2 questions if anybody maybe knows?

1. for general interest -----> Why does one always switch the negative input of a automotive ignition coil? Meaning that the coil wants a permanent +12v and the pulsing is on the negative pin? why can it not work the other way around? The only coils that I have seen that work with a +12V pulse are later model coilpack coils that allready have embedded driver cct's and require a perm +12v aswell and a ground with the +12v pulse.
Look at the schematic you have for the N-channel mosfet connection. As TNK noted, the voltage drop across the mosfet will be low when it is conducting. Thus, a gate voltage of 12V relative to ground will give a gate-source differential of 12V, which is enough to turn it on fully. NOW, in your mind put the mosfet on the positive supply side and have its source connected to the load. When it is on, there will still be only a small voltage drop across it, so the source will be roughly 10.25V relative to ground. The gate, however is limited to the supply (12V) in this design. The gate-source differential is then only the voltage drop across the mosfet, or 1.75V in this example. That is not enough to turn on or keep on the mosfet.

The first configuration (switching the negative side) is called having the mosfet on the low side. The second, hypothetical configuration is called high-side. Special drivers are made for using N-channel mosfets on the high side. They simply boost the gate drive to VCC+10V (roughly). But for simplicity, it is just easier in this application to use the mosfet on the low side. Additionally, N-mosfets generally have lower on resistance than P-mosfets.

You can try a similar analysis of the P-channel mosfet and see why they are usually used on the high side.

John
 

Thread Starter

hasie

Joined Sep 28, 2009
35
Many thanks for the help guys

@SgtWookie:
Yes sorry just did the design like that to show guys what im trying to do, just trying to get the voltage to 12v on the p channel.


Look at the schematic you have for the N-channel mosfet connection. As TNK noted, the voltage drop across the mosfet will be low when it is conducting. Thus, a gate voltage of 12V relative to ground will give a gate-source differential of 12V, which is enough to turn it on fully. NOW, in your mind put the mosfet on the positive supply side and have its source connected to the load. When it is on, there will still be only a small voltage drop across it, so the source will be roughly 10.25V relative to ground. The gate, however is limited to the supply (12V) in this design. The gate-source differential is then only the voltage drop across the mosfet, or 1.75V in this example. That is not enough to turn on or keep on the mosfet.

The first configuration (switching the negative side) is called having the mosfet on the low side. The second, hypothetical configuration is called high-side. Special drivers are made for using N-channel mosfets on the high side. They simply boost the gate drive to VCC+10V (roughly). But for simplicity, it is just easier in this application to use the mosfet on the low side. Additionally, N-mosfets generally have lower on resistance than P-mosfets.

You can try a similar analysis of the P-channel mosfet and see why they are usually used on the high side.

John
Many thanks, appreciate the feedback. I understand what you are saying about using the load on the source and why I am losing voltage.

The special drivers you are talking about, will they solve this problem? as I see if I even give the gate 10V pulses it still does not change the voltage over the load.
Like i said please excuse I am reletively new to mosfets.

Sorry I Cant understand after that what you suggest I specifically do?

Any other way I can get a 12v pulse from the 5V MCU signal?

Many thanks
 

jpanhalt

Joined Jan 18, 2008
11,087
You have raised a few issues here. Let me try to rephrase to see if I understand.

1) Why not put the load on the N-mosfet source? You can, but you need a high-side driver to make it work. There are times when that is needed, as in H-bridges that take advantage of the lower on-resistance of N-mosfets. One can come across other design reasons too, like a one-wire motor where the case is grounded and can't be isolated, and so forth. In an ignition system, why go to that complexity? They can be problematic enough alone. Or, to put it another way, why do you want to put the load on the source? Just to see if it can be done is fine. It can be done, and perhaps you should or already have tried to do that.. But, for a final design, why buck years of engineering and thousands of very bright people who did it the conventional way.

2) Is there a way to drive the gate with 5V? Yes. You can use a boost method (e.g., a switched capacitor voltage doubler) or simply use a "logic level" mosfet. Some turn on with voltages as low as 2.5V or so. If you are running it with an MCU, be sure to account for the limited source current it can provide. Often a larger gate resistor than usual (e.g., 200 ohm) is used to limit the max. current to the 25 mA allowed by PIC's.

3) I don't understand what it is that you don't understand "after that." Can you rephrase that question?

John
 

Thread Starter

hasie

Joined Sep 28, 2009
35
Thanks you for the help, really appreciate it.

You have raised a few issues here. Let me try to rephrase to see if I understand.

1) Why not put the load on the N-mosfet source? You can, but you need a high-side driver to make it work. There are times when that is needed, as in H-bridges that take advantage of the lower on-resistance of N-mosfets. One can come across other design reasons too, like a one-wire motor where the case is grounded and can't be isolated, and so forth. In an ignition system, why go to that complexity? They can be problematic enough alone. Or, to put it another way, why do you want to put the load on the source? Just to see if it can be done is fine. It can be done, and perhaps you should or already have tried to do that.. But, for a final design, why buck years of engineering and thousands of very bright people who did it the conventional way.
The reason I want to do it both ways is the following.
I basically have 2 types of coils I plan to test in this device.

1st type: Coils that work like a normal ignition coil(allthough they are coilpacks the work the same. All the cylinders coils have a common +12v, and when the are pulsed with a negative(GND) they spark, for these ones I will use the N channel circuit as shown above.

2nd type: Coils that need +12v Pulsing. They have 3 basic connections. They have a Permanent and common GND, permanent and common +12v, en then they have trigger pins which require +12v pulses(one for each cylinder), im guessing that these allready have small driver circuits built into them. This is why I want positive pulses. These are sealed units so can only use the pins provided. And thats why I wanted to connect the load on the source. To get a positive signal to the coil pin everytime I give a pulse from the MCU. It gets grounded through its ground pin, but I want to use the source to give a positive signal when the mosfet is switched.

Here is a quick paint drawing to show what I am trying to say,



2) Is there a way to drive the gate with 5V? Yes. You can use a boost method (e.g., a switched capacitor voltage doubler) or simply use a "logic level" mosfet. Some turn on with voltages as low as 2.5V or so. If you are running it with an MCU, be sure to account for the limited source current it can provide. Often a larger gate resistor than usual (e.g., 200 ohm) is used to limit the max. current to the 25 mA allowed by PIC's.
I have read about these logic level mosfets, and will in future use these thanks, allthough the problem is not in it switching on fully as I understand?

3) I don't understand what it is that you don't understand "after that." Can you rephrase that question?

John
Sorry I was referring to a comment 2 posts back where you said:
You can try a similar analysis of the P-channel mosfet and see why they are usually used on the high side.

John

Many thanks for the help, sorry for the misunderstanding sometimes its ahrd to explain in writing.

Do you understand what I am trying to say why I want to connect the one type onto the source?

THanks
Cheers
 

jpanhalt

Joined Jan 18, 2008
11,087
You can use a P-mosfet as shown. They turn on completely, but have slightly higher RDS(on) compared to similar N-mosfets. There are explanations of that empiric fact in the literature. It has something to do with moving holes instead of charges. I'm just a chemist, not a physicist.

As for your drive, I suspect it might work. Why do you have the resistor network consisting of R5, R6, and R9? The mosfet gate will tolerate 12 V (it is probably rated at +/- 20V). So, I would try just two resistors, a gate and a dropping resistor. You may even get by without a gate resistor.

John
 

Thread Starter

hasie

Joined Sep 28, 2009
35
thanks for all the help!

It looks to be working then, and glad that you say it should work.
I will build the cct tomorrow and test it, I managed to find a stronger P-ch mosfet for cheaper with a lower RDSon(IRF9540N) so Im sitting al 11v which should be enough.

Last question, is it better to use a proper RC Snubber over the coil in the above mentioned circuits, or will a simple Flywheel diode do the trick in protecting from back EMF? are there any advantages in using a proper snubber cct?

Note that my mosfets are 60v(N-Ch) max and 100v max(P-ch).

As I understand if I design a good snubber it should be safe, but which would be better? (flywheel diode/ snubber)

Also note maximum switching frequency would be 100Hz so not really fast, and the duty cycle is on a permanent 50%.

Many thanks for the help, is really apprecited

Cheers
 

jpanhalt

Joined Jan 18, 2008
11,087
I am just shooting from the hip on this. But in my analysis of the question, your primary concern is to protect the mosfet, not to get rid of a few oscillations that might be problematic in other applications. Also, an ignition mosfet is switching relatively infrequently, compared to power supplies, DC motor controls, etc. That is, 12,000 rpm on a 4-stroke is only 100 Hz per cylinder or 200 Hz, if you fire on the exhaust stroke too (a common practice).

Thus, I would get a fast diode to protect the mosfet. I would also add a capacitor to absorb the instantaneous kick, but I don't see a need for anything more complicated. What do you mean by a "good snubber"? Can you post your ideas for that?

John
 

Thread Starter

hasie

Joined Sep 28, 2009
35
By snubber I mean a capacitor and discharge resistor in parallel with the coil.
Last time I used some high voltage caps, and the worked fine for a while, was just wondering what the best way is.

here is a pic of a basic snubber




if you think a way like this should be used, how can one get proper values for a circuit?
 

Bychon

Joined Mar 12, 2010
469
The best way is to use a diode. It's simpler, cheaper, and doesn't try to survive voltage spikes. It just dumps the voltage back onto the power supply capacitors.
 

jpanhalt

Joined Jan 18, 2008
11,087
I agree using the diode is best. I based my comment about a capacitor across the diode on a comment made here:
What diode are you using across the relay? Power rectification diodes can be slow. You might try using 1N4148/1N914 computer switching diodes instead. You might also try using a small ceramic capacitor (220pF up to around 470pF) across the diode. This helps to "buy time" for slow diodes to begin to conduct.
That made sense to me, since turn-on time for a diode can be significant. This source (See: http://www.cliftonlaboratories.com/diode_turn-on_time.htm#Why_Use_a_Snubber) calls it "forward recovery," which is not a value you are likely to find in a diode's datasheet. Here is a graph from that link:



This is the land of empiricism. I don't think you will be able to get a theoretically best answer. Just try it both ways. Frying an ignition system is a high price to pay in both dollars and inconvenience for a small capacitor.

John
 

Thread Starter

hasie

Joined Sep 28, 2009
35
Ohk i understand it thanks!

Will use a 1n4148 and small cap in parrallel with coil. Will test and see what works,


Thank you for everybody's help, this has been very informative to say the least, i appreciate it ..

Thanks
Cheers
 

SgtWookie

Joined Jul 17, 2007
22,230
A 1N4148 will likely vaporize the first time the MOSFET turns off. You're talking a good bit of current here, and a 1N4148 is rated for a max of 100mA; you might get a peak of 1A out of it, but not for continued operation.

If you use a flywheel diode, you probably will kill the output from the coil. A snubber could probably take care of it. If not, a Zener back to back with a standard diode. You want the current decay to be rapid, and a flywheel diode with a low Vf will take too long to slow the current flow down.
 

Thread Starter

hasie

Joined Sep 28, 2009
35
I didnt see that somebody replied today!

as SgtWookie mentioned the first time the mosfet turned of i saw smoke en saw sparks inside the 1n4148 lol!


Would it be wise to just disconnect the 1n4148 and leave only the capacitor connected in parralel with the load, or do I have to put a resistor next to the capacitor?

Which would be the best option and do you think I should do?

I did read this on another site before I came to read here and came across this


The freewheel diode will stop the circuit working. It will limit the voltage on the coil so much that you don't get much of a spark at all. A freewheel diode is an excelent idea for driving a relay or solenoid, where the magnetic field is what is important, and it doesn't matter how fast it starts or stops.

In an ignition coil, what is wanted is voltage. The voltage is proportional to the rate of change of magnetic field, so the current has to be made to stop quickly.


So it makes perfect sense what you are saying..


Would it be advisable to just leave a small high voltage capacitor in parallel with the coil or is there another better way you could maybe recommend?

Many thanks
 

jpanhalt

Joined Jan 18, 2008
11,087
Get a bigger diode. A 1N400x might work. They will have slower turn on times, which means the capacitor still may be needed based on the assumption given above.

As for the capacitor, are you using a leaded capacitor? The wires on such are often tin-plated steel, and they can get quite hot if you push a lot of current. Of course, that may not be good for the capacitor either.

So, if you are not using a diode, I would definitely use the resistor in series with the capacitor. With the diode and a small ceramic capacitor, a current limiting resistor may not be needed.

John
 

SgtWookie

Joined Jul 17, 2007
22,230
John,
I guess you didn't read the part about where I said that a flywheel diode would kill the output from the coil. I was talking about the secondary voltage. If he doesn't get an output, it won't be a very helpful test.
 

Thread Starter

hasie

Joined Sep 28, 2009
35
Another thing I would like to ask if you maybe know/can advise me on...


This unit that i built is controlled by a PIC, 2 shift registers and 4 7 segment displays.

the spark plugs are mounted onto the side of the unit which is grounded on the supply ground.

As soon as the sparking of the spark plugs get to about 50Hz, it interferes with the displays, showing random values and shapes. How can I filter out this noise to not interfere with my control circuit?

Many thanks
 
Top