# How does a pull-up resistor affect an RC low pass filter? Are two resistors necessary?

I'm using a low pass filter and a Schmitt trigger buffer to filter the output of a rotary encoder. I have included the manufacturer's suggested circuit as well as my copy of it for sake of referencing components. My two questions are:

1. When calculating the cut-off frequency of this circuit, must you combine the two resistances? I.e. $$\\small 1/((R_1+R_3)\cdot C_2)\$$ and $$\\small 1/((R_2+R_4)\cdot C_1)\$$ as opposed to $$\\small 1/(R_3\cdot C_2)\$$ and $$\\small 1/(R_4\cdot C_1)\$$.

2. Is it even necessary to use two resistors? Could I get rid of $$\\small R_3\$$ and $$\\small R_4\$$? The current would still be limited into the switch when it closes, and it would still be a low-pass filter when the switch is opened, no?

• The rising edge and falling edge time constants are going to be different. Falling it is 10k * 0.01u. Rising is 20k * 0.01 u. I don't think there is any simpler way to look at it. In other words, the falling edge time constant is 100 us, and the rising edge time constant is 200 us. Aug 15, 2022 at 2:06
• Without R3 and R4, the current would NOT be limited to the encoder when it is pulling down. It would be directly discharging the 0.01uF ceramic capacitors. Whether that is OK or not depends on the details of the encoder. Perhaps you could replace R3 and R4 with smaller resistors, like 100 Ohm or 1000 Ohm. Or maybe it is fine the way it is. 0.01 uF is a pretty small resistor and it is conceivable that the encoder can repeatedly discharge it over and over without damage. But I can't say for sure. It may fail prematurely if you do that. Aug 15, 2022 at 2:13
• Small typo: "0.01 uF is a pretty small resistor..." (*capacitor) Aug 15, 2022 at 7:12
• I am integrating one of these right now. No guarantee that yours is the same, but FYI... Mine is quadrature encoded with mechanical wipers. The signals are labelled "CLK" and "DT". If the DT signal is low at the falling edge of the CLK signal, you are rotating CW. It has mechanical detents, and at the detents the signals are both high. With no caps, the most bounce that I have captured on a scope is 100 us (circuit specified by your vendor should work on mine). (cont)... Aug 15, 2022 at 8:13
• (cont) I am going to debounce in S/W. I believe that I have it working now, but it was more difficult than I expected. Debounce code written for a single switch won't necessarily work, the DT signal can change as soon as 2 ms after the CLK falling edge. So, you must find the edge (and sample the DT signal) within this time. Also, when there is a count detected, I am going to update an LCD (relatively slow process), I needed to be sure to resync my edge detector after the update. Aug 15, 2022 at 8:20