1
\$\begingroup\$

I'm trying to make this supposedly simple motor controller.

enter image description here

Here's a brief history of past events, though I'm not sure they're related to what I'm facing now.

I've built the schematic half on perfboard half deadbug-ish. If you want to cry blood, check out this picture (which is missing the transistors as they are already blown.)

I have checked the connections I don't know how many times already and everything seems to be as in the schematic. I believe there are no mistakes in that department. Furthermore I added an LED with 3 kΩ resistance on the output (MP-MN) and when I vary DRIVE_PWM I see the LED change brightness so I'm assuming everything is wired correctly.

As soon as I connect my motor, though, (1 kW, ~30 A, brushed) and apply 5% pulse width on DRIVE_PWM my motor instantly starts spinning at full speed and applying 0 on DRIVE_PWM then does nothing. Disconnecting power and checking the transistor via the diode option on the multimeter (positive lead to source, negative to drain) I read 0 V.

I was running at 1 kHz so I thought the on time was enough to allow a lot of current to flow through, even though IRLZ44N should be good for up to 160A and my motor should definitely be far from that. I increased the frequency to 15kHz and got the same results.

I also tried starting off from 1% duty cycle and for whatever it's worth 10% and 15% but the results were again the same. I burned through about 10 transistors and I gave up. There is clearly something that I'm not aware of that's going on.

The motor was unloaded in all tests. The cable from the battery to the "controller" is about 0.5 m and the cable going to the motor is about 2 m in length. Both are 11 AWG or 4 mm^2.

EDIT:

I decided to try just applying 5 V to DRIVE_PWM to find whether my problem has anything to do with PWM. What happened is exactly as in my previous attempts, the FET smoked and motor was running full throttle.

So I added a 3 Ω 100 W resistor in series with the motor, replaced the FET and gave it 5 V and at last the transistor did not die. I was able to start and stop the motor by physically applying 5 V to the DRIVE_PWM terminal. At this point I'm guessing the reason the transistors were dying was a huge inrush current, but as already stated these particular ones should be good for up to 160 A, so what the heck? Surely inrush current can't be that high especially on an unloaded motor. I tried again measuring with my DC current clamp but it can only tell me so much, highest I saw on the screen was 5 A.

Next step I tried powering it through my controller, and no matter what duty cycle I supplied the result seemed to always be the same - the motor would start and either continue running or stop immediately (in less than a second). I found out my controller is getting either reset or being put in some weird frozen state where I'd need to pull it's reset low (at which point the motor would stop running) in order to bring it back to life. I instantaneously assumed the supply voltage is sagging, so I added a 100uF cap on the breadboard where my microcontroller lives for now. I also added a 1000 uF cap to the driver board across 36V and GND, as suggested in the comments. Sadly these didn't help.

My micro controller is getting its power from a raspberry pi's 5 V pin, so if supply was sagging I would definitely see either the pi resetting as well or at least having warnings in the system log, which there aren't. So I thought there must be something happening on the DRIVE_PWM line that's causing the micro controller to reset. I decided to add a diode like below, unfortunately I only had 1N400x diodes at hand, so I also reduced the PWM frequency to 60 Hz just for this test.

enter image description here

And again I saw the same behavior, as soon as the motor starts the micro controller resets.

I'm not sure if this is not turning into a separate question already, but I'm adding it here because I already have probably 10 questions about this controller I feel like I should stop spamming new questions about it, don't want to get banned or something...

\$\endgroup\$
2
  • \$\begingroup\$ @All - The long comment chain has exceeded what is reasonable for comments. Therefore it has been moved to chat and should be continued there (see the link below). -- As this bulk moving of comments to chat can only be done once per question, any further comments posted here might be deleted without notice. Keep it in chat now, please! || When someone has got enough information from the chat to post an answer, please answer it as usual. Any updates to the question which are decided during the chat, should be made via an edit to the question, not as a comment. Thanks. \$\endgroup\$
    – SamGibson
    Feb 2, 2023 at 19:33
  • \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$
    – SamGibson
    Feb 2, 2023 at 19:33

3 Answers 3

1
\$\begingroup\$

This has many of the earmarks of a grounding problem. It is imperative that the power section be somewhat isolated from the signal circuitry. Try redrawing your schematic to resemble the actual wiring, and perhaps use 1 ohm resistors to connect power and signal grounds.

You might even consider using an opto-isolator to separate the circuits.

\$\endgroup\$
2
  • \$\begingroup\$ I'm using two power sources and their grounds are joined via a ~1m long cable. I'm not sure if that's considered long but I'll try shortening it as much as possible. As far as isolating, I don't think it makes any sense because in the end both circuits will be powered from the same source? \$\endgroup\$
    – php_nub_qq
    Feb 2, 2023 at 12:44
  • 1
    \$\begingroup\$ I can not thank you enough. Had you not written that god only knows how much more time I would have spent trying to diagnose the problem. I ended up replacing the ~1m long cable connecting my battery and wall adapter grounds with a 5cm one from the breadboard of my micro controller to the negative terminal of the driver "board". The resetting problem instantly went away. \$\endgroup\$
    – php_nub_qq
    Feb 3, 2023 at 0:05
1
\$\begingroup\$

Note that the schematic lacks an important thing ...

When one uses "paralleled" MOSFETs (not "paired"), current sharing is "imperatively" needed ...

I did so for a "spot welder" which uses 400 A peak power pulses ...

See these simulations with some resistors changed or changed 1 MOSFET.

Large dispersion of the currents enter image description here

Added resistors RR on the source side of the MOSFETs ... see the low dispersion enter image description here

Change one MOSFET ( or same MOSFET with a bad Ron characteristic enter image description here

Added resistors RR on the source side of the MOSFETs ... enter image description here

Example "inductive" sharing ...

enter image description here

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ I'm afraid this is not a representative situation; parallel MOSFETs, of the same type, in switching operation, will not differ by a factor of 8. The large source resistors shown here simply swamp the drain or Rds(on) resistance, forcing balance at expense of massive power dissipation. The M models and drain resistances also differ between trials; I'm not sure what the comparison is meant to be? Source resistance is however useful for linear mode operation, but that doesn't seem to be OP's application. \$\endgroup\$ Feb 1, 2023 at 14:08
  • \$\begingroup\$ Very interesting @Antonio51 . I wonder why this dispersion of currents is happening. I guess because the current is instant and the mosfets do not have enough time to share the current (when they heat up), so the current flows first in the fets with less Resistance. Placing resistors under each fet increases the resistance as the resistor instantly heats up, helping to share the current I guess. \$\endgroup\$ Feb 1, 2023 at 15:02
  • \$\begingroup\$ @ChristianidisVasileios don't forget different temperatures when devices share the same heatsink. \$\endgroup\$
    – Antonio51
    Feb 2, 2023 at 10:16
  • \$\begingroup\$ @greybeard Sorry. Don't understand ... See my two last pictures in answer. \$\endgroup\$
    – Antonio51
    Feb 2, 2023 at 16:19
1
\$\begingroup\$

This has turned into a wild discussion in the comments section but an extremely helpful one to me!

Nevertheless, to answer the actual question for any future readers, the MOSFETs were most likely killed by a surge of current, or inrush current, in the brief moment when the motor was at 0 rpm and was given full voltage by a PWM pulse.

To solve this problem either a soft start circuit is needed or a PWM frequency + duty cycle, that will ensure the on-time is at least 3x less than the time needed for the inrush current to reach dangerous values. I'm not a professional, obviously, but this time can be calculated by multiplying the motor's resistance and inductance.

EDIT:

I can now confirm that was the issue.

I did not do any calculations because I can not measure the inductance of my motor, but I went ahead with the trial and error method. So far the highest frequency I had tried was 15kHz, at which the transistor kept burning. The next higher, easiest for me to try, was 31kHz. At that point I could start the motor and get it up to full speed in increments of 10% duty cycle.

I think it's also good to note (for noobs like myself) that if those MOSFETs can not handle the full stall current of the motor, then additional protection will be needed that will monitor the current and shut the motor off once it exceeds a certain value, or more powerful transistors should be used.

\$\endgroup\$
0

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.