What frequency for PWM of 24V 50W DC motor

ferrymanr

Member
I have a geared DC motor rated at 24V 2A. I intend driving with PWM from a 20X2 into an L298 driver (because I have some in the box). The idea is to drive the L298 bridge inputs from the 20X2 to provide direction control and apply PWM to the L298 enable input. I can then turn on both bridge inputs for fast stop. This is a servo type application with position feedback from a 10 turn potentiometer. The motor load has a high inertia so using PWM means I can ramp down the speed before a final stop and save stripping the gears!
The only problem I have is deciding on what frequency to run the PWM. Is there a rule of thumb for PWM drive frequency. I have seen controllers that run a variety of rates from 1kHz through 100kHz. I am guessing there is a limit related to the motor characteristics.
Thanks
Richard
 

Dippy

Moderator
In many cases it is 'try it and see'.
Often there are compromises between performance at various RPMs, torque, , noise (audible and electrical EMC) and what the motor is happy with. "2A" may mean unloaded, I have no idea of your motor.
Do make sure your driving circuit, PSU and wiring is happy with 'worst case' load/stall conditions.
Do ensure that, under failure, that 24V can't sneak into your PICAXE otherwise you'll have a big POOF.

Once you have finished your circuit post it. There are people here who can help with optimising the circuit performance... including the use of capacitors for bypass/decoupling .... a popular and (oft forgot) topic.:)
 

ferrymanr

Member
Thanks Dippy. I have done a similar project with pair of 24V stepper motors and that has been successfully working for several months driving an antenna system in azimuth and elevation from an RS-232 control signal. I had to run the 20X2 at 32 MHz to cope with generating and counting steps for two motors simultaneously. That was based on a surplus big heavy duty pan and tilt CCTV camera mount. I have obtained another similar pan and tilt drive but this one has standard DC motors (you get what comes at £10 a time!). This should be a simpler project although I am not altogether happy with just 10 bit A/D on the 20X2.

I did have to be a bit careful about decoupling and grounding with the stepper motor version and have not had problems, not even RF noise even though the antennas mounted on the unit are looking at signals of around -160dBm and can detect solar noise!!!
Richard
 

Goeytex

Senior Member
Anywhere from 50 hz to 20Khz depending upon motor type, application & load.

Higher frequencies usually mean higher losses and more heat in the FETs /Controller. If frequency is to high, control will be poor, to low and the motor may be "jerky" A gear motor can usually take lower frequencies as the load dampens & smooths the pulses.

Also consider the switching performance of the transistors/ Mosfets. Slow/lossy Mofets will limit frequency. .

I'd suggest around 2K to start. But you will probably have to experiment.

Don't forget to use standard noise suppression techniques.
 
Last edited:

erco

Senior Member
I don't get the new tendency toward high PWM freqs. My old Hero 2000 robot was a heavy, torquey beast. I haven't measured it, but I know the PWM frequency was under 100, probably more like 10-20. Full torque at ultra-low RPM. These days I see (and hear) a lot of high-frequency PWM drivers that still stall the motor at low speeds, which totally undoes what PWM does best. Your motor pulses have to be long enough to accelerate the motor from zero speed, which sure implies that low freqs are more useful for low-speed operation.
 

Goeytex

Senior Member
High PWM frequencies for motor control are nothing new. The PWM frequency selected for driving DC motors can be both
hardware and application specific. There is no one best way to do it.

If your application is a Track Drive Battle Bot using a gear motors with a lot of starting & stopping then a relatively
low frequency may be a good choice. However if you are spinning a low torque motor at 5,000 RPM then higher
may work better.
 

tiscando

Senior Member
@Andrew,
To be more accurate, I fed 15.6kHz PWM into the enable pins of the L298 to control the speed of a motor. Each driver channel had a peak current of up to 2 Amps (it's maximum DC current). I don't notice any obvious problems with the driver.

Edit: Remember to use Back-EMF flyback diodes on each used channel of the L298 (like I did - an SB140 from GND to driver, and another from driver to Vs).
 
Last edited:

inglewoodpete

Senior Member
I have used 5, 10 and 20kHz PWM on the enable pin of an L298 to control a 2A 12v motor. Back-emf quenching is via a bridge rectifier and capacitors as per the L298 datasheet. Actually, I have 32 of these set up, so the reliability is proven.

The two noticeable differences were the PWM ratios required for the different frequencies and the noise. The torque of the motor will change according to frequency. Noise: 5kHz is loudest, 10kHz is the most irritating and I can't hear 20kHz: my ears must be getting old!

Due to the relatively high currents and cabling lengths involved, I had to use opto-isolators on each of the 3 inputs to the H-bridge (A, B and En). It worked perfectly.
 

westaust55

Moderator
While my experience is more with AC motors, with 2 kHz carrier frequency for PWM the motors emit a loud noise and as the frequency is increased some noise at 4 kHz and again 8 kHz and above not audible - even in years past when ears could hear top end well.
reactance is 2*pi*f*L (L=coil inductance) and similar for capacitance of wiring.
Thus as mentioned, as frequency increases you get greater leakage current in cables and greater losses in windings.
With small motors on long cables the increased current due to leakage can even exceed motor current on long cables.
Long might be 10 m at 1 kW. And 50 to 100 m at 55 kW
 

inglewoodpete

Senior Member
It's best to keep the PWM source and H-Bridge as close as practical to the motor for the reason that WA55 mentions. In the case I described in post #10, there is about 2 metres between the motor and the H-bridge/PICAXE, with up to 15 metres cabling from the power supply.

A reasonably sized electrolytic capacitor located near the H-Bridge keeps the harmonics and therefore losses in the supply cabling to an acceptable level.
 

Dippy

Moderator
Absolutely, and 2 things a big fat cap sitting on the H-Bridge forms part of the incudctance path and can improve the H-Bridge performance re: MOSFET spikes. Though, one further thing to consider when speccing the cap; ripple performance - as cable length increase and/or get weedier the ripple requirement in that cap change. For big drivers , never underestimate this. A good'nuff controller is fairly easy, but one that is good and will pass EMC testing is more difficult (don't forget recovery).
I work on AC and DC motor control and some of the finer design tweaks (electronic and physical) are very interesting.
 
Top