Second order Sallen-Key high pass filter distortion - Page 1
Forum section: electronics / beginners

author: pigtwo
author_rank: Regular Contributor
timestamp: October 02, 2017, 03:52:09 pm
content: Hello everyone,I'm built up a simple second order Sallen-Key high pass filter but I'm seeing some weird distortion on the output. The schematic and scope output is attached. The op amp I am using is a LM224.The yellow trace is the input and the blue trace is the output. I have this weird spike on the output that I don't know what is causing it. The spike will move its relative position on the waveform if I change the frequency. It will go completely away if I'm above the cutoff point. Since the spike happens at different voltages I don't think this is crossover distortion. I've tried googling but I don't think I know the right terminology because I can't seem to find much.Does anyone have an idea what is causing this?

author: b_force
author_rank: Super Contributor
timestamp: October 02, 2017, 04:02:20 pm
content: ±100V , bit muchLittle difficult to say anything about it without knowing the rest of the circuit.But first question, did you decouple the power pins of the opamp?

author: Kleinstein
author_rank: Super Contributor
timestamp: October 02, 2017, 04:19:57 pm
content: The LM324 is known to show quite some cross over distortion at the output for anything faster than line frequency. The LM224 is just the extended temperature range version - should have the same distortion.

author: LvW
author_rank: Frequent Contributor
timestamp: October 02, 2017, 04:22:57 pm
content: Also for simulation purposes, it is always good to check in advance which the supply voltages are allowed.

author: Andy Watson
author_rank: Super Contributor
timestamp: October 02, 2017, 04:23:38 pm
content: Quote from: pigtwo on October 02, 2017, 03:52:09 pmWhy not? The cross-over will happen when the current changes direction - this is not necessarily at the middle output voltage swing. The LM224 appears to share the same output stage as the LM358:https://youtu.be/VgodYtiD_F0Note the 50uA offset in the output stage - you will only see distortion when the output requirements exceed 50uA.

author: pigtwo
author_rank: Regular Contributor
timestamp: October 02, 2017, 06:53:42 pm
content: @b_force the +/- 100v was only in simulation. The physical circuit was +/-7 volts. The input was a 5Vpp sine wave. As for the rest of the circuit, this is basically it. There is no load besides the scope probes. I'm not exactly sure what you mean by decouple the power pins. Adding bypass caps?@Kleinstein Oh, I think my understanding of crossover distortion is lacking. With my understanding of crossover distortion, it should happen at the same voltage level. I'm seeing distortion at two different voltages. Also varying the input signal offset didn't seem to move the distortion. Maybe I haven't thought about it enough but I would expect if I shifted the input voltage by 1 volt the output distortion location would shift by 1 volt(assuming unity gain).@Andy Watson That was actually the first hit on google I found. I watched it but I got from it that the crossing should happen at the same voltage level(I'm not claiming this is true, just what I thought). I tried changing the offset of the input waveform but it didn't affect where the distortion happened on the waveform. Which I would have thought would have changing the input signal offset would move the distortion location if it was crossover distortion. But I'm not AC coupling the output so I'm not very confident in this.To check if this is crossover distortion I'll try adding a load to the output to see if it goes away. I'm thinking this is it but I'm still a little confused about the output I'm seeing.

author: b_force
author_rank: Super Contributor
timestamp: October 02, 2017, 10:47:40 pm
content: Btw, crossover distortion looks very different.Just image two parts (upper and bottom) of a sine wave that have some space in between themgoogle is your friend, tons of images about crossover distortion.

author: pigtwo
author_rank: Regular Contributor
timestamp: October 02, 2017, 11:20:51 pm
content: I know, that's why I said I didn't think it was crossover distortion.

author: Audioguru
author_rank: Super Contributor
timestamp: October 02, 2017, 11:45:30 pm
content: The LM224 has plenty of crossover distortion and the highpass filter passes the distortion harmonicswith phase shift.Try the same circuit with a normal opamp that has NO crossover distortion.

author: Andy Watson
author_rank: Super Contributor
timestamp: October 02, 2017, 11:57:12 pm
content: It is crossover distortion. Again: it occurs when the current changes direction. Since the current is not in phase with the voltage, the "spike" does not necessarily occur at the mid-point of the voltage span. The phase difference occurs because it is driving the filter components. Also, the phase changes with frequency (as you would expect in a filter), which is why you observe this:Quote from: pigtwo on October 02, 2017, 03:52:09 pm

author: Audioguru
author_rank: Super Contributor
timestamp: October 03, 2017, 12:25:32 am
content: In addition to crossover distortion, the lousy old LM358 and LM324 (LM224) have lots of noise and very poor high frequency slew rate. The frequency in this circuit is too high for it. Its spec's are bad because it was one of the first opamps to use low power supply current.

author: pigtwo
author_rank: Regular Contributor
timestamp: October 03, 2017, 02:03:43 am
content: Quote from: Andy Watson on October 02, 2017, 11:57:12 pmAh ok, that makes sense. It was the current and voltage being out of phase that I wasn't thinking about. I've added a load to the output and the distortion goes away. What's neat is if I put a weak load on the output the distortion looks more symmetrical like I was expecting which I'm guessing is because the load is now mostly resistive. Thanks for the help!Quote from: Audioguru on October 03, 2017, 12:25:32 amYeah I figured the op amp was not the best. It's just what I had in a parts bin. I'm looking to make some bandpass filters for the audio range of frequencies so I need to do a little looking around for op amps. Thanks again!

author: amspire
author_rank: Super Contributor
timestamp: October 03, 2017, 02:10:31 am
content: You can eliminate the cross over distortion by adding a resistor from the opamp output to the negative rail. It needs to be low enough so that the opamp is always sourcing current. You just don't let the opamp output crossover. Not a great solution, but it can make the LM324 perform adequately.It is better using a faster, low distortion opamp. The results will be much better then the LM324 can ever manage.

author: b_force
author_rank: Super Contributor
timestamp: October 03, 2017, 02:17:32 am
content: Yeah, there are tons of much better opamp that are cheap.Or just simply sample them

author: Zero999
author_rank: Super Contributor
timestamp: October 03, 2017, 06:28:49 pm
content: Quote from: Andy Watson on October 02, 2017, 04:23:38 pmThe LM358 is the same op-amp as the LM224. It's just in a dual, rather than quad package. A single variant, the LM321 is also available.Yes, it's crossover distortion, which occurs when the current changes direction. Change the op-amp a proper one such as the NE5532 or TL072 and it will go away.