Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Am I using the wrong Op-amp for a 4th order audio bandbass filter?

Status
Not open for further replies.

robosilo

Newbie level 4
Newbie level 4
Joined
Mar 16, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
73
Hello all,
I'm using an LM358 op-amp to build a 4th order band pass filter with a center freq of 21KHz and a bandwidth of 500Hz. My filter circuit knowledge isn't the best so i've been using a website that has a calculator to find the passive component values for a Butterworth filter model. ( **broken link removed** )
I'm using a .01uF cap and trimming potentiometers to set the specific resistor values. When I connect my waveform generator to the circuit and watch it on a scope the filter doesn't seem to be filtering anything. I get a somewhat stable waveform of a lower amplitude coming out of the filter. Am I using the wrong amp for this? I'm making a signal ground reference with two 10K resistors that divide my op-amp power source. I tried widening the bandwidth in case I just had it set too narrow but that didn't change anything. I'm starting to think that maybe I just have the wrong amp for this project. I typically use these amps for amplifying millivolt signals from current shunts. But the application notes show this device being used as a bandpass filter.

Any help would be greatly appreciated.
 

How about a schematic,with values?

And when you say it
doesn't seem to be filtering anything. I get a somewhat stable waveform of a lower amplitude coming out of the filter.

that's kind of contradictory. That's EXACTLY what a filter is supposed to do: lower the amplitude of signals outside a certain band. Have you tried sweeping the frequency of your signal generator to see if maybe your center frequency isn't where you think it is?

- - - Updated - - -

I just ran that calculator you posted. For a butterworth filter, 21KHz center frequency, 500Hz bandwith, Gain=1, it gives me a value of 6 ohms for R2. That sounds suspiciously low to me. I'd try simulating this circuit with the suggested values (and an ideal opamp) and see what you get. But I'm a little suspicious of that calculator.
 
Thanks. I did try sweeping the input frequency. I knew the resistor values weren't perfect so I went from 5K to 100K and the output seems to remain constant at 10K with no amplitude change across the sweep. Attached (hopefully) is the circuit I'm using.


butterworth forum pic.png

- - - Updated - - -

The low resistor values that connect to reference made me a little suspicious as well, but like I said, I really have no experience with filters so I just assumed that since the amp is simulating an inductor that things would look a little weird. Can you recommend a better simulator? I don't plan on doing a lot an analog design, I'm more of a micro-controller programming person so It's hard for me to justify buying software I won't use often(hence me using the free online calculator).
 

As to enhance what barry found concerning to reliability of this tool, note that the ratio of R1/R2 is almost close to 4.000, what means that in practical terms, the input signal is virtually short-circuited to the ground.



+++
 
I tried removing removing that resistor entirely and replacing it with a 100K resistor just for kicks. The output waveform has decreased substantially in amplitude and does seem to follow the input frequency instead of just remaining constant regardless of input.

I also tried making a more basic bandpass filter of a lower order using this model:
butterworth forum pic2.png

it's from another online calculator(because i'm a glutton for punishment). It also gives a low value that produces a constant output regardless of input. Again when I remove that resistor that pulls the signal down to ground the output frequency matches the input but the circuit now works as a low pass filter.

This is why i'm wondering if the amp I'm using just isn't ideal.
 

The answer to your initial question is yes. The bandpass filter has high Q and needs much more gain-bandwitdh product than LM358 provides. You need at least 10 MHz GBW.
 
Try the free FilterPro download from Texas Instrument. It makes the design of any order or frequency of active filter quite simple.

- - - Updated - - -

I tried removing removing that resistor entirely and replacing it with a 100K resistor just for kicks. The output waveform has decreased substantially in amplitude and does seem to follow the input frequency instead of just remaining constant regardless of input.

I also tried making a more basic bandpass filter of a lower order using this model:
View attachment 103263

it's from another online calculator(because i'm a glutton for punishment). It also gives a low value that produces a constant output regardless of input. Again when I remove that resistor that pulls the signal down to ground the output frequency matches the input but the circuit now works as a low pass filter.

This is why i'm wondering if the amp I'm using just isn't ideal.
I simulated the circuit but increased all the resistors by a factor of 10 and reduced the capacitors by a factor of 10 to give a more reasonable value for R3. My simulation with an LM324 (similar to an LM358) showed a center bandpass frequency of about 10.8kHz, so the limited frequency response of the op amp does severely shift the center frequency of the filter. You definitely need a higher frequency op amp.
 

The datasheet for the LM358 dual and LM324 quad low power opamps (the opamps in them are identical) show that their slew rate is so bad that they cannot produce signals above 2kHz at high levels.
When the output level is low to avoid slew-rate problems then the voltage gain at 21kHz is only about 25.

They are also very noisy (hiss) and have pretty bad crossover distortion.
 

Attachments

  • LM324 frequency response.PNG
    LM324 frequency response.PNG
    23.2 KB · Views: 93
  • LM324 slew-rate problem.PNG
    LM324 slew-rate problem.PNG
    19.6 KB · Views: 105
  • LM324 crossover distortion4.PNG
    LM324 crossover distortion4.PNG
    52.3 KB · Views: 90

I learn something new everyday. The LM358 amp has a bandwidth of 1.1MHz but that's unity gain. Since i didn't care about gain i thought it would work. I made a new test circuit with a center frequency of 2KHz and it functioned how it should. But when I narrowed the bandwidth the output turned into the constant waveform that I saw before where the input has no effect on the output. I'm looking for an amp that will work.

Does anyone have any suggestions on brand? I'm partial to ST and TI but really I'll take anything that works. I also tried the FilterPro software which is definitely going to help. unfortunately it doesn't give part number recommendations. it just says "ideal op-amp"

Thanks for the guidance guys!
 

................................
Does anyone have any suggestions on brand? I'm partial to ST and TI but really I'll take anything that works. I also tried the FilterPro software which is definitely going to help. unfortunately it doesn't give part number recommendations. it just says "ideal op-amp"
Linear Technology and Maxim are also good sources for op amps.

Using ideal opamps in FilterPro is a limitation which they say will be change in a future release. At present all you can do is take the part values and simulate it in a Spice simulator such as the free LTspice download form Linear Technology. That will show you the effects of using a non-ideal op amp on the filter response.
 

OP selection depends also on other criteria that haven't been mentioned yet like supply voltage range, noise specifications. TI has has a large portfolio in the 10 to 40 MHz GBW range. A "decompensated" OP for G > 5 can be used in the present circuit due to the low feedback factor.

Regarding circuit resistance level, the original dimensioning has a reasonable range of feedback resistors. R2 of 6 ohm isn't bad at all, factor10 as suggested, too.

You should consider however that component tolerances, particularly of the capacitors make it difficult to achieve a precalculated filter characteristic without tuning, although the used MFB topology isn't bad in terms of component sensitivity.

Using OPs with bandwidths above 10 MHz requires good supply bypassing and ground layout. Better don't think of a breadboard layout.
 

Thanks again. My requirements are pretty open. This isn't for a medical device or anything critical. My hope is to mix in a high frequency signal over the audio of a video file. The audio will be used to control a micro controller and have the timing match the video. I picked 21 kHz because it's just barely outside the human hearing range.
 

Why do you think that humans cannot hear above 20kHz? Do you think that they can hear to 19.9kHz but not above 20kHz?
Normally some people cannot hear above 3kHz and other people can hear well as high as 25kHz. When I was young up until I was about 30 years old I and many other people heard and were bothered by "ultrasonic" sounds. Now I am 68 years old and love to hear the high harmonics from music but I hate to hear distortion.
You are adding high frequency "distortion" to your audio.

What about the harmonics (or distortion) of your audio being detected as your 21khz signal? Do you have a "brick wall lowpass filter" to prevent it?

A few times you said your circuit "produced a constant waveform where the input has no effect on the output" which sounds like it was oscillating.
A very high Q filter rings like a bell which might have been happening.
 
My plan is to run the audio of the video through a filter and pull out everything above 20KHz. The audio involved shouldn't be going above that level anyways but processing it will just make sure. Then I'll mix in the frequencies that will be used for the signals. There will be another filter that then pulls out those frequencies before they make their way to a speaker or amplifier. I know some people can hear higher frequencies but they are effectively inaudible when they are a component of an audio track. Regardless, I planned on filtering the signals out they couldn't case any noise down the line.

- - - Updated - - -

Did you check the audio channel bandwidth? I would make a test before building the filter.

I did, thanks. I tested my PC and laptop up to 23K without issue.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top