Electronic – Why does the Sallen-Key 2nd Order High-Pass filter return a square wave? (Beginner question)

active-filter

As part of my Electronics 101 course in college, I was instructed to test a Sallen&Key 2nd order high-pass filter.

After designing the circuit, using an online calculator (can't link because I lack reputation), I confirmed the circuit to have the following characteristics (this also shows the values of the different resistors and capacitors I have chosen):
Circuit Parameters

To this circuit, I will be feeding a 2.5V amplitude sine signal at various frequencies, in order to examine the response of the high-pass filter. I will polarize the operational amplifier using +15V and -15V voltages.

In order to test it out, I downloaded an electronic circuit simulator called LTSpice IV, though I've been able to replicate the same result on other software.

This is how my circuit looks when replicated into the software, plus the faulty output below, where the green line is the input signal (sine 2.5V amplitude 200Hz frequency), and the blue line is the output signal. As you can see, the output signal is a square wave that roughly goes around the polarization values of the operational amplifier.

enter image description here

I get roughly the same output signal for all input frequencies. As far as I know, the circuit is correctly set up. I have tried changing the models of the various resistors/capacitors/operational amplifiers, and it doesn't seem to change the end result.

So far, the most promising thing is that if I remove the resistors R3 and R4, and I connect the output directly to the - input of the operational amplifier, the circuit starts working. This changes the circuit to be a Sallen&Key high-pass filter without gain. However, I'm still curious why the version with gain isn't working.

Here are the contents of the .ASC file that is generated by saving the circuit in LTspice IV:

Version 4
SHEET 1 880 680
WIRE 96 -48 48 -48
WIRE 240 -48 176 -48
WIRE 288 -48 240 -48
WIRE 464 -48 368 -48
WIRE 352 144 352 96
WIRE 240 160 240 -48
WIRE 320 160 240 160
WIRE 464 176 464 -48
WIRE 464 176 384 176
WIRE 512 176 464 176
WIRE -32 192 -144 192
WIRE -16 192 -32 192
WIRE 64 192 32 192
WIRE 128 192 64 192
WIRE 144 192 128 192
WIRE 224 192 192 192
WIRE 320 192 224 192
WIRE 224 224 224 192
WIRE 64 256 64 192
WIRE 352 256 352 208
WIRE 64 432 64 336
WIRE 464 432 464 176
WIRE 464 432 64 432
FLAG 224 304 0
FLAG -224 192 0
FLAG 48 -48 0
FLAG 352 16 0
FLAG 352 336 0
SYMBOL voltage -128 192 R90
WINDOW 0 -32 56 VBottom 2
WINDOW 3 32 56 VTop 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName Vin
SYMATTR Value SINE(0 2.5 200)
SYMBOL res 240 320 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R2
SYMATTR Value 31160
SYMBOL cap 192 176 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C2
SYMATTR Value 0.00000001
SYMBOL Opamps\\LT1012 352 112 R0
SYMATTR InstName U1
SYMBOL res 192 -64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName Ra
SYMATTR Value 9880
SYMBOL res 384 -64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName Rb
SYMATTR Value 16240
SYMBOL voltage 352 112 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName Vcc+
SYMATTR Value 15
SYMBOL voltage 352 240 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName Vcc-
SYMATTR Value -15
SYMBOL res 80 352 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R1
SYMATTR Value 9880
SYMBOL cap 32 176 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 0.00000001
TEXT -578 560 Left 2 !.tran 100ms

Hope someone can help me out on this one. I know that it's probably something dead simple but I've spent hours checking and rechecking the setup, and I can't find any resource that I can understand that tells me why my high-pass filter isn't working. Thank you!

Best Answer

Please remember that when using sim.okawa-denshi.jp it is up to you to know how to properly create the topology in question. It is ill advised to create a Sallen-Key topology with a gain greater than 2 because it tends to oscillate. In fact, the page itself even states (after typing in your numbers) that it will oscillate at a frequency of 401.949Hz. If you require more gain then please create another stage that focuses on that.

Edit: Even better, I noticed that you Q-factor and your Damping factor are both negative. That is a sure indication that you will have oscillatory behavior.

As a suggestion, please use the calculation that asks for fc, gain, and provide either the Q-factor or damping ratio. This will provide you with a more stable set-up (real op amps often require additional components for stability).