Op-amp biasing not working as intended

Thread Starter

Dr_Dankalicious

Joined Nov 4, 2025
6
Hello Good people,

I have a question regarding the biasing of a second order Sallen-Key low pass filter. The filter seems to work fine when I use a sinusoidal input in LTSpice and produces an output centered around 1.65V. However when I give it some random test data (top right image), the output waveform is not centered around 1.65V, but is rather shifted downwards.

Could someone guide me on why this happens with my test data and not with the sinusoidal input functions in LTSpice ?Any suggestions to look into would be really helpful.
 

Attachments

panic mode

Joined Oct 10, 2011
4,864
if you want sallen key, make it a proper sallen key... do not try to abuse it for other things like scaling/gain etc.

all R/C values are same (supposed to be same). you have C values same but not R1/R2/R3/R4.

wire it correctly. you have R5,R6 as split supply. so center is supposed to be VirtualGND. but there are no capacitors across either of the two. and technically C2 should connect to VirtualGND, not GND.

then you should be able to get expected output even if you feed it random data or PWM etc.
 

Ian0

Joined Aug 7, 2020
13,097
Hello Good people,

I have a question regarding the biasing of a second order Sallen-Key low pass filter. The filter seems to work fine when I use a sinusoidal input in LTSpice and produces an output centered around 1.65V. However when I give it some random test data (top right image), the output waveform is not centered around 1.65V, but is rather shifted downwards.

Could someone guide me on why this happens with my test data and not with the sinusoidal input functions in LTSpice ?Any suggestions to look into would be really helpful.
The non-inverting input to your op-amp has no DC path to ground.
Firstly, you need to EITHER stabilise your virtual earth with capacitors, or lose it altogether and replace R4 by two resistors of twice the original value, one to each supply.
Then, your input needs a resistor to ground after the input capacitor, it can be quite a large value (100k), or could be two equal values one to each supply.


@panic mode : it is perfectly normal for Sallen & Key filters to have non-unity gain, or different resistor values (generally they have EITHER non-unity gain OR differing resistor/capacitor values, not both) but varying the gain or one pair of values is how they achieve Bessel/Butterworth/Chebyshev characteristics. If all RC values are they same you get critically damped, Q=0.5.
Butterworth generally has one capacitor twice the value of the other, OR equal capacitor values and a gain of 1.6
see http://sim.okawa-denshi.jp/en/teikokeisan.htm
 

panic mode

Joined Oct 10, 2011
4,864
yeah, i have seen that, should have left suggestion more open...

once upon time i did played with values and calculations, trying to see what works best (for my needs). and yes, critically damped is what i aim for. I do not need ultra sharp cutoff and i find it is much better to make design modular. need an amp - use an amp, need a filter - use filter, need steeper curve - use higher order filter. this is simpler, works every time, no fussing with effects of component tolerances (capacitors!) or ripple etc.

btw. thanks for the link, seems handy..
 

Ian0

Joined Aug 7, 2020
13,097
yeah, i have seen that, should have left suggestion more open...

once upon time i did played with values and calculations, trying to see what works best (for my needs). and yes, critically damped is what i aim for. I do not need ultra sharp cutoff and i find it is much better to make design modular. need an amp - use an amp, need a filter - use filter, need steeper curve - use higher order filter. this is simpler, works every time, no fussing with effects of component tolerances (capacitors!) or ripple etc.

btw. thanks for the link, seems handy..
Yes. I like critically damped! It can also be implemented with two cascaded RC sections (no op-amp). If the values are equal , you get Q=0.33, If you make the 2nd R ten times higher and the 2nd C ten times lower, then it approaches 0.5. It big advantage it continues to attenuate at high frequency when a Sallen & Key response would be creeping back up again due to the phase shift in the op-amp (although you do need an op-amp to buffer it)
 

Thread Starter

Dr_Dankalicious

Joined Nov 4, 2025
6
The non-inverting input to your op-amp has no DC path to ground.
Firstly, you need to EITHER stabilise your virtual earth with capacitors, or lose it altogether and replace R4 by two resistors of twice the original value, one to each supply.
Then, your input needs a resistor to ground after the input capacitor, it can be quite a large value (100k), or could be two equal values one to each supply.
I used two capacitors in parallel with the resistors and the output of the mid-point of such a setup is fed into resistance R4.
As for your second suggestion, I placed the resistor after the C1 Capacitor but the same problem persists. Someone online referred to it as a DC return path to ground. But i don't fully understand why it is necessary. Can you help me understand ?

Thanks a lot for helping.
 

Ian0

Joined Aug 7, 2020
13,097
Someone online referred to it as a DC return path to ground. But i don't fully understand why it is necessary. Can you help me understand ?
Can you answer the question ”what is the DC voltage at the non-inverting input of the op-amp.”?
If you can‘t answer that question, then neither can the op-amp. The output of an op-amp is its gain multiplied by the voltage difference between its inputs. If one of those input voltages is not defined, how does it know what to do with its output?

If you are still using a single ended supply, did you wait long enough for the DC conditions to stabilise? With 100uF on the input, that might take a while. . . .
 

LvW

Joined Jun 13, 2013
1,994
Hello Good people,
I have a question regarding the biasing of a second order Sallen-Key low pass filter.
I am afraid the "biasing" is not the only problem with your circuit.
Three questions:
1.) Circuitry for DC biasing (necessary for single-supply operation only) should be connected to the non-inverting terminal
2.) What is the purpose of C1 in your circuit? It is necessary only if point 1) above is realized
3.) How did you find the resistor values in the negative feedback path (determining the closed-loop gain Acl) ?
Note that classic Sallen-Key filters are designed for maximum non-inverting gain values Acl,max=+3.
However, due to extreme sensitivities of the Q-value to this gain, only two cases are preferred: Acl=1 or Acl=2 (with two equal resistors in the feedback path).
 
Last edited:

crutschow

Joined Mar 14, 2008
38,316
Below is the LTspice Transient and AC (Bode) sim of your circuit with a proper, single-supply bias scheme that has a DC path for the (+) op amp node bias current:
(Note that the op amp you selected is not specified to work with below a supply of 5V.)

1763498853381.png
1763486993282.png
 
Last edited:
Top