go_away

Author Topic: Filtering power supplies  (Read 1457 times)

0 Members and 1 Guest are viewing this topic.

Offline mstachoTopic starter

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Filtering power supplies
« on: November 01, 2014, 08:21:37 PM »
My last thread about decoupling caps has brought me to a stage where I fear I must admit a profound ignorance :-P It has been repeatedly suggested to me that I should, for instance, put a 10nF capacitor across the leads of a motor.  Here is the root of my ignorance: why 10nF?  *How do you know* what to use?  What happens if I use something else?

My question is also more broad than this.  I'm currently working on a small project that will be using a wall wart.  I've learned that filter caps are important to make the output cleaner, and several websites have suggested several different values of capacitors for filters. Some use an RC filter, some just a cap...

I've seen a ton of information regarding the analysis of a filter that has *already* been designed - often someone will say "we've used a capacitor here, and the reason is to reduce ripple" or some such.  What is totally missed is how that filter was designed in the first place.  Why just a single cap (or why an RC filter?  Why not an RLC filter, or a butterworth, or anything else?) How was the value of the components chosen (for instance, why is 470uF so popular for DC power filtering from a wall wart?)

Are there resources around that I can read that explains these semi-black magic circuits and how to make my own projects more robust?

Mike
Current project: tactile sensing systems for multifingered robot hands

Offline Billy

  • Robot Overlord
  • ****
  • Posts: 132
  • Helpful? 2
Re: Filtering power supplies
« Reply #1 on: November 02, 2014, 01:18:36 PM »
There is no such thing as a purely capacitive capacitor. They all have resistance and inductance as well. So size and type make a difference. When you've heard to use a 0.01uF ceramic cap at the motor, the 'ceramic' part is more important than the 0.01uf part. The ceramic has low resistance relative to electrolytic caps so will filter better, and the 0.01uf keeps the part small so there is less concern about loading the motor driver, and a smaller one likely has lower inductance as well.

Putting in caps to guard against RF is not a precise science because the natuire of the noise is rarely understood, so I may suggest 0.01uf and waltr may say 0.1uf but that is habit being exposed. Neither can be considered correct or incorrect. Even very experienced electrical engineers may find themselves experimenting with caps and grounding schemes after a system has been built to get noise down to an acceptable level.

There are two ways to deal with noise and where the noise is depends on how you do it.
If the noise is at a frequency away from the signal you're trying to capture, you can filter it out at the input to the signal using a low pass, notch, or high pass filter. These filters are very well understood. Texas Instruments has a free program that will design these filters for you: http://www.ti.com/tool/filterpro

If the noise is at a frequency near the signal you're trying to measure then you need to deal with it at the source, or protect from it through shielding, distance, etc. When dealing with noise at the source you're not sensitive to any exact frequency so it's common to use general guidance like my 0.01uf ceramic cap mentioned above. You only need to be careful to stay away from values that will create excessive load on the source or values that may create a resonance and interfere with the correct operation. A 0.01uf ceramic cap connected directly to a motor driver will form a resonance likely much higher than the bandwidth of the driver so resonance seems unlikely in common cases we're likely to have on SOR.

Just don't let anyone tell you they know THE best way to deal with noise. The most effective way will vary by situation.

Offline mstachoTopic starter

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 10
Re: Filtering power supplies
« Reply #2 on: November 04, 2014, 08:46:10 AM »
Hm...interesting.  I guess the question is: what happens if the cap is too large or small?  Is there a universal behaviour you'll see or is it just up to the circuit itself?
Current project: tactile sensing systems for multifingered robot hands

Offline Billy

  • Robot Overlord
  • ****
  • Posts: 132
  • Helpful? 2
Re: Filtering power supplies
« Reply #3 on: November 07, 2014, 02:26:56 AM »
Hm...interesting.  I guess the question is: what happens if the cap is too large or small?  Is there a universal behaviour you'll see or is it just up to the circuit itself?

To filter noise from an encoder line, too large a cap and you will lose your signal at higher frequency. The impedance of the line driver in the encoder and the cap form a low pass filter. It may work great at low speed and then start malfunctioning at higher speeds.

On those 3 pin analog voltage regulators, too much cap and the spec sheet warns about oscillation.

Too small and you don't get much filtering.

Offline Fr0stAngel

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 3
  • [O_O] what??
Re: Filtering power supplies
« Reply #4 on: November 08, 2014, 01:26:03 PM »
There are two main reasons for using filter caps with the power supplies (especially when using an inductive load with a high transient current demand i.e a high torque DC motor).
1- A reservoir capacitor (usually a large value 1000uF or more) is put between the power and ground. It acts as a voltage /charge reservoir for small periods of time when the motor draws a high current (i.e when you abruptly change the motor direction).
2- A filter capacitor (usually a couple of capacitors, 1uF and/or lower). Then tend to provide a low resistance path towards ground for high frequency noise signals generated when then motor is operated. The motor tends to generate high-freq noise because it is operated at high PWM freq (sometime 20kHz and more to lower the audible 'humm' produced during motor operation).

The actual value of capacitor used is dependent on the the motor's transfer function / response to operation at high frequency, but normally it's just easier to go for a value of capacitor that would provide a low resistance/reactance to high freq signal. 0.01 uF between motor terminals is used for just the same purpose.
A word of advise though, if your motor draws close to 1A current or more current during operation, the best solution is to either optically isolate the logic circuits (Microcontrollers, sensors etc) from the motor power circuit or another good solution is to use a separate power supply for both circuits (don't forget to put them to a common reference in case of dual power supply).

EDIT:
Quote
Just don't let anyone tell you they know THE best way to deal with noise. The most effective way will vary by situation.
Well ok, I take back my verdict on the optical isolation solution being the best   ;) it's just that normally what people describe the best is what works for them or whatever works for most of the people
« Last Edit: November 08, 2014, 01:30:38 PM by Fr0stAngel »
'crazy' is the new hype! =)

 


Get Your Ad Here