Troubleshooting DC Motor Controller (and understanding opto-couplers)

I've been trying to design an Arduino Nano-controlled PCB where the primary goal is to control the speed of a fan motor (for a small cart-sized hovercraft) via PWM on the gate of a MOSFET.

The motor I'm using is a Mabuchi RS-775WC-A08 that I pulled out of an old electric push mower. I can't find exact specs for that model online, but it was running off a 12V lead acid battery and at that voltage has an estimated no-load RPM between 15k-18k, which puts it in a similar spec range of Mabuchi's other RS-775WC motors, which are 6-18V 250-300W motors that draw ~3A with no load, ~20A at max efficiency, and have a stall current of ~150A.

In my first prototype I ran into a great deal of trouble with power management, and components breaking down (managed to fry an Arduino, possibly due to a buck regulator failure, possibly when my flyback diode failed short circuit, though I didn't notice the diode smoking until after I replaced my power regulator. Replaced the flyback diode with a beefier one, only to have my MOSFET work for awhile then stop conducting current in response to a signal on the gate.), so I'm going back to the drawing board with higher spec'd components, and I'm considering isolating the motor power supply completely from the Arduino power supply to better protect the more delicate 5V components attached to it.

The circuit when the MOSFET failed was as such:


The battery is a Spektrum 11.1V 50C 5000mAh LiPo.
U1 is a 5V DC-DC converter: https://www.digikey.ca/en/products/detail/würth-elektronik/173950578/5725367.
The MOSFET is a Nexperia BUK966R5-60E.
I don't actually know much about the Schottky I was using at the time, as it was a local emergency buy when I didn't have time to order new components (that time-limit has since passed), and it's, well... Old:

When I tested the motor on straight DC from the battery it ran fine, but when I tried running it with the PWM, it exhibited a behavior where it would start spinning then jolt to a halt and stop moving. The behavior repeated every time I cycled the Arduino off and on. Nothing in the system got warm to the touch. I tried it at a variety of PWM frequencies down to the lowest the "phase-correct" Arduino PWM can manage and the response didn't change. The next day when I tried to view the system on an oscilloscope the motor didn't respond at all. I confirmed the signal at the MOSFET's gate, but the drain-to-source resistance remained solidly constant and large. I'm honestly not sure what the mode of failure was there.

Without getting into additional isolation, my proposed changes to the circuit are:
Swap to this MOSFET and this flyback diode, as well as adding a bulk capacitor across the motor power.

As mentioned above, I'm also considering optically isolating the power supplies (I'd probably keep the DC-DC regulator for the 5V net, but feed it with the output of 6 to 9 rechargeable AA batteries rather than the 11.1V LiPo). The wall I'm running up against here is understanding how to select and utilize an opto-coupler for my application. From what I understand so far, the circuit should be something like this:


I'd actually like to move the PWM up to 31kHZ to put it out of the audible range, so I'd want a fast opto-coupler that can take 5V logic on the input end and handle 12V on the output end. After that is where things get a bit fuzzy for me. Would I need to switch from a 5V logic-level MOSFET to one that works on 0-12V? Are there other considerations I need to take into account?

I'm happy to take any other suggestions about the design and selected components.

  • Configure the transistor as an emitter follower.

Some remarks:
The push-pull action in image #1 is advantageous, in image #2 the MOSFET will never switch off.
In the off-state the current is zero, in the on-state the voltage is (almost) zero. In between an amount of heat is produced, every time it is switched, so higher frequency means more heat and the MOSFET dies sooner.
The diode needs to be able to handle the full motor current.
A capacitor across the 5V to the board is probably more useful than the one across the battery.
The pull down resistor is usually placed at the other side of the series resistor (image #1).

Tom.... :smiley: :+1: :coffee: :australia:

R4 in image #3 will switch the MOSFET off, after a long long long time. In the mean time a lot of heat is produced.
The gate of a MOSFET is a capacitor. You can do some estimation with the RC-times.

I agree with stitech. If you need to have a PWM frequency of 31 kHz, you need much more power to drive the gate of the power mosfet.

I tried to look in datasheet of the mosfet here:
https://assets.nexperia.com/documents/data-sheet/BUK966R5-60E.pdf

I shall now try to make an estimated calculation of the dynamic conditions.
With a PWM frequency of 31 kHz, the period with two transitions is 32 us. An I should like to see a transitions time below 3% of that, and it is 1 us. According to datasheet you need a charge to the gate of about 30 nC for a transition. To do that in below 1 us you need a drive current above 30 mA. When the mosfet is switching, Vgs is about 2.6 V. R3 + R4 will provide only about 2.6V / 10.5 komh = 0.24 mA. Therefore this drive current is about 100 times below the needed current, when you switch off the mosfet.

The dynamics of an optocoupler performs not that well either. To do high frequency switching with a mosfet in this power range needs a lot of consideration regarding the dynamics of the circuit.

This is all great information, thank you! The second image was rather tossed together as I tried to decipher similar examples. Most motor driver examples are H-bridges, whereas I only care about speed control and not directionality.

So, looking further into things, it sounds like an optocoupler isn't the best choice, but rather I might do better with an isolated gate driver, set up along these lines?


So I could match something like this: https://www.digikey.ca/en/products/detail/infineon-technologies/1EDI20N12AFXUMA1/5959829
With a standard-level MOSFET like this? https://www.digikey.ca/en/products/detail/nexperia-usa-inc/BUK7M12-40EX/5981220
(I'm not sure if those SPECIFIC parts will work, I need to sit down with backflip's mentioned calculations for drive current and MOSFET switching speeds and hash out some values.)

More generally: what is that spec margin I should aim for on a MOSFET or a diode? If I'm expecting a maximum steady current (and likely lower) of 20A @ 12V, with potential spikes up to 150A, then would a MOSFET with double the expected amperage and voltage (ie. 40A+, 24V+) be good enough? Should the peak pulsed source current be closer to 300A? What would be the method for roughly estimating minimum necessary power dissipation?

For the diode, if I'm expecting an average forward current of 20A or less, is 30A enough margin? Should it be at least double? Or should I make the margin big enough for the average forward current to cover the possible 150A stall current?

Is there a disadvantage (other than, say, price) for using a VERY wide power margin on these components?

I think the first thing is to measure or estimate the current to the motor with the fan you expect to use. The power to the fan depends very much on the speed. So if you think you got 20 Amp when you apply 12 V to the motor, then you can expect about 5 Amp when you apply 6 V to the motor. This change in current due to change in speed matters to the estimated dissipated power of your power diode.

It would be normal, that the rated max current of the transistor and diode is 3 to 10 times higher than your mean current for your circuit. But it depends of a lot of other things. It will be important, that you have a good drive circuit to the gate of power mosfet to reduce your switching losses. It is also important to consider the reverse recovery current of the diode. If you switch the mosfet too fast on, the current spikes due to that can be high. Try to look for information regarding buck DC-DC converters and how they are designed.

I've had some difficulty getting good current measurements for the motor, due to limitations in the equipment I have available.

I did no-load testing from 4V to 15V where the current ranged from about 2.6A to 3.4A, and the RPM roughly from 4000 up to 17000.

I did several tests after the fan was attached and placed in a safety enclosure, but the results aren't particularly conclusive:

  • the first test used an adjustable power supply, and at just under 4V the current draw popped the system's 8A breaker.
  • the second test used a (recently charged) 12V lead acid battery to provide power, and the current read on that was only around 4.4A. However, it was a very old lead acid battery.
    I'll see if I can arrange access to the high-power equipment again to get a current read from the motor while powered directly from its current battery.

I don't think the power requirements will increase significantly when the fan is maintaining the hovercraft's air cushion, as I'm expecting pressure differentials of <1kPa, but they should definitely be somewhat higher.

I'm currently thinking of using the following components together.
MOSFET: https://www.digikey.ca/en/products/detail/diotec-semiconductor/DIT090N06/13153557
Isolated Driver: https://www.digikey.ca/en/products/detail/stmicroelectronics/STGAP2SMTR/8257708
Diode: https://www.digikey.ca/en/products/detail/infineon-technologies/IDW75D65D1XKSA1/5960083
I'm pretty sure they should work together, but I've been migraine-y all weekend, which is not conducive for deciphering datasheets, haha.

Thank you for the guidance!

Are you familiar with the "fan laws" concerning fan driving power with changes in RPM?
Fan laws