Go Down

Topic: Comments requested on MOSFET high-side driver (Read 8929 times) previous topic - next topic

nickgammon

Introduction

I find I learn a lot by writing tutorials, because when you write a tutorial you want to explain exactly why you did something, rather than something else. Also it helps you clarify concepts in your mind (my mind, that is).

I am working on a page about interfacing with a high-side driver (ie. to source current rather than sink it) using a P-channel MOSFET.

There are some great YouTube videos about this subject, but I find at times that I want to just "glance at a circuit" rather than sit there watching a video for 10 minutes, to try to find the part where they explain about the relationship between current, RDSOn and heat.

Schematic

Below is the proposed schematic:



For testing, the MOSFET is a FQP47P06 and the transistor is a 2N3904.

You are welcome to make suggestions about the values of the components (eg. R1 and R2).

Also D1, I am using a 1N4148 for a 300 mA motor. Would this be adequate? Would a Schottky be better, or is that overkill? I believe the 1N4148 is a fast (4nS) recovery, 200 mA, 100V diode.


I have tested with a 2 ohm load, driving the whole thing from a power supply limited to 1 amp. The input pin is a 1 kHz square wave (at 5V).

Overall results are:




The blue trace is the Gate of Q2 and the yellow trace is the Drain of Q2.

As expected, the FET turns on when the gate becomes more negative, and turns off when the gate becomes less negative. In particular:



The delta there is around 2V which agrees with the datasheet which quotes VGS(th) as -2V mininum.




Turn-off time

Once concern I have is the fairly lengthy turn-off time:



That is around 58 µS which seems a lot. It also accounts for, I think, that the FET is getting hot (around 30 °C) because it is running unsaturated for quite a while.

Would a lower value for R2 help here? Any suggested values? If R2 was lower, then R1 might need to be lower too to provide adequate current to sink the gate to 0V when required. Would that be right?




Turn-on time

Turn-on time seems to be somewhat faster (around 1 µS) which seems OK to me:






Power consumption and heat

I calculate the power through the load as being I2R where I is 1 and RDS(on) is 0.021, thus:

Code: [Select]

power = 1 * 1 * 0.021 = 0.021 watts


The "Thermal Resistance Junction to Ambient" (RØJA) is 62.5 °C/W, thus I expect a rise of:

Code: [Select]

0.021 * 62.5 = 1.3125  °C  (over ambient)


Does that sound right? However I am measuring more like 10 degrees rise.




Any other comments or suggestions?
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

polymorph

Yes, a lower R2. 10k is a pretty high resistance to discharge the gate charge.

Unless you are on a tight current budget from the Arduino pins, I think I'd start with a 1k resistor for R1, and 470 ohms for R2.

Using a 200mA rated diode on a 300mA motor seems unwise. I'd use at least a 1A diode. As has already been discussed, a 1N400X diode is fast enough turn-on time, it is the turn-off time that is slow.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

nickgammon

Come to think of it, I think the description of R2 on the schematic ("R2 is pull-up") is wrong. More precise wording is solicited. :)
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

polymorph

Hm. Well, it -is- a pull-up in the sense that we consider positive voltage on a schematic to be "up".

Its job is to discharge the charge built up on the Gate-Source "capacitor". It is -not- there in case of high impedance. It is there so that when Q1 is turned OFF, the gate is discharged and Q2 turns off. Otherwise it will stay on for a long time, perhaps never turning off once it is turned on due to Q1 leakage.

Or if not Q1 not turned on, Q2 may eventually start drifting into conduction due to Q2 gate charging from Q1 leakage current.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Grumpy_Mike

I would make R2 smaller, say 1K to reduce the turn off time of the FET.

I would also use a 1N4001 diode, that one is just a signal diode.

Cheers

nickgammon

#5
Jan 29, 2015, 11:01 pm Last Edit: Jan 29, 2015, 11:10 pm by Nick Gammon
Quote
I think I'd start with a 1k resistor for R1, and 470 ohms for R2.
So to do the maths:

1k resistor for R1 and assuming a gain of 100 (actually HFE = 300 on the datasheet) would give:

Code: [Select]

(5 - 0.7) / 1000 * 100 = 0.43  (430 mA)


So Q1 can sink 430 mA.

470 ohms for R2, means to drop 12V:

Code: [Select]

12 / 470 = 0.026  (26 mA)


Power through R2:

Code: [Select]

0.026^2 * 470 = 0.318  (318 mW)


Thermal resistance of Q1 (RØJA = 200):

Code: [Select]

 0.318 * 200 = 63.6 °C


That seems a bit hot, or did I get my calculations wrong?
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

polymorph

#6
Jan 29, 2015, 11:21 pm Last Edit: Jan 29, 2015, 11:24 pm by polymorph
Incorrect. You never use the linear small signal beta to calculate saturation current.

Use more like 10 or 20. For a 2N3904, the datasheet says 10x.

Page 3, it rates saturation VCE for IC = 10mA when IB = 1mA, and IC = 50mA when IB = 5mA.
http://www.physics.csbsju.edu/~awhitten/phys358/reference/2N3904_4.pdf

So for 4.3mA, don't count on more than 43mA IC through Q2.

You should always get a resistor with a power rating at least 2x the power that will be dissipated.

It looks like you just took the power in R2 and used it to calculate heat in Q1.

Q1 power is the sum of power from the base and the collector currents and drops:
0.95 * 0.0043 + 0.2 * 0.026 = 9.285mW
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

polymorph

In fact, from the datasheet 200mV drop VCE is maximum. It is usually less than that. But plan for the maximum.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

polymorph

Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

nickgammon

OK just to make sure:

Quote
Q1 power is the sum of power from the base and the collector currents and drops:
0.95 * 0.0043 + 0.2 * 0.026 = 9.285mW
VBE(sat) = 0.95
5V (at pin) - VBE(sat) / 1k  =  (5 - 0.95) / 1000 = 0.00405 (4.05 mA)
VCE (sat) = 0.2
26 mA to sink through the resistor

Thus:

Power =  0.95 * 0.00405 + 0.2 * 0.026 = 0.0090475 (9.05 mW)

Heat gain =  0.0090475 * 200 = 1.81 °C


Does that sound right?
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

polymorph

Whoops, forgot to correct the base current with the higher VBE.    :-[

That looks right.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

nickgammon

Changing R2 to 470 ohms seems to have reduced the rise time at the gate to 5.5 µS.


Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

polymorph

From 58uS to 5.5uS. Sounds about right.

One of the problems you run into with a MOSFET is drain to gate capacitance. So as the gate is discharging (going high), the drain is going low, and the capacitance between gate and drain slows the discharge of the gate by providing some charging current.

That is probably part of why a 20:1 change in resistance only resulted in an 11:1 change in Off switching time.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

nickgammon

So it would be reasonable to suggest, other things being equal, that if we are doing PWM, to reduce the frequency, so that these "edge cases" happen less often? Obviously this problem goes away if we are switching infrequently, like turning garden lights on and off.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

nickgammon

I have finished the tentative tutorial, which is at http://www.gammon.com.au/forum/?id=12737.

There is more explanation in the tutorial than I had above, plus a low-side driver (to sink current). If you spot any mistakes please let me know.

@polymorph - I scaled R2 back to 1k, it seemed we were getting diminishing returns on low-value resistors, and that would keep the current drain on Q1 down. The switching time is now about 7.5 µS.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Go Up