Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

filter help please

Status
Not open for further replies.

Neil Groves

New Member
ok i just transfered my circuit from breadboard to stripboard in the hope it was a bad connection, i have a better result but my bandpass filter doesn't seem to attenuate in the right place:

https://www.electro-tech-online.com/custompdfs/2012/01/2126272-1.pdf

I have only built the bass section so far and i get a signal from about 90Hz but it doesn't attenuate till i get to around 5Khz, i was expecting it to start tailing off at around 200Hz?

also i am using a 1N914 instead of the specified 1N4002, will this have a detrimental effect?

The chip i am using is LM324 since i had one laying around instead of MC33204, i don't know if this could be the issue?

Neil.
 
It looks like the 2N3904 transistor is supposed to go into saturation ... turning on the LEDs.
What do you measure for the collector to emitter voltage of the 2N3904?


... second thought ... that's probably not the problem.
Sounds like the attenuation would be related to the op-amp filter section.

... It might be useful to bring up LTSpice and do a simulation for the op-amp filter section, to see if your components perform the expected attenuation.
 
Last edited:
1) Do you have the "virtual ground" at half the supply voltage connected to the (+) input of the filter opamp instead of 0V?
Guess what? The "virtual ground" opamp is not needed because the (+) inputs of the filter opamps are a very high resistance just like the (+) input of the "virtual ground" opamp.

2) Is the input signal level low enough so that the filter opamp does not have severe clipping?

I found an equalizer circuit that is similar to yours. It also peaks at 100Hz.
I think your circuit should use a lowpass filter that boosts all frequencies below 100Hz, not just 100Hz.
 
good point Audioguru, my output from the op amp filter is a severely clipped signal appearing as almost a squarewave while my input is a beautiful sinewave from my mobile phone app....what does this mean? i need to reduce the gain of the filter section or just reduce my input signal? i'll try to attenuate the signal and see what happens, at the mopment it is about 1v pk-pk.

Neil.
 
I am sorry that I am not a teacher and cannot (will not) teach you a couple of years of electronics basics.
The filter is called a Multiple Feedback Bandpass Filter and hundreds of articles in Google can teach you about it. I think you should use a lowpass filter instead so that all low frequency signals light the low frequency LEDs instead of just frequencies near 100Hz which is not very low. Some music has the 16Hz from an organ (The Dark Side Of The Moon by Pink Floyde) and many others.
The articles tell you how to calculate the amount of voltage gain in your filter circuit so that you can turn down the input level to avoid clipping.

EDIT: I am glad that you also post on this website because the other website is for "international" students who can't speeky zee Engrish.
 
Last edited:
i didn't realise that Audioguru, maybe i'll just stick with this site then.

Anyway, i went back upstairs just now, fitted an L.E.D to the output, reduced the input which was 600mV to a much lower value (i didn't measure it) and all was well! the L.E.D glows from around 40Hz gets brighter and fades out at around 1Khz, so i'm going to go ahead now, build the rest of the circuit and get it working, then maybe play with the values in the filters if necessary.

thanks for your help guys

Neil.

Edit: how can i narrow the range of frequencies each filter responds to? or does that come under a lesson that you won't teach me? ;-)
 
Last edited:
Hi Neil,

It looks like the component selection does not match the intended center frequencies and could be off my as much as 2 times higher. For example, the lower circuit looks like it has a center frequency closer to 200Hz.

You can investigate this using the following formulas:

f=sqrt(R2+R1)/(2*pi*C*sqrt(R1*R2*R3))
G=1/((R1/R3)*2)
Q=R3*(pi*f*C)

where
pi=3.14159...,
R1 is the input resistor (1k in your circuit),
R2 is the resistor to ground (680 in your circuit),
R3 is the feedback resistor (560k in your circuit),
C is the value of EITHER capacitor with both caps the same value (0.047uf in the lower circuit).
f is the center frequency,
G is the center frequency gain,
Q is the 'quality factor' of the circuit which reflects the bandwidth, higher Q lower bandwidth, lower Q wider bandwidth.

The Q is somewhat high too so you may want to play around with that to see what effects you get.

To be more exact, the value of R1 above changes as the attenuation pot is adjusted. To check min and max frequencies, do the calculation with R1=1k and then do it again with R1=11k. That's because the pot adds resistance to the R1 in the circuit (makes it look bigger) for some settings of the pot, so that needs to be taken into account also. If the calculation is done with R1=1k and R1=11k you'll know the effects and can see if that will bother anything.
If the pot value is changed then instead of 11k you would use R1=1k and R1=1k+Rpot/2 where Rpot is the resistance of the pot (20k in the schematic). So if the pot is changed to 10k the max value for R1 would be 1k+5k=6k instead of 11k.
 
Last edited:
thanks for that MrAl, my maths isn't too good and anything other than ohms law baffles me lol, i'll just replace the values and play to see what effects i get.

Neil.
 
Hi Neil,

It looks like the component selection does not match the intended center frequencies and could be off my as much as 2 times higher. For example, the lower circuit looks like it has a center frequency closer to 200Hz.

You can investigate this using the following formulas:

f=sqrt(R2+R1)/(2*pi*C*sqrt(R1*R2*R3))
G=1/((R1/R3)*2)
Q=R3*(pi*f*C)

where
pi=3.14159...,
R1 is the input resistor (1k in your circuit),
R2 is the resistor to ground (680 in your circuit),
R3 is the feedback resistor (560k in your circuit),
C is the value of EITHER capacitor with both caps the same value (0.047uf in the lower circuit).
f is the center frequency,
G is the center frequency gain,
Q is the 'quality factor' of the circuit which reflects the bandwidth, higher Q lower bandwidth, lower Q wider bandwidth.

The Q is somewhat high too so you may want to play around with that to see what effects you get.

To be more exact, the value of R1 above changes as the attenuation pot is adjusted. To check min and max frequencies, do the calculation with R1=1k and then do it again with R1=11k. That's because the pot adds resistance to the R1 in the circuit (makes it look bigger) for some settings of the pot, so that needs to be taken into account also. If the calculation is done with R1=1k and R1=11k you'll know the effects and can see if that will bother anything.
If the pot value is changed then instead of 11k you would use R1=1k and R1=1k+Rpot/2 where Rpot is the resistance of the pot (20k in the schematic). So if the pot is changed to 10k the max value for R1 would be 1k+5k=6k instead of 11k.

after i have finished my project i will construct a test bed with sockets, so i can fit various values and combinations of components and use the formulae above to see what i can teach myself..........thanks again, very useful information.

Neil.
 
Bandpass vs. Lowpass

I think you will be happier with the lowpass filter as Audioguru suggested. Actually lowpass, bandpass, and high pass for the 3 sections. Attached are 2 simulations of your circuit and a lowpass filter. As you can see the bandpass still has some gain at 3Khz. Looks like to much gain for 1 volt input while maybe not enough for the lowpass, but I don't know what range you have for the input.
 
Thanks for your time Ron, yes the waveforms are exactly what i am experiencing in the real world, i see what you mean about the low pass filter, it would definately be better than having the low bandpass, i might well miss something with what i have, i am going to build the rest of the circuit, then build it again using low pass, band pass and high pass just to see the difference, i love experimenting with electronics and filters i think might keep me amused for a long time.

Neil.
 
I think you are using the wrong type of filters. the low frequency filter should be a lowpass, the high frequency filter should be a highpass and the bandpass mid-frequencies filter should be a bandpass filter, not with a narrow frequencies peak.
Here is what you have and what you need:
 
At the moment i am prefering my narrow peaky filters since they will give me more separation between channels, as i mentioned above though once i build my circuit i am going to experiment with other filters.

Neil.
 
Try this 2nd-order Sallen-Key bandpass filter for the mid frequencies. Its -3dB response is from 220Hz to 1500Hz. Its slopes are 12dB per octave.
The lowpass and highpass filters can also be 2nd-order Sallen-Key type.
 
You have gone way beyond what i can understand at the moment Audioguru, i have no idea what a Decibel is other than a measurement of sound pressure, lot less than how to calculate them.

ok so something i want to do after my project is finished is build filters and plot there characteristics on a graph, all the graphs i see are frequency vs Decibels, i was assuming i could vary the input frequency and simply plot the output voltage, is this correct or is it more complicated than that?

Neil.
 
Our hearing is not linear, it is logarithmic so we can hear a very wide range of levels. Decibels are measured logarithmically.

1 decibel is a very small change in level that is barely heard. 3 decibels is a small noticable change in level that is double or half the power in a speaker or 0.707 times or 1.414 times the voltage. 10dB is 10 times the power that sounds twice as loud. 20dB is 10 times the voltage. 40dB is 100 times the voltage. 60dB is 1000 times the voltage. 80dB is 10,000 times the voltage. 100dB is 100,000 times the voltage. 120dB is 1 million times the voltage etc.

A simple resistor and capacitor filter is called "first-order" and produces a gradual change of level (6 db per octave) when the frequency is changed. My latest circuit with two opamp filters has a "second-order" Sallen and Key Butterworth highpass filter and a "second-order" Sallen and Key Butterworth lowpass filter that have double the amount of change in level (12db per octave) when the frequency is changed. The second-order filters have two resistors and two capacitors.

If you build a second-order Sallen and Key Butterworth lowpass filter for the low frequencies, my latest circuit for the mid frequencies and a second-order Sallen and Key Butterworth highpass filter for the high frequencies then the three frequency bands will be split properly.

The original filter is called "multiple feedback bandpass filter" and has a very narrow peak then gradual slopes.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top