Trouble with bandpass filters

Discussion in 'The Projects Forum' started by skyjive, Dec 28, 2011.

  1. skyjive

    Thread Starter New Member

    Jul 9, 2011
    11
    0
    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?



    [​IMG]
    [​IMG]
     
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  3. skyjive

    Thread Starter New Member

    Jul 9, 2011
    11
    0
    Ok makes sense, so what would be a good type of filter to use that would have the requisite very steep slopes?
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,689
    2,750
    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.
     
  5. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  6. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,689
    2,750
    Have you ever tried to sing dual-tone? :D
     
    SgtWookie likes this.
  7. crutschow

    Expert

    Mar 14, 2008
    13,028
    3,237
    An easy way to design multi-pole active filters is to use the free FilterPro program from TI.
     
  8. skyjive

    Thread Starter New Member

    Jul 9, 2011
    11
    0
    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.
     
  9. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    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.
     
  10. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  11. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,689
    2,750
    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.

    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.
     
Loading...