N-MOSFET level shift and PWM driver - Page 1
Forum section: electronics / projects

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 02:59:59 pm
content: Hi All,I've been toying with a MOSFET driven motor and some PWM off of a Raspberry Pi. The PI is putting out 3.3v and the motor is a 12-28V DC with at least 10A draw. I choose the FQP30N06L (https://www.sparkfun.com/products/10213) for the logic level gate and high drain-source current. However, I was having difficulty (blue smoke) using a single MOSFET with a high side load and powering the motor at 28V. Researching lead me to believe that the MOSFET might be in the linear region with a higher than anticipate Rdson - which jived with my burnt fingers (was using hefty heat sink and thermal paste).I decided the fix was a level shifter to get firmly in the active region. However, I was also impatient and figured using another MOSFET I could achieve basically the same end. See link for pic.Using the first to switch in the voltage divided 28V source (should be around 10V, exact value shouldn't matter). Checking the circuit I connected the 3.3V in and GND lines to effectively shut of the first stage and 'full on' the second. The fluke shows ~10V at the R1 R2 junction, however, the second transistor doesn't seem to come fully on at all. In fact, the total draw (as referenced from my bench supply) is only about 0.8A and the motor doesn't budge. Another curious output was the D-S voltage (with 10V G-S) was like 600V (probably a fluke Fluke?).Being NOT an EE I turn to you all for some quick insight. Where did I go wrong and how do I drive this large(ish) motor? Bonus points for solutions including only the referenced MOSFET and resistors...as that is what I have on hand today!

author: madires
author_rank: Super Contributor
timestamp: May 11, 2014, 03:25:57 pm
content: Could you please also post your original circuit. Based on the datasheet the MOSFET should pass 20A with a V_GS of 3.3V.

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 03:34:48 pm
content: This circuit would drive the motor correctly below 28V (around 12V with some excessive heating). Only a few seconds at 28V would burn the MOSFET (shorts on all leads, and either full on or open).

author: retrolefty
author_rank: Super Contributor
timestamp: May 11, 2014, 03:40:06 pm
content: R1 being such a large value will really slow down the switching time from off to on but not sure if that explains the static current level you are reading, unless you are using PWM at some intermediate value?

author: dannyf
author_rank: Super Contributor
timestamp: May 11, 2014, 03:45:26 pm
content: QuoteIt is not possible to design for such a load. You should understand the upper end of the current draw before you can start somewhere.

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 03:55:49 pm
content: Quote from: dannyf on May 11, 2014, 03:45:26 pmCould you elaborate? Tests with the motor starting from 0 speed to full showed peaks in the 7-9A range. The MOSFET datasheet says 32A allowed at around 5V Vgs. Did I miss something else?

author: dannyf
author_rank: Super Contributor
timestamp: May 11, 2014, 03:57:50 pm
content: QuoteIf the motor draws at least 10a, how much current can the motor draw?

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 03:58:58 pm
content: Quote from: retrolefty on May 11, 2014, 03:40:06 pmI see that now. However, in my test case should it have mattered (short 3.3v lead to GND) should be a steady state case.

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 04:01:36 pm
content: Quote from: dannyf on May 11, 2014, 03:57:50 pmSorry, I suppose I meantat most. Design criteria isat least10A load.

author: retrolefty
author_rank: Super Contributor
timestamp: May 11, 2014, 04:08:28 pm
content: Quote from: sixdollarburger on May 11, 2014, 03:58:58 pmMy guess is that 3.3 is just not enough to saturate the device. The sparkfun datasheet for the shows the maximum threshold voltage of as high as 2.5 for just some microamps of current, so 3.3 my be just not enough, plus your R3/R4 form a voltage divider so the applied gate voltage will be slightly less then 3.3, not the direction you want to go for on gate drive.While your in a test mode can you just increase the gate voltage some and see if your load current doesn't 'snap up' as you increase it.

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 04:14:28 pm
content: Quote from: retrolefty on May 11, 2014, 04:08:28 pmYou mean on the single MOSFET circuit? I'll have to re-tool the circuit and try driving it directly - give me a few.

author: retrolefty
author_rank: Super Contributor
timestamp: May 11, 2014, 04:25:44 pm
content: Quote from: sixdollarburger on May 11, 2014, 04:14:28 pmWell it would apply to either circuit where your input voltage is applied to the gate, in simple switching application it is generally desirable that the device is driven into full saturation (for bjt) or minimum Ron (for mosfet).

author: madires
author_rank: Super Contributor
timestamp: May 11, 2014, 04:30:58 pm
content: You could build a simple totem pole driver with a NPN and a PNP BJT, and use a zener (with a current limiting resistor and a buffer cap) to get around 5-10V for the driver.

author: sixdollarburger
author_rank: Newbie
timestamp: May 11, 2014, 04:52:21 pm
content: Quote from: madires on May 11, 2014, 04:30:58 pmWith the inverting level shift I feel like I'm getting the same result, is there a distinct advantage to the totem pole? Also, I would still need to add a voltage divider somewhere since I only have the 28V rail to play with, correct?I'll try to re-tool the voltage divider in the original as well to correct the low amps to the gate.Also, is it typical that the heat sink of the MOSFET is tied to any part of the device? I currently have both MOSFET on the same heat sink - would that cause an issue?

author: retrolefty
author_rank: Super Contributor
timestamp: May 11, 2014, 05:01:22 pm
content: Typically mounting tab is also drain terminal so you can't have both on same heatsink without insulating the mounting tabs from the heat sink, a good idea even if only using one. It's too easy to touch something that is ground to a big old heat sink.

author: madires
author_rank: Super Contributor
timestamp: May 11, 2014, 05:13:07 pm
content: Quote from: sixdollarburger on May 11, 2014, 04:52:21 pmYour level shifter has a small problem, the MOSFET is "on" by default. It's better to have the MOSFET "off" by default, especially when driving motors.I'd go for the zener regulated driver voltage because the 28V could break down if the motor sinks a lot of current and the PSU isn't able to deliver that. A simple voltage divider would change it's voltage too and don't forget that the MOSFET's gate is a load (see loaded voltage divider).QuoteYes and yes. Therefore the best practice is to mount the MOSFETs isolated (silpad or mica, and an isolation washer for the screw).

author: dannyf
author_rank: Super Contributor
timestamp: May 11, 2014, 06:47:31 pm
content: QuoteThe device has an Rds(on) of around 40mohm. At 10a, the power dissipation during the on-state is about (10amp)^2*40mohm=4w. That means a fairly heafty heatsink and some derating.That's not counting the switching losses. If you switch fast, that can be substantial.Your new design has an added issue of slower turn-on -> more switching losses.The original circuit can be made to work, you just need to know the parameters of your design to work out the numbers first.

author: sixdollarburger
author_rank: Newbie
timestamp: May 13, 2014, 12:37:27 am
content: Alrighty.I stuck with the two MOSFET design, though I am confident I could have run the single without issue with the new fixes. I changed a few things and it seems to work fine now (now having an interment problem with overloading my power supply to start the motor from standstill to full speed).1.) Isolated the two MOSFETs (moved the first to a different heat sink)2.) Changed PWM carrier to 100Hz (from like 8k 'balanced') wave whichsignificantlylowered the heating.3.) Changed the resistors from 1/4W to 25W and dropped the ohm-age (47.0 and 30.0) to significantly add to the charge rate to the gates.Thanks for the help, all!