Hello Guest it is March 19, 2024, 12:12:13 AM

Author Topic: Can someone explain how a capacitor acts as a filter?  (Read 6038 times)

0 Members and 1 Guest are viewing this topic.

Offline SScnc

*
  •  77 77
    • View Profile
Can someone explain how a capacitor acts as a filter?
« on: July 07, 2012, 02:21:02 PM »
Preferably on breakout boards. I accept the fact that if you place a capacitor between the input pin and ground, that it will act as a noise filter. However I don't understand how this actually works. Anyone care to explain?

Thanks
Re: Can someone explain how a capacitor acts as a filter?
« Reply #1 on: July 07, 2012, 03:33:39 PM »
Easiest to understand as a water analogy.  Pretend you have a hose, with water flowing through it.  The water pressure is the equivalent of voltage (basically how hard it's "pushing"), while the flow-rate is the equivalent of current (the volume of flow).  Now suppose some wise guy is playing around, and periodically pinching the hose, interrupting the flow.  If you're trying to use the hose, you'll see the flow interrupted every time he puts this thumb over the end of the hose, and you'll see flow, no flow, flow, no flow.  Now suppose you instead run the hose into a big tank, and take your water from a faucet at the bottom of that tank.  Now when the bozo pinches the hose, your flow probably won't be interrupted, because there will be enough water in the tank to provide some flow, as long as the hose is not pinched for too long.  So, the tank "filters" the water, preventing you from seeing short interruptions in the supply.  That is precisely what a capacitor does - it stores charge, not water, but filters in precisely the same way as that tank.  If there is a disturbance (noise) on the input signal, the output signal will be maintained by the charge in the capacitor for a short period of time.  Only longer, or very frequent, noise will get through.

Regards,
Ray L.
Regards,
Ray L.

Offline SScnc

*
  •  77 77
    • View Profile
Re: Can someone explain how a capacitor acts as a filter?
« Reply #2 on: July 07, 2012, 07:15:27 PM »
Very clear, thank you for the analogy. One question though, would using a smaller capacitor have the same effect as using a smaller water tank, given the analogy? Reason I ask is I'm trying to filter noise on some encoder inputs. I have 1uF caps but the delay in the encoder getting the signal to the computer is too large and causing inaccuracies. Would a smaller cap reduce the delay?

Way back I learned all about capacitors and such things of the electronics world, but when you don't use it frequently, the information tends to fade.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Can someone explain how a capacitor acts as a filter?
« Reply #3 on: July 07, 2012, 07:22:12 PM »
Might be better using a line driver and a receiver for encoders.
Hood
Re: Can someone explain how a capacitor acts as a filter?
« Reply #4 on: July 07, 2012, 07:36:40 PM »
Very clear, thank you for the analogy. One question though, would using a smaller capacitor have the same effect as using a smaller water tank, given the analogy? Reason I ask is I'm trying to filter noise on some encoder inputs. I have 1uF caps but the delay in the encoder getting the signal to the computer is too large and causing inaccuracies. Would a smaller cap reduce the delay?

Way back I learned all about capacitors and such things of the electronics world, but when you don't use it frequently, the information tends to fade.

Yes, for an encoder, you need to use something fairly small, typically 0.01uF or 0.001uF.

Regards,
Ray L.
Regards,
Ray L.

Offline SScnc

*
  •  77 77
    • View Profile
Re: Can someone explain how a capacitor acts as a filter?
« Reply #5 on: July 07, 2012, 07:38:12 PM »
Well, off to radioshack. Thanks a ton Ray, hopefully this solves my issues.
Re: Can someone explain how a capacitor acts as a filter?
« Reply #6 on: July 07, 2012, 07:54:49 PM »
The other thing you can try, which does not slow down the signals at all, is to add a stiff pull-up resistor at the BOB input.  On the order of 300-1K ohms should work well.

Regards,
Ray L.
Regards,
Ray L.