Sallen and Key filter puzzle with LTspice

I was concocting a rather silly low-pass filter design, when I remembered that Messrs Sallen and Key did it better in the 1950s, and decided to use their two-pole design to implement a Butterworth filter (thank you also Mr Butterworth).

EinW 2Hz filter LTspice circuit

Wonderfully, there are free Sallen and Key Butterworth filter calculators on the web now – I used the one on CaculatorEdge – and messing around with them revealed that R1=R2 and C1=2C2 is one recipe for a Butterworth (maximally-flat) filter – easy.

EinW 2Hz filter LTspice plotSo that went into LTspice and I drew out a ~2Hz filter, with a cmos op-amp acting as a comparator at the front-end to pull the input of R1 all the way to both rails (diagram above).

And with a 5V 50/50 square wave on the input, out came the plot on the left. – not quite flat, but nearly.



The output settles to 2.75V, and with 90% duty cycle it settles to a 4.55V, and to 550mV with 10%.

Each seems high. Why are these not 2.5V, 4.5V and 500mV? I still have no idea.

If I put 2.5V dc into R1 (still in LTspice), the output settles to 2.50V exactly.

The output of the comparator is swinging from 0.0V to 5.0V, and in real life the AD8602 can legitimately be used as a comparator (and the results were the same with U2 out of the circuit anyway).

What mistake am I making?


Comments

No comments

  1. First guess was asymmetric input offset current but they are in the pA.

    However rail to rail outputs are never quite that, but this one seems to be further out on VOH than VOL which would give the opposite to what you have. Try putting a 10k pullup and then make it a 10k pull down on the comparator output and see if either changes things.

Leave a Reply

Your email address will not be published. Required fields are marked *

*