I've searched every post for an answer to this problem. I've built a motor controller circuit as shown in this diagram.Circuit Link
I made the diagram as accurate as possible. The diodes on the mosfets were added so that the mosfet symbol would look just like the symbol in the data sheet.
As you can see, it is a very simple PWM circuit using an Arduino UNO board. A potentiometer foot pedal is attached to one of the analog inputs and that is used to determine the duty cycle of the pwm output on digital output pin 6.

The motor is the smallest 48v motor of this type that motenergy makes, but this is a very big motor compared to other circuits I've seen like this. It can easily pull about 200 Amps on start up.

The circuit sort of works - when the vehicle is lifted so the wheels don't touch the ground. In that state, it is very easy for the motor to spin and it doesn't draw as much current. When the wheels are on the ground, the mosfets explode the moment you start to push on the pedal. I've built this circuit about 4 times now. I even used 18 mosfets in parallel in one version, and all 18 exploded instantly. (200/18 = about 7 Amps/mosfet) Each mosfet should handle 32 Amps.

We finally just bought a motor controller from alltrax, and the vehicle works fine, but I am determined to find out why my own motor controller did not work. I love electronics, and have built many difficult circuits over the years. I will not be able to sleep well till I find out what I'm doing wrong.

I talked to a technician from Alltrax, and he said their controllers are nothing but a bunch of mosfets and capacitors. He said the capacitors kept the mosfets from exploding, but he had no idea how they are wired into the circuit. I think he has a piece of my missing information.

So, can anyone tell me what I'm doing wrong? How should I add capacitors to fix this? Could it be the frequency? We modified the timer on the Arduino so our PWM frequency was around 8000 Hertz, but the Alltrax controller works at a mind-blowing 18,000 Hertz. I know 18k is small as motor controllers go, but I thought a giant motor would like a smaller frequency.

Also, before you say the mosfets can't be wired in parallel because of slight differences between them, I used exactly 7 inches of 18 gauge wire to connect each one in parallel. The small wire would act as a tiny resistor and ensure that each one shared the current load.

Thanks a bunch for your replies.

  • 2
    \$\begingroup\$ You keep talking about some Alltrax controller, but it's not visible in the schematic. \$\endgroup\$ Commented Aug 6, 2017 at 0:54
  • 1
    \$\begingroup\$ Is the part number for the MOSFETs in the schematic accurate/correct? \$\endgroup\$ Commented Aug 6, 2017 at 1:22
  • 2
    \$\begingroup\$ I'm really no expert - but I have a bad feeling based on some experience. That motor is rated to 13 horse power. You're seriously trying to speed control it with an Arduino, 3 FETs and 2 resistors? Consider what an industrial controller would cost to achieve the same - safely... \$\endgroup\$
    – Paul Uszak
    Commented Aug 6, 2017 at 1:48
  • 3
    \$\begingroup\$ What diode are you using across the motor - it better be big. \$\endgroup\$
    – Andy aka
    Commented Aug 6, 2017 at 9:13
  • 1
    \$\begingroup\$ 13 hp / 48 V = 210 A. Wow, that's a lot of current. I guess 500-ish amperes when the motor stalls? You could write a book about flyback diodes and snubbers for such a high current. \$\endgroup\$
    – Oskar Skog
    Commented Aug 6, 2017 at 17:18

5 Answers 5


Here's the datasheet that should be linked from your question. I shouldn't have to look for it.

Each mosfet should handle 32 Amps

That's with \$V_{GS}=10\$V

You set \$V_{GS}\$ to \$5V×\frac{R_2}{R_1+R_2}=4.54V\$, you really want as much voltage here as you can (5V seems to be your maximum). If I were you I would change \$R_1\$ to 10~50Ω and \$R_2\$ to 100k~1MΩ. Because if you're not opening the MOSFET completely, then it will have too much resistance and.... explode.

With \$V_{GS}=10V\$, the \$R_{DS(on)}\$ is maximum 35mΩ

\$P=I^2×R=(32A)^2×0.035Ω=35.84W\$, this means that ~36W is the expected power dissipation when \$V_{GS}=10V\$

With \$V_{GS}=5V\$, the \$R_{DS(on)}\$ is maximum 45mΩ according to the datasheet.

\$35.84W=I^2×0.045Ω\$, and if we move the I around we get: \$I=\sqrt{\frac{35.84}{0.045}}=28.2A\$, so you can expect to safely let 28A through the MOSFET IF you fix the resistor values. You should definitely get a heat sink for the MOSFETS. Maybe even active cooling with a fan.

We modified the timer on the Arduino so our PWM frequency was around 8000 Hertz

You don't need that high, 800Hz would be acceptable, that's what common BLDC drivers (ESC) switch at. (If I'm not mistaken).

What you're trying to do is charging up a gate with a resistor in series, it looks just like the image below and we can use that model for further equations.

The capacitance of the gate(\$C_{iss}\$) has a max value of \$1040pF\$

The resistors and the MOSFET are forming this circuit:

RC circuit

\$C=C_{iss}×3=3120pF\$ because you got 3 in parallel.



The voltage over the capacitor follows this equation: $$V_c=V_e×(1-e^{\frac{-t}{RC}})$$ where \$V_c\$ is the voltage across the capacitor and \$V_e\$ is what you're feeding it with, in our case it's \$Vs=4.54V\$.

You're sending PWM's and I'll make an absolute worst case scenario for you, It's when you're trying to do analogWrite(1), that's a duty cycle of \$\frac{1}{256}\$. So the time your signal starts going high till it ends with that duty cycle and 8kHz is \$\frac{1}{256}×\frac{1}{8000}=\$ 488.3 nanoseconds.

Let's plug the numbers into the equation above to see what the voltage will be at the gate. $$V_c=4.54V×(1-e^{\frac{-488.3×10^-9}{(909)×(3120×10^-12)}})=0.71V$$

The MOSFET starts opening at 1V minimum, and 2.5V maxmimum. So in this worst case scenario you can't even open the gate. So it's been closed the entire time.

Another thing that I really need to point out that is the most likely reason for why your MOSFETS are breaking is because when you switch you do it so slowly because of the gigantic resistors and with so many gate capacitances. That means that when the MOSFET's are just about to switch they pass a lot of current through while having a lot of voltage over them. And \$P=I×V\$ => really really really much heat.

See this image:

switching losses

As you can understand, you don't want to be where the blue line and red line cross. And the width of that transition is the same regardless of switching frequency, so the more often you switch, the more time is spent in that painful transition. It's called switching losses. And it scales linearly with switching frequency. And your high resistors, high capacitance, high frequency switching, most likely makes you stay in that transition phase all the time. And that equals explosions or breaking MOSFETS.

I don't really have the time to do more calculations, but I believe you get the gist of it. Here's a link to a schematic if you want to play around. Which you should!.

My final advice to you is to get a MOSFET driver so you can pump several AMPS into the gate, right now you're pumping milliamps.

Btw Doctor Circuit, regarding your last paragraph, that's only a problem with BJT transistors, they deliver more current the warmer they are, MOSFET's however deliver less current the warmer they are, so they don't need any special kind of balancing, they will balance automatically.

CONTINUATION, Rise time and Fall time.

I was pretty mean in the example above, 8kHz switching and 1/256 duty cycle. I'll be more kind and look at 50% duty cycle = 128/256. I want to know and tell you how much of the time you're in your painful transition.

So we got the following parameters relevant to the painful transition:

\$t_{d(on)}\$ = Turn-On Delay Time
\$t_r\$ = Turn-On Rise Time
\$t_{d(off)}\$ = Turn-Off Delay Time
\$t_f\$ = Turn-Off Fall Time

I'll make some nasty approximations, I'll assume that miller-plateau doesn't exist, I'll assume that the voltage across the MOSFET decreases linearly when switching on and increases linearly when switching off. I'll assume that the current flowing through the MOSFET increases linearly when switching on and decreases linearly when switching off. I'll assume that your motor draws 200A during steady state of a duty cycle of 50% with some load, say your body. So 200A while you're on it and accelerating. (The more torque your motor puts out, proportionally the more current will be drawn).

Now to the numbers. From the datasheet we know the following max values:

\$t_{d(on)}\$ = 40ns
\$t_r\$ = 430ns
\$t_{d(off)}\$ = 130ns
\$t_f\$ = 230ns

So okay, first I want to know how much of a 8kHz period the above transition takes. The transition happens once every period. The delays doesn't really affect the transition (unless we're switching at really really high frequencies, like 1MHz).

time in transition with 50% duty cycle and fs at 8kHz = \$\frac{t_r+t_f}{\frac{1}{8000}} = 0.00528 = 0.528\%\$ I thought I would see a much larger value, this is ignoring the miller-plateau and parasitic stuff, and ignoring the slow gate charging. Also this is ignoring the fact that rise time and fall time is actually from 10% to 90% of the signal, not 0% to 100% which I'm assuming in my calculations. So I'd multiply the 0.528 by 2 to make my approximation more close to reality. So 1%.

Now we know how often we're spending time in that painful transition. Let's see how painful it really is.

\$P = \frac{1}{T}\intop_0^T P(t)dt\$



\$P = P_r+P_f\$
\$P_r = \frac{1}{t_r}\intop_0^{t_r} V_r(t)×I_r(t) dt\$
\$P_f = \frac{1}{t_f}\intop_0^{t_f} V_f(t)×I_f(t) dt\$

\$P_r = 1600W\$ LOL!
\$P_f = 1600W\$ Same answer, weird
\$P = P_r + P_f = 3200W\$

Now let's go back to how often you spent in this 3200W transition. It was about 1% when reality kicks in. (and I thought it would be much more often).

\$P_{avg}=3200W×1\%=32W\$ Hmm, again I thought I would see something much... bigger.

And... let's calculate the other 99% of the time! Which I totally forgot about. Here's the major explosion! I knew there was something I forgot.

\$P=I^2×R=(200A)^2×(0.045Ω)=1800W\$ And you spend 49.5% of the time in this conducting mode. So your total \$P_{50\%@8kHz}=32W+1800W×49.5\%=923W\$

With 3 MOSFET's in parallel it's \$32W+\frac{1800W×49.5\%}{3}=329W\$ per MOSFET. That's still... EX-PU-LOSIVE!

There we go. There's the bomb you're looking for. EX-PU-LOSION

This is my last edit.

  • 4
    \$\begingroup\$ I think that you're clearly showing how difficult it is to drive 13 horses safely and reliably. And what about dodgy sketches? What does the motor do when OP's loading a new sketch and pins are floating /undefined? And possibly shorting the 48V source - that'll be interesting. There's a lot to do to avoid disappointment /a fire... \$\endgroup\$
    – Paul Uszak
    Commented Aug 6, 2017 at 2:07
  • 7
    \$\begingroup\$ Well let's just be happy that he's messing with 48V and not 480V. You can survive burns and learn for life, but it's hard to learn from death by heart failure. \$\endgroup\$ Commented Aug 6, 2017 at 2:09
  • 3
    \$\begingroup\$ @DoctorCircuit the 1 nF is the gate capacitance, The \$C_{iss}\$. You can't remove them. They're a part of the MOSFET. Your Arduino can push about 20mA through their transistors. That is still milliamps. You need to push several AMPS for this to be even close to something that works. You need another stage between the Arduino and the MOSFET's that drive the load. A logic inverter could maybe do the job. But this is what you really need to push several AMPS. \$\endgroup\$ Commented Aug 6, 2017 at 22:44
  • 2
    \$\begingroup\$ @DoctorCircuit This will be my last comment. Just look at this video. Watch the whole for fun. Around 5:12 it shows the MOSFET's used. That \$R_{DS(ON)}\$ is about 1/3rd of yours. And it's made for a much less demanding motor. The rise time (which is a part of the painful transition) is 430ns for your MOSFET, and 110ns for the ATP206. The fall time which also is a part of the painful transition is 230ns for yours, and 73ns for the ATP206. So it spends roughly 3-4 times less in the painful transition. So a much weaker motor has much better MOSFET. \$\endgroup\$ Commented Aug 7, 2017 at 0:13
  • 3
    \$\begingroup\$ @DoctorCircuit I lied, this is my last comment. If you will make an logic inverter on your own rather than buying a mosfet driver. Then you really need to make sure that you're not shorting the mosfet's during their transition. Here's how you do that. \$\endgroup\$ Commented Aug 7, 2017 at 0:24

First, you picked the wrong FETs.

FQP30N06 has 40 mOhm RdsON at Vgs=10V. At Vgs=5V it is not specified, which means it will not work.

Picking a MOSFET is a compromise: big MOSFETs with big silicon dies and low RdsON have lots of capacitance and switch slowly. Smaller MOSFETs switch faster but have higher RdsON.

However, you're going to switch at 500-1000 Hz, and your current is huge, so RdsON matters a lot more than speed.

Therefore, you should select To-220 MOSFETs (for cooling) with very low RdsON (like a few mOhms), specified at a Vgs of... read on.

Second, you use 5V gate drive on a FET which is specified for 10V gate drive, so it is not fully turned on. Thus it heats up and explodes. Anyone can see that by looking at the datasheet.

Considering the current, I'd go with 12V gate drive to make RdsON as low as possible. So you can pick 5V or 10V Vgs-specified FETs, no problem.

OK. Now you have a bunch of FETs and you need to drive them with 12V. Obviously you need a driver that will output a few amps into the gate to turn it on and off quickly. Check the "MOSFET driver" category at mouser/digikey, there are tons of suitable products which will accept the 5V from your arduino and properly drive a FET.

You will need a 12V supply, but that's not a problem since you have some 48V, use a DC-DC converter.

Third, you need to ditch the arduino.

This kind of controller needs a current limit, and this needs to act before the MOSFETs explode (not after).

The way this is done is very simple. You put a current sensor (most likely Hall effect here) and a comparator. When the current goes over a threshold, the PWM is reset, waits a little bit, and then resumes. When the current goes over a much larger threshold, this means someone stuck a screwdriver into the output terminals, so the PWM stops for good, and does not resume.

This needs to happen at a speed that is incompatible with software.

Most microcontrollers marketed for motor control include analog comparators connected to the PWM unit, for this specific purpose. The micro on the arduino is not one of those.


Modern MOSFETS need quick switching, to avoid lingering in a dangerous region where positive-feedback (internal to the silicon) causes destruction. Read the final paragraphs of this answer for the NASA paper explanation.

QUICK SUMMARY: That gate resistor ----- 1Kohm ------ is way too big. Use an Power Driver IC, with 0.1UF bypass cap on its 12/15/18 volt VDD so your MOSFET gates can be quickly charged for quick turnon.

The MOSFETS will have destroyed themselves because of the safe-operating-area SOA ratings, where Voltage * Current * PulseWidth defines the power dissipation.

Assuming the FET junctions are 10U deep (SWAG) you have a 1.14 microsecond TAU for the themal timeconstant of the FET active area. With Miller Multiplication, the turn-on time will far exceed that, with 48 volts across the FETs and there being no current limiting.


edit March 18, 2018

NASA diagnosed MOSFET failures in several ongoing designs as due to the use of MODERN MOSFETS (the NASA writeup appeared 2010; the auto industry found this failure mechanism in 1997). The previously negative-temperature-coefficient behavior of older-technology MOSFETS has been pushed into the higher current regions, and a new unsafe region now exists in the moderate-on region. NASA had those projects revert to OLD TECHNOLOGY, so reliable systems could be built.

What does this mean today? Quite simple

--- Do not linger more than 1 microsecond in the switching region. ---

--- Quickly charge the gate capacitance, including gate-drain capacitance. ---

The NASA paper[published in 2010] title is

"Power MOSFET Thermal Instability Operation Characterization Support" and the key sentence is quoted here "the designs now being produced allow the charge-carrier dominated region (once small and outside of the area of concern) to become important and inside the safe operating area (SOA)".

Regarding the older (robust MOSFET) designs, I extract this sentence:

"Earlier MOSFETs were primarily run in the mobility-charge dominated region. While maintaining the same gate voltage, the mobility-charge dominated region cuts back on the current as the temperatures increase, in turn decreasing the current allowing for the system to have negative feedback away from the thermal runaway. Indeed when the new power MOSFETs have high gate voltages the parts are mobilitycharge dominated. It has been the unspoken intent of the manufacturers to keep the MOSFETs in the mobility-charge dominated region, as they are when used as a high speed switch. The older parts have a charge-carrier dominated area. The area, however, is outside the normal SOA and failures occur for other reasons."


There is no current sensing and hence no current limiting on your motor drive . The prospective motor current at zero rpm could be thousands of amps because the winding resistance of large DC motors can be miliohms .You should apply some form of current limit unless you want to use an enormous amount of mosfets and still risk blowing them up .Your gate drive should be checked on a scope .It will probably be too slow causing excess mosfet heating .Consider a driver chip or some sort of discrete driver circuit .Your motor drive like most is hard switching and hence has switching losses that are proportional to frequency .Try reducing the PWM frequency testing for objectional audio noise .You may be able to reduce F greatly without getting too much whine .This will cool the fets .Now place some bypass capacitance across the 48V rail close to the fets to defend against turnoff voltage spikes .Make sure that your freewheel diode is fast .If it is too slow then the mosfets suffer extra stress at turn on heating them up .


If you have an accurate model of all the components LTSpice you can analyze why it fails.

An accurate model of the Q discharge during current switching leads one to the design understanding that one needs the gm of each stage carefully selected or its inverse RdsOn ratio.

If one knows the ratio of electromechanical switches as reed Relays, Power relays, Solenoids and large power Contactors the ratio for COntact current to coil current gradually drops from >3k towards 100:1 The major difference being that FET gate current after switching.

Examine the datasheet and verify the RdsOn gate3 voltage that you plan to use. It should be at least 3x the threshold voltage Vgs(th) for efficient switching.

Summary Suggestions

  • 1) Use cascaded stages of RdsOn like cascaded BJT's with hFe ratio of 100

    • e.g. if RdsOn is 1mΩ then use a 100mΩ driver and that will use a 10 Ω driver ( or else slew rate is degraded, power loss rises then self heating, leading to fused or exploding FETs )
  • 2) Use Vgs >= 3x Vgs(th) NO MATTER WHAT Vgs(th) is rated at. ( and < Vgs max)

  • p.s.

    • I forgot to mention along with 1) the Rdson of the ganged FETS / DCR of motor ratio should be around 1:100 or 1% ( give or take) to minimize conduction losses. Although a few % often needs for forced air cooling and higher leads to disaster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.