Driving P-Channel Mosfet  - Page 1
Forum section: electronics / projects

author: girishv
author_rank: Regular Contributor
timestamp: June 26, 2020, 05:15:44 pm
content: Hi,Here is the schematic for driving a motor using PWM at frequency of 5KHz.The specifications of P-Channel MOSFET areVDS30VVGS±20RDS20mΩ @VGS-10VWill it work for a 12V motor?

author: Benta
author_rank: Super Contributor
timestamp: June 26, 2020, 05:46:24 pm
content: It won't work at all. Your MOSFET's upside down.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 26, 2020, 05:48:18 pm
content: What's Qgs(tot)? Or better yet what's the datasheet?Tim

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 26, 2020, 05:54:14 pm
content: 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.

author: girishv
author_rank: Regular Contributor
timestamp: June 26, 2020, 06:02:48 pm
content: Quote from: Benta on June 26, 2020, 05:46:24 pmI was stupid. I have revised the schematic and attached here.Quote from: T3sl4co1l on June 26, 2020, 05:48:18 pmQgs5.5 nC. Translated from Chinese language

author: girishv
author_rank: Regular Contributor
timestamp: June 26, 2020, 06:07:53 pm
content: Quote from: SiliconWizard on June 26, 2020, 05:54:14 pmI 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?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 26, 2020, 06:36:04 pm
content: 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 aboutt_on = C dV / I = (550pF) (10V) / (30mA) = 0.18uswhich 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

author: langwadt
author_rank: Super Contributor
timestamp: June 26, 2020, 06:39:44 pm
content: why high-side drive?

author: David Hess
author_rank: Super Contributor
timestamp: June 26, 2020, 09:14:34 pm
content: 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.

author: aheid
author_rank: Regular Contributor
timestamp: June 26, 2020, 10:43:26 pm
content: Quote from: David Hess on June 26, 2020, 09:14:34 pmFor the sake of curiosity, was it something like this you meant? Ignore the load specs, I don't know motors.

author: girishv
author_rank: Regular Contributor
timestamp: June 27, 2020, 01:02:23 am
content: Quote from: T3sl4co1l on June 26, 2020, 06:36:04 pmProtection: 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 VDSof transistor is 30V.I want to keep the drive circuit as simple as possible. But, I am ready to change if need.

author: girishv
author_rank: Regular Contributor
timestamp: June 27, 2020, 01:05:33 am
content: Quote from: T3sl4co1l on June 26, 2020, 06:36:04 pmI will replace the 10k resistor with 1k as suggested

author: girishv
author_rank: Regular Contributor
timestamp: June 27, 2020, 01:09:30 am
content: Quote from: langwadt on June 26, 2020, 06:39:44 pmI used an existing example circuit driving a P-Channel MOSFET.

author: langwadt
author_rank: Super Contributor
timestamp: June 27, 2020, 01:30:45 am
content: Quote from: girishv on June 27, 2020, 01:09:30 ammuch simpler to use an N-channel on the lowside

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 27, 2020, 02:30:19 am
content: If the load does not need to be common-ground, yeah, a logic-level FET can do that without the resistor(s) and BJT.Quote from: aheid on June 26, 2020, 10:43:26 pmYes, 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

author: girishv
author_rank: Regular Contributor
timestamp: June 27, 2020, 03:17:56 am
content: Quote from: T3sl4co1l on June 27, 2020, 02:30:19 amI 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 27, 2020, 03:24:48 am
content: 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

author: magic
author_rank: Super Contributor
timestamp: June 27, 2020, 06:18:38 am
content: Quote from: girishv on June 27, 2020, 01:02:23 amI 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?

author: girishv
author_rank: Regular Contributor
timestamp: June 27, 2020, 08:08:55 am
content: Quote from: magic on June 27, 2020, 06:18:38 amI am considering using a NMOS + gate driver as suggested by @T3sl4co1l. I will also checkout the logic level devices.

author: David Hess
author_rank: Super Contributor
timestamp: June 28, 2020, 04:39:19 pm
content: Quote from: aheid on June 26, 2020, 10:43:26 pmThat is exactly it. I tried to find an example online but they were all for n-channel MOSFETs which I thought would be confusing.

author: Simon
author_rank: Unknown
timestamp: June 28, 2020, 05:39:48 pm
content: 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?

author: girishv
author_rank: Regular Contributor
timestamp: June 29, 2020, 06:46:02 am
content: Quote from: Simon on June 28, 2020, 05:39:48 pmI am trying to PWM. I have selected the a logic level N-Channel MOSFET based on suggestions received in this thread.

author: Siwastaja
author_rank: Super Contributor
timestamp: June 29, 2020, 11:04:02 am
content: 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.

author: Simon
author_rank: Unknown
timestamp: June 29, 2020, 02:01:56 pm
content: 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.

author: girishv
author_rank: Regular Contributor
timestamp: June 29, 2020, 04:49:29 pm
content: Quote from: Simon on June 29, 2020, 02:01:56 pmAt this moment, I am looking a 1A or less. I suppose, I can drive directly from MCU.

author: Simon
author_rank: Unknown
timestamp: June 29, 2020, 05:24:04 pm
content: Yes that will be fine.

author: girishv
author_rank: Regular Contributor
timestamp: July 14, 2020, 01:59:27 am
content: Quote from: T3sl4co1l on June 27, 2020, 03:24:48 amI bought IRL6297SDPbF with VDSS20V / VGS12V± / RDS5.3mΩ at 2.5V.https://www.infineon.com/dgdl/irl6297sdpbf.pdf?fileId=5546d462533600a40153565ff22f2575These are logic level. The current rating is way higher than requirement.

author: magic
author_rank: Super Contributor
timestamp: July 14, 2020, 07:25:38 am
content: That's normal, the current rating is the maximum current it can conduct without burning, which doesn't mean anyone sane will want to actually operate it at the edge of burning.It's just an impractical marketing number, like maximum power dissipation at 25°Ccasetemperature

author: Simon
author_rank: Unknown
timestamp: July 14, 2020, 07:34:10 am
content: Yes I do tire of MOSFET datasheets, whatever the Rdson is double it unless you need really high power in which case trawl through the datasheet until you find the real value at high temperature and hope it's a mere 1.6x the 25C value given on the headlines.Current capacity is more like peak without rupturing the thing but does not take thermals into consideration which you need o calculate. Power dissipation as far as I am concerned is a magic number they pull out of their asses as it has no basis in reality, You need to carefully work out the total thermal impedance and the temperature rise whilst being realistic about your local ambient in the enclosure.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 14, 2020, 11:40:37 am
content: Quote from: Simon on July 14, 2020, 07:34:10 amAn FYI about that: low voltage MOSFETs (<= 20V or so) have flatter Rds(on) vs. temp. If given the choice between 20 and 30V devices, and the 20V has enough headroom to safely operate -- take it!Tim

author: Simon
author_rank: Unknown
timestamp: July 14, 2020, 12:02:00 pm
content: If only we could do that in automotive, reading the fine print of TVS diodes and with the only protection from a surge being to ride it out 50+V parts for 12V and 100+V parts for 24V

author: girishv
author_rank: Regular Contributor
timestamp: July 15, 2020, 12:25:34 am
content: Quote from: Simon on July 14, 2020, 07:34:10 amThe datasheet says RDS(on)of IRL6297 @120OC is 1.3x when IDis 8.5A. The IDof current design is between 0.65A and 1.0A.

author: Simon
author_rank: Unknown
timestamp: July 15, 2020, 05:51:30 am
content: with 1A I would not even worry.