# Switching voltage divider and low pass filter combined

I have an input signal which I want to switch from 12V-5V and a low pass filter directly after that, the issue is, if there wasn't a switch I can calculate the cut-off frequency easily.

In my case, since the input resistance will change depending on if I have the switch open or closed, is there an orientation I could use to make this work? Or will I have to just buffer the voltage divider output and use a third resistor to set the filter cut-off frequency

Edit: The switch must be a SPST switch as that's the one I have at hand.

• Do you need to use an SPST/ON-OFF switch only, or are other switches allowed, such as SPDT/ON-ON? Commented Jul 5 at 5:51
• I need to use a SPST as that's the one I have at hand. I will edit my question to include this. Thanks for the heads up. Although a SPDT wouldn't answer my question, it would still be interesting to see how that could be used. Commented Jul 5 at 6:02

## 1 Answer

When the switch is off, you have a single resistor and single capacitor in an RC filter configuration, with time constant of RC.

If you switch on the pull-down resistor to make a resistor divider, you have the same capacitance C, but the output impedance of the divided output is now lower as the resistances are in parallel with regards to the output.

To compensate for that, you need to add capacitance to keep the RC time constant same.

It means that it should be sufficient to just add a capacitor in parallel with the switched 1K resistor.

Then you need to calculate the new capacitor value as the caps will be in parallel.

Something like this:

R1×C1 == (R1 || R2) x (C1 + C2)

After doing the actual math, I feel a bit silly as the answer is surprisingly obvious.

In that RC system, with 1k8 and 1uF capacitor, if you add a 1k resistor in parallel to the 1k8 resistor (impedance-wise), you need to balance it by addind a 1.8 uF capacitor, to keep the factors 1.0 and 1.8 in balance.