# How do I calculate the correct resistor, capacitor for a low pass circuit?

I'm looking through an article on www.allaboutcircuits.com and www.electronics-tutorials.ws in an attempt to learn more about how low pass noise filtering on for example a circuit that needs to supply 3.3V would be designed.

I don't have an oscilloscope, and I am most certainly not a mathematical or electronics genius, this stuff is all to make these weaknesses stronger, by learning.

So in a circuit like the following:

...how does one calculate the correct capacitance to use, determine which direction they need to be hooked up, and whether to use polarised or non-polarised caps?

Would I rather need to hook up the Vin supply to determine what noise there is in the first place, and decide from there, what I want to make my cut off frequencies?

I tried simulating this in iCircuit, but with some capacitor values, the frequencies fluctuated, and the voltage on my circuit increased in a stepping sinusoidal wave manner, so i clearly have no idea what I am doing. ;)

-
Also, is this what is referred to as a decoupling circuit? –  josef.van.niekerk Jan 11 at 9:41
The caps are called decoupling caps. Good to see someone from SA around here :) I miss home! –  Stacey Anne Jan 11 at 12:44

The use of decoupling caps is hugely dependant on the circuit in question. Any circuitry that generates a lot of high-speed switching is going to generate a noisy EMC profile. FPGAs, microcontrollers and high-speed interfaces all perform a lot of high speed switching and so require decoupling caps.

Usually a device datasheet will specify recommended cap values, locations and even dialectrics. These values are usually chosen specifically for the device in question. Sometimes these caps are optional, to be added at the user's discretion based on surrounding circuitry. If a voltage regulator is going to be used in a noisy EMC environment, then the caps may be included, otherwise they may not be necessary (the datasheet will indicate this), however decoupling is generally good practise.

Often devices will have several caps in parallel of different values. Each cap filters up to a specific frequency based on the impedance (Z) of the circuit. The cut-off frequency is calculated as follows:

$f_c = \dfrac{1}{2 \pi Z C}$

However, the impedance of the circuit is the most difficult factor to calculate. It's based on your allowable noise margin and the amount of current that's going to be switched at once. This really useful TI application report gives details.

If you're building a classic first order low-pass RC circuit then the Z turns out to be the R value and the maths is a lot easier.

This is the reason why most ICs give recommended cap values, they've done all the maths for you. If you'd like a practical example, the application note above gives a nice example on how to calculate a required cap value.

In terms of testing, if you have a power supply on its own, you probably won't see much noise at all. It would be necessary to measure the power supply noise when you're using it to power a microcontroller or similar device and choose cap values based on what the application note for the device says. Also, give trial and error a try. Try different cap values and see what you get.

-
This is super informative Stacey, thanks for answering! –  josef.van.niekerk Jan 11 at 12:59