Voltage Regulation for DC Motors

I am planning a Rev2 of a previously successful motor driver PCB and I want to simplify it.
Rev1 was a bit 'belt and braces'. It took 24V from a main board and passed that through an adjustable switching voltage regulator PCB assembly, an Amazon off-the-shelf job which inserted by header pins and was there to support reusability and modularity. That VOut then went to a motor (I use 5, 12 and 24V in my project); down to an IRF540N MOSFET driven by Arduino PWM (0.5 or 1 kHz) and then to Ground.

The schematic is attached (V1). I've removed a simple switch and a fuse for clarity. You also see flyback diodes, standard resistors around the MOSFET, and a DPDT latching relay acting as an H-Bridge. They're incidental to the question I think.

Rev2 I was considering combining the MOSFET and the Voltage Regulator as they're basically the same concept. I was wondering if the motor would cope with being PWM'd at a peak voltage higher than its rated voltage with a suitably low duty cycle. If it's better practice to smooth it out, I was thinking about putting capacitors in, one between VCC and MOSFET Drain and another between VCC and MOSFET Source. V2 (attached) shows this.

Back-of-the-envelope suggests that to keep fluctuation around +-10% would take 500uF of capacitance (dV = 2V, dT = 1ms, I ~ 1A with 24V, 50% duty cycle @ 500 Hz). Simplified schematic (less fuse, bypass switch and relay) attached. Inductor/resistor pair represents motor. But it's been a long time since I studied electronics and I wanted to run the idea by you all first!

Motors are usually happy with excess voltage (until the insulation breaks down!), so long
as the speed isn't out of spec, and the current isn't too high.

The first circuit you show has a capacitor between the FET drain and Vcc - this is wrong
it will cause massive current spikes through the FET, maybe damage it, and generally be
bad news for everything in the vacinity due to EMI.

The voltage waveform must be rectangular for efficient switch-mode operation.

You do not smooth the voltage, only the current needs smoothing, which is precisely
what an inductive load does all by itself so long as the PWM frequency isn't too low.

Hi Mark, really useful thanks.

My idea for using capacitors was based off typical switching voltage regulator circuit diagrams, which use caps between VCC and GND and between VOUT and GND. I understood that a switching regulator IC such as an LM2596 was logically very similar to a PWM-driven MOSFET in that it switched off and on very fast, only much faster than the 0.5-1kHz we’re talking here. Where am I mistaken? Does the LM2596 have significant internal resistance? Would also using an inductor in the circuit help with the current spikes?

My idea for using capacitors was based off typical switching voltage regulator circuit diagrams, which use caps between VCC and GND and between VOUT and GND

Switch mode supplies have an inductor which is essential to operation. Directly shorting a large capacitor
through a MOSFET is called "shoot-through" and is very bad news (MOSFETs can literally explode
if you do this - this is why you should have eye-protection working on high power switching circuitry with
the covers off).

Hi Mark, so something like this might work better? Most of the LM2596 circuits use a 33uH inductor. As far as I see it, there's 2-3 main differences between this now and a standard voltage regulator circuit:

(1) This is downstream of the load and so the caps need to be back-to-front, i.e. going back up to VCC
(2) IRF540N and 1kHz PWM is orders of magnitude lower frequency than a standard regulator
(3) We don't have any feedback in place

Other than those thoughts, do you think it would work? Or should I just not bother and just give the motor the unfiltered PWM?

Why bother? The motor is a free inductor already in circuit. Everyone drives motors with PWM.

BTW you have a pointless diode across the MOSFET. The freewheel diode goes across the inductive
load, not the switch, so would be cathode to Vcc, anode to drain.

A motor is perfectly happy with a square wave PWM. That’s the standard way of controlling power to a DC motor.

The primary alternative is a motor driver, which is interesting if you don’t only want to control the speed, but also the direction.

Look at those LM2596 circuits better. For starters, those chips never come alone, they have a lot of friends close by: capacitors, resistors, a diode and an inductor, without which they would be really lonely and whither away doing nothing useful. The input and output capacitors you see on a buck converter circuit are for stability, and the output of a buck converter not connected to ground - that’d be a short. Getting shorted is for an electronic component reason to release the magic smoke, their life blood.

Then the motor. Motors are inductive loads, seriously inductive loads, and they’re proud of it. They won’t accept living as a mere 33µH inductor. Now I hear you thinking “it’s not the size that matters, it’s what you do with it”, but really, motor coils know better. Size matters. They’re strong. When current is applied those coils may first resist but soon give in and when the current flows, they’re not willing to give it up. Give them motors a flyback diode, or you will be punished terribly. They whip your poor MOSFET that so tries its best to cut the current with possibly hundreds of volts, that’s how angry they get.

Caps in series with a dc voltage makes no sense.
They are supposed to ACROSS the dc supply
for filtering.
Series caps are used for coupling audio signals,
not dc supply voltage.

Hi MarkT,

Thanks for your help. Having read your points and done a little modelling (took ages to figure out how to import a Spice model on EasyEDA) I think I've figured out what the difference is between the circuit I was envisaging and a typical switching regulator. When the switching component is downstream of the load, as when using an n-channel MOSFET, the diode which is a critical piece of the regulator circuit isn't able to pass current back up to the supply line and so yes, it all tries to go through the MOSFET. Modelling told me I'd be getting 25-30A through the MOSFET when it opened - which, while it's rated at 33A, seems like it's just going to shorten the life of the thing.

So, I guess if I was planning this in future, I'd be using a P-channel MOSFET upstream...

vwmarle, I'm not sure you read the question right. There's already a flyback diode for the motor, this driver already changes direction (DPDT relay as H-bridge), and the arrangement of the 'friends' (passive components) was what I was trying to get my head around. Although I did enjoy your graphic description of a motor's inductance.

raschemmel, thanks for trying but also I think not reading the question. Those caps are in parallel with the motor. Although, in a switching circuit, series and parallel tend to change depending on whether the switch is off or on.

I assumed you were working without relays as you had the MOSFET already. Solid state switches (as offered by a motor driver) do away with the fireworks inside a relay, which is particularly bad when switching high current DC loads. Some really impressive arching can take place. No issue when switching with MOSFETs - like a motor driver has. It'll also take care of the reverse EMF for you.

In your case however as you have that extra MOSFET for PWM it would be very nice for your relay if you use that to switch off the power before switching the relay. Then there's no current any more, no sparky sparky on the contacts, and the relay can live long and happy ever after.

Hi, yes that's exactly what I'm doing. The wider project has a main board supporting 4 x motor cards. Each motor card has a DPDT relay for direction changing and a MOSFET for speed. All four relays are switched together and never while conducting - there's no need to switch direction while moving for this project. It's a motorised loft ladder rather than an RC racecar.

The idea was simplicity and minimising number of PWM pins - motors will never be going in opposite directions simultaneously so direction is common to all of them while speed is controlled independently.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.