2

I need to drive a DC motor with PWM, through a H-bridge.

The controller can't generate PWM at ultrasonic frequencies with resolution I desire, and the low-end of the spectrum (~100Hz) may be too slow for my needs (plus still create a 'hum').

There's a question about driving a fan and the answers suggest 1-4.7uF ceramic + some 100-1000uF electrolytic caps at the output as solution (plus a fast diode to clear reverse current). This works well for a fan, which only turns in one direction. In my case, the motor will operate in both directions, so I can't depend on fixed polarity of the output - the moment I reverse polarity the cap will be fried.

How do I go about silencing the motor in this case?

SF.
  • 1,108
  • 2
  • 15
  • 27
  • 1
    Please excuse, but why will the cap be fried? **EDIT:** That is, a ceramic one. – Dzarda Sep 02 '14 at 11:13
  • @Dzarda: Not the ceramic one, the electrolytic one. – Dave Tweed Sep 02 '14 at 11:21
  • If your controller can't generate high enough frequency to not cause whine, get or make one that can. Plenty of microcontrollers come with built-in PWM that still has lots of resolution at 24 kHz. Think of this as having used the wrong part in your first version of the circuit and fix it. – Olin Lathrop Sep 02 '14 at 12:45
  • @Dzarda: The 4.7uF ceramic won't do much good with a fried 1000uF electrolytic in parallel... – SF. Sep 02 '14 at 15:28
  • @OlinLathrop: Add to that two quadrature decoders, ADC, touchscreen support,built-in RS-232 to USB converter and all at reasonable price, and the number rapidly drops. – SF. Sep 02 '14 at 15:32
  • ...good news is I can still get 7-bit resolution at 23kHz, meaning I'll be only annoying the youngest customers ;) – SF. Sep 02 '14 at 15:40
  • @SF. You can always put in some _spread spectrum_ to that frequency, just by slightly adjusting the period. This would greatly limit the level of annoyance. Some chips have that in hardware. – Dzarda Sep 02 '14 at 15:47
  • @Dzarda: This may be the way. This hardware provides spread spectrum option (+-5% by default). To be honest I have no clue what is the effect of enabling it... – SF. Sep 02 '14 at 16:00
  • 1
    All that stuff you mention doesn't have to come from a single micro. If you have that many things going on, then offloading the cycle by cycle motor control to a micro optimized for that is probably a good overall architecture. The main micro that runs the GUI sends high level commands to the motor controller, like "go to position xxxx" and the like. – Olin Lathrop Sep 02 '14 at 16:54
  • And more featureful chips are more likely to have a PLL boosted clock giving greater timing resolution anyway. – Chris Stratton Oct 14 '14 at 03:00
  • Can't you make a bipolar electrolytic by putting two unipolar ones in series in opposition? Perhaps someone knows if it's safe enough... I don't. :) I've just seen it suggested before. – darron Dec 13 '14 at 03:22
  • @darron: Unfortunately, the only way it will only be bipolar is that you'll be able to damage it by applying voltage in either direction. Been there, thought about diodes, that only put me in the trap of "you can charge it, but never discharge". – SF. Dec 13 '14 at 15:56
  • @SF: This seems to suggest otherwise: http://electronics.stackexchange.com/questions/21928/can-you-make-a-non-polar-electrolytic-capacitor-out-of-two-regular-electrolytic – darron Dec 13 '14 at 16:12

2 Answers2

1

Putting a large electrolytic capacitor across the motor obviously won't work in reverse, but even if that wasn't a problem it's still not a good idea.

When PWM turns the bridge transistors on they will charge the capacitor as quickly as they can, but when turned off it will discharge more slowly through the motor. This has two undesirable side effects:-

  1. It will destroy the accuracy of your PWM. With the capacitor 'filling in the gaps' between PWM pulses the motor will spin faster than expected at lower PWM ratios, but less so when heavily loaded.

  2. High current spikes will occur as the capacitor charges, putting stress on the bridge transistors and increasing electrical noise in the circuit. There may also be audible effects.

You can eliminate these problems by inserting an inductor in series with the motor/capacitor. However if your PWM frequency is low enough to be audible then the inductance required will be quite large (since you can't use an electrolytic capacitor the amount of capacitance you can apply to the filter is limited, so the inductance must be larger). Also the inductor must pass the relatively high DC motor current without going into saturation, and its resistance must be low to keep losses down.

If space is not a problem then simply use a choke with appropriate inductance and current rating. Then the only problem will be keeping it quiet!

The LC filter's cutoff frequency should be much lower than the PWM frequency, eg. if the PWM frequency is 1kHz then the filter should cut off at 500Hz or lower. If you used a 10uF capacitor then you would need about 10mH of inductance.

Bruce Abbott
  • 55,540
  • 1
  • 47
  • 89
  • so how would I go about finding the right choke? – SF. Dec 13 '14 at 15:08
  • It must be rated for higher current than your motor will draw, have resistance low enough to drop insignificant voltage at that current, and inductance high enough to filter out your PWM frequency. Filter calculator at http://sim.okawa-denshi.jp/en/RLClowkeisan.htm – Bruce Abbott Dec 13 '14 at 18:49
0

Are you restricted to a shunt cap only? Is this high voltage? Why do you need 1000uF?

Usually a shunt cap is used to divert high frequency noise: think "smoothing the pwm edges." A bunch of parallel ceramic caps may be just fine.

Make it an LC filter may improve your filtering since you can smooth out the current ripple a well. You then have two degrees of freedom in the filter design.

Just make sure the LC resonant frequency is different from any pwm harmonic you have.

Whistle1560
  • 391
  • 2
  • 5
  • It's something up to 32V though more likely it will be 12V; I'm not restricted except with budget or availability (...or - to a degree - space; the device should not require a forklift to move it...) – SF. Sep 14 '14 at 12:42