Author Topic: Driving P-Channel Mosfet  (Read 6014 times)

0 Members and 1 Guest are viewing this topic.

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Driving P-Channel Mosfet
« on: June 26, 2020, 05:15:44 pm »
Hi,

Here is the schematic for driving a motor using PWM at frequency of 5KHz.

The specifications of P-Channel MOSFET are
VDS 30V
VGS ±20
RDS 20mΩ @VGS -10V

Will it work for a 12V motor?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: Driving P-Channel Mosfet
« Reply #1 on: June 26, 2020, 05:46:24 pm »
It won't work at all. Your MOSFET's upside down.

 
The following users thanked this post: girishv

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Driving P-Channel Mosfet
« Reply #2 on: June 26, 2020, 05:48:18 pm »
What's Qgs(tot)?  Or better yet what's the datasheet?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: Driving P-Channel Mosfet
« Reply #3 on: June 26, 2020, 05:54:14 pm »
Apart from the fact the PMOS is upside down (don't even try - it's not just that it won't work, but due to the body diode of the MOSFET, it will short-circuit pour power supply), this scheme is probably not the best for what you want to achieve. We'd need to know about the input  capacitance of the exact transistor you're going to use, but with the 10k pull-up, @5kHz, switching losses are going to be pretty significant.
 
The following users thanked this post: girishv

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #4 on: June 26, 2020, 06:02:48 pm »
It won't work at all. Your MOSFET's upside down.

I was stupid. I have revised the schematic and attached here.

What's Qgs(tot)?  Or better yet what's the datasheet?

Tim

Qgs 5.5 nC. Translated from Chinese language  :)
 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #5 on: June 26, 2020, 06:07:53 pm »
Apart from the fact the PMOS is upside down (don't even try - it's not just that it won't work, but due to the body diode of the MOSFET, it will short-circuit pour power supply), this scheme is probably not the best for what you want to achieve. We'd need to know about the input  capacitance of the exact transistor you're going to use, but with the 10k pull-up, @5kHz, switching losses are going to be pretty significant.

I revised the schematic and added to my previous reply. I need to create a motor driver and keep the cost as low as possible. I don't know much about MOSFET's. How do I select one for 5KHz PWM?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Driving P-Channel Mosfet
« Reply #6 on: June 26, 2020, 06:36:04 pm »
Oops, I shouldn't say Qgs, that's a separate part of Qg(tot).

Ceff = Qg(tot) / Vgs(on)

So if it's 5.5nC, then Ceff is 550pF.  Give or take that you're running it at 12V, so Qg(tot) is probably higher, but Ceff may or may not be the same.  Anyway, it won't be grossly different.

Actually, maybe it's not 12V gate drive, there's an emitter resistor and presumably a logic level input.  (104 ohms, that's really oddball?)  What logic level? CMOS, 3.3V, 5V? TTL?  The collector only pulls down to a bit above the emitter voltage, and if the emitter voltage is set by the input voltage, it might saturate at say 2-4V depending on source.  Which puts 8-10V across the MOSFET, which is still just fine.

At turn-on, you have a fairly strong current from the BJT.  If it's about 3V over 100 ohms, that's 30mA (minus up to 1mA into the pullup resistor, who cares), and we can expect the gate to turn on in about
t_on = C dV / I = (550pF) (10V) / (30mA) = 0.18us
which is fine.

Turn-off is the bigger concern.  Here you have no current from the transistor, only the resistor discharging it.  We draw the equivalent RC circuit, 550pF in parallel with 10k, initially charged to ~10V.  This has an RC time constant of 5.5us, which is quite long, quite a bit longer than the turn-on case.  A smaller resistance may be desirable (say 2.2k or 1k).  A better drive circuit isn't really necessary, but is an option.

5kHz is 200us per cycle, so you should want switching times much less than that, say, below 2us.


Finally, protection:

- The motor is an inductive load, right?  (Possibly a BLDC motor isn't, I'm not sure; a brushed or universal motor definitely is.)  When the transistor turns off, its inductance will act to continue the current flow, even as the motor voltage drops to zero, and below (negative).  Typically, a diode from GND to output is used to clamp this.  The current decays through the diode, and voltage is limited.  Simple and effective.  (The diode, transistor and a supply bypass capacitor should all be placed nearby.)

- What is the motor's maximum current (LRA)?  You should want some kind of protection here, either brute force (the FET is beefy enough to supply the excess current without blowing up), or active (sense current flow, and turn off the FET if it gets too high).  (Fusing is a possibility, but not practical here: transistors take ~100 microseconds to blow up, while fuses take ~10,000 microseconds to blow up.  Definitely recommended for protecting the wiring, but it won't save the transistor.)

- What is the power source?  If this is automotive power, mind that the supply can be quite messy.  I wouldn't recommend taking gate voltage directly from it.  This can be fixed easily by putting a zener diode from gate to source, say 1N5245 or equivalent.  If the supply voltage jumps up suddenly, the diode clamps Vgs, and the remainder is dropped across the BJT -- which since it's limited to 40mA or so, is fine, it won't explode (at least, not instantly).

- Also if Vds(max) is pretty low, that's a concern.  I wouldn't recommend less than 30V rating for automotive; >= 60V is industry standard.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: girishv

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: Driving P-Channel Mosfet
« Reply #7 on: June 26, 2020, 06:39:44 pm »
why high-side drive?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: Driving P-Channel Mosfet
« Reply #8 on: June 26, 2020, 09:14:34 pm »
I would add an NPN transistor for a pull-up which will increase the current from the 10k resistor by about 100 times.  Then the lower transistor pulls the base of the NPN transistor down and the gate down through a diode.  When the lower transistor turns off, then the upper NPN pulls the gate high.
 
The following users thanked this post: girishv

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: Driving P-Channel Mosfet
« Reply #9 on: June 26, 2020, 10:43:26 pm »
I would add an NPN transistor for a pull-up which will increase the current from the 10k resistor by about 100 times.  Then the lower transistor pulls the base of the NPN transistor down and the gate down through a diode.  When the lower transistor turns off, then the upper NPN pulls the gate high.

For the sake of curiosity, was it something like this you meant? Ignore the load specs, I don't know motors.

 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #10 on: June 27, 2020, 01:02:23 am »
- What is the power source?  If this is automotive power, mind that the supply can be quite messy.  I wouldn't recommend taking gate voltage directly from it.  This can be fixed easily by putting a zener diode from gate to source, say 1N5245 or equivalent.  If the supply voltage jumps up suddenly, the diode clamps Vgs, and the remainder is dropped across the BJT -- which since it's limited to 40mA or so, is fine, it won't explode (at least, not instantly).

- Also if Vds(max) is pretty low, that's a concern.  I wouldn't recommend less than 30V rating for automotive; >= 60V is industry standard.

Tim

Protection: I will use a diode as suggested. I will also ensure diode, bypass capacitor and transistor are positioned close in layout.

Motor: The motor is brushed DC motor and consumes around 850mA. The +12V supply will come from a AC-DC regulator. The logic level is 3.3V. I am going to use a MOSFET with continuous drain current rating of 7A or more.

The VDS of transistor is 30V.

I want to keep the drive circuit as simple as possible. But, I am ready to change if need.
 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #11 on: June 27, 2020, 01:05:33 am »
Turn-off is the bigger concern.  Here you have no current from the transistor, only the resistor discharging it.  We draw the equivalent RC circuit, 550pF in parallel with 10k, initially charged to ~10V.  This has an RC time constant of 5.5us, which is quite long, quite a bit longer than the turn-on case.  A smaller resistance may be desirable (say 2.2k or 1k).  A better drive circuit isn't really necessary, but is an option.

5kHz is 200us per cycle, so you should want switching times much less than that, say, below 2us.

I will replace the 10k resistor with 1k as suggested
 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #12 on: June 27, 2020, 01:09:30 am »
why high-side drive?

I used an existing example circuit driving a P-Channel MOSFET.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4427
  • Country: dk
Re: Driving P-Channel Mosfet
« Reply #13 on: June 27, 2020, 01:30:45 am »
why high-side drive?

I used an existing example circuit driving a P-Channel MOSFET.

much simpler to use an N-channel on the lowside
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Driving P-Channel Mosfet
« Reply #14 on: June 27, 2020, 02:30:19 am »
If the load does not need to be common-ground, yeah, a logic-level FET can do that without the resistor(s) and BJT.


For the sake of curiosity, was it something like this you meant? Ignore the load specs, I don't know motors.

Yes, that's a good improvement, and you can save even more on the pullup resistor, for example even a 100k gives about the same results as a 1k without the follower, but at a tiny fraction of the on-state quiescent current.  (Not that that's a big concern with an 850mA load already running.  Pick your battles, and all.)

One downside: the gate doesn't pull up to +V, but to about 0.6V less; this makes logic-level FETs iffy (which can have Vgs(th) of (-)0.8V or smaller).  It doesn't sound like the present case uses one so that's fine, but it's something to watch out for otherwise.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #15 on: June 27, 2020, 03:17:56 am »
If the load does not need to be common-ground, yeah, a logic-level FET can do that without the resistor(s) and BJT.

I did not want to restrict myself to logic level FET. I thought, driving with BJT would help to keep the BOM cost low as I will have more FET's to choose from.

 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Driving P-Channel Mosfet
« Reply #16 on: June 27, 2020, 03:24:48 am »
Shrug, there's probably about as many logic-level as PMOS.

I suppose the widest option is regular NMOS + gate driver, a single (additional) component solution -- but a bit more expensive than a BJT or two.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: girishv

Offline magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: Driving P-Channel Mosfet
« Reply #17 on: June 27, 2020, 06:18:38 am »
Motor: The motor is brushed DC motor and consumes around 850mA. The +12V supply will come from a AC-DC regulator. The logic level is 3.3V. I am going to use a MOSFET with continuous drain current rating of 7A or more.
I don't think it would be hard to find dozens of logic level N-FETs capable of driving 1A with miniscule RDS(on) from 3.3V. Did you really try?
 
The following users thanked this post: girishv

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #18 on: June 27, 2020, 08:08:55 am »
Motor: The motor is brushed DC motor and consumes around 850mA. The +12V supply will come from a AC-DC regulator. The logic level is 3.3V. I am going to use a MOSFET with continuous drain current rating of 7A or more.
I don't think it would be hard to find dozens of logic level N-FETs capable of driving 1A with miniscule RDS(on) from 3.3V. Did you really try?

I am considering using a NMOS + gate driver as suggested by @T3sl4co1l. I will also checkout the logic level devices.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16618
  • Country: us
  • DavidH
Re: Driving P-Channel Mosfet
« Reply #19 on: June 28, 2020, 04:39:19 pm »
For the sake of curiosity, was it something like this you meant? Ignore the load specs, I don't know motors.

That is exactly it.  I tried to find an example online but they were all for n-channel MOSFETs which I thought would be confusing.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Driving P-Channel Mosfet
« Reply #20 on: June 28, 2020, 05:39:48 pm »
Logic level only makes sense if you have an N channel MOSFET. Are you trying to PWM this motor or jut turn it on or off?
 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #21 on: June 29, 2020, 06:46:02 am »
Logic level only makes sense if you have an N channel MOSFET. Are you trying to PWM this motor or jut turn it on or off?

I am trying to PWM. I have selected the a logic level N-Channel MOSFET based on suggestions received in this thread.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8173
  • Country: fi
Re: Driving P-Channel Mosfet
« Reply #22 on: June 29, 2020, 11:04:02 am »
Brushed DC motor drive consists of N-channel MOSFET, freewheeling diode, DC link capacitance and current sense for current feedback. (Motor is more like an LED, so primarily current-controlled.)

Minimize the length of the circuit loop that is formed by the DC link capacitance, MOSFET and the freewheeling diode. I.e., these three parts should be close together.

Current sense is most easily implemented as a small-value shunt resistor between the ground and the source leg of the N FET, amplified using a current sense amplifier. Regulate current by adjusting PWM according to the current signal. For example a PI controller is quite easy to tune for such purpose. Current sets the torque directly.

For small motors, utilizing motor resistance to limit maximum current is acceptable, in this case you can skip current sensing and roughly adjust PWM relative to the desired final velocity. Ramping PWM setpoint up/down gradually decreases maximum current and jerking but isn't as good catching edge conditions than actual current regulation.

For the very smallest FETs, say something rated to like 30V and 5A and "logic level", good to control motors up to say 0.5A nominal without current sense,  you can directly drive the gate from a microcontroller pin and skip gate driving and current sensing completely.

With FETs any larger, you likely want a proper gate driver IC just to supply enough gate current. If you need this component anyway for current, just pick one which allows you to use higher gate voltage supply as well, for example, a 10V gate supply even if the IO is 3.3V or 5V.
« Last Edit: June 29, 2020, 11:13:59 am by Siwastaja »
 
The following users thanked this post: girishv

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Driving P-Channel Mosfet
« Reply #23 on: June 29, 2020, 02:01:56 pm »
Depending on the size of the motor and MOSFET you may need a driver rather than rely on the pin of an MCU or other low driving capacity output, this will speed the switching up and reduce heat.
 

Offline girishvTopic starter

  • Regular Contributor
  • *
  • Posts: 114
  • Country: in
Re: Driving P-Channel Mosfet
« Reply #24 on: June 29, 2020, 04:49:29 pm »
Depending on the size of the motor and MOSFET you may need a driver rather than rely on the pin of an MCU or other low driving capacity output, this will speed the switching up and reduce heat.

At this moment, I am looking a 1A or less. I suppose, I can drive directly from MCU.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf