Trouble with bandpass filters

Thread Starter

skyjive

Joined Jul 9, 2011
11
Hi all,
I am working on a device to turn an electrical appliance on or off by singing a specific musical note. The idea is to amplify the signal from a microphone and put it through a bandpass filter that only passes the note in question, then to drive a relay with the output from the filter. The problem I’m having is with the bandpass filter, I can’t seem to get it to attenuate all the unwanted frequencies that aren’t the desired note. I have tried both active and passive designs, and both seem to have the same problem, that all frequencies (as tested by putting the mic next to a piano and pressing different keys) seem to pass through more or less with the same degree of attenuation, which is completely baffling.
The target frequency is middle C, 261.6 Hz. The passive filter shown I calculate to have a central frequency of 258 Hz with a bandwidth of 21 Hz, which should be sufficient for the desired task but apparently isn’t. I have also tried replacing the passive filter with the active filter shown in the second image, with similar results.
So what am I missing here? Why are my bandpass filters not passing a band?




 

Audioguru

Joined Dec 20, 2007
11,248
Your extremely simple LC filter has shallow slopes so of course it passes unwanted frequencies. You need a filter with very steep slopes.

I have never seen your active filter before. It is similar to a Multiple Feedback Bandpass Filter that has plenty of output at an octave or two above and below the pass frequency.
 

joeyd999

Joined Jun 6, 2011
5,237
Ok makes sense, so what would be a good type of filter to use that would have the requisite very steep slopes?
You will probably need multiple orders to get the response you need. I've published a spreadsheet to assist in the design of a 4th order MFBF here:

http://forum.allaboutcircuits.com/showthread.php?t=61224

You will need OpenOffice or LibreOffice to use it.

As an alternative, you could consider synchronous or quadrature detection. Such methods can result in *very* tight response, but are far more complex than a simple analog filter.
 

Audioguru

Joined Dec 20, 2007
11,248
With the best filter available your circuit still will have false alarms from something causing its frequency.
Have you seen the touch-tone DTMF frequencies? There are two frequencies required for an output not just one. The upper frequency is selected so it is not a harmonic of the lower frequency. Their very narrow filters are usually a modern switched-capacitor type.
 

joeyd999

Joined Jun 6, 2011
5,237
With the best filter available your circuit still will have false alarms from something causing its frequency.
Have you seen the touch-tone DTMF frequencies? There are two frequencies required for an output not just one. The upper frequency is selected so it is not a harmonic of the lower frequency. Their very narrow filters are usually a modern switched-capacitor type.
Have you ever tried to sing dual-tone? :D
 

Thread Starter

skyjive

Joined Jul 9, 2011
11
Thanks for all the responses everybody. I didn't realize how non-trivial designing this kind of filter could get (as you may have guessed I'm pretty new to circuit design), the FilterPro program looks helpful, thanks for the link.
 

Adjuster

Joined Dec 26, 2010
2,148
Note also that even with a good filter, the piano is not an ideal source of test signals. Each key generates a different fundamental tone, but also a series of overtones at higher frequencies. The different relative strengths of such overtones is one reason for the difference in the quality of sound (timbre) between different instruments.

Depending on how the piano is tuned, you would expect some of the overtones of lower notes to be identical or very close to the fundamentals of higher ones.
 

Audioguru

Joined Dec 20, 2007
11,248
Have you ever tried to sing dual-tone? :D
It is possible.
A test for a touch-tone receiver is how many times per hour it give a false output when there is ordinary speech as an input. It is called "talk-off".

I refuse to pay extra for touch-tone dialing so my home phones dial for free with old dial-pulses (clickety-click). A switch on each phone enables touch-tones when I make a completed call to my bank or credit card company.
 

joeyd999

Joined Jun 6, 2011
5,237
It is possible.
Really? I just assumed that one's vocal cords would produce harmonics, like any stringed instrument.

Makes me think of a teenager whose voice is changing and crackles between high and low pitch.

AI refuse to pay extra for touch-tone dialing so my home phones dial for free with old dial-pulses (clickety-click). A switch on each phone enables touch-tones when I make a completed call to my bank or credit card company.
You mean there are still places where touch-tone is not the default???

I remember when I was I kid, for fun I would dial the phone by repeatedly pressing the switch hook! I kinda miss that.
 
Top