Digital Audio Filter.

Discussion in 'The Projects Forum' started by philwalker, Sep 12, 2010.

  1. philwalker

    philwalker Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    41
    Hello All.
    Let me explane what I am trying to achive and what I problems I have hit.
    I am trying to make a device that will allow me to plug a mic into, and a pot that will allow me to sweep through the ENTIRE audio frequency range at a bandwidth of 500hz.
    Here is an ilistration of what I meen:
    [​IMG]
    My first attempt was to do it all analog. Using a simple RC Filter set up as a bandpass and using pots. However the accuracy of the components meant that I couldnt have enough control over the values and I found the bandwidth would fluctuate.
    So Im now attempting to do it digitaly with an Arduino. I have managed to input audio from a mic that passes through a preamp. I had to directly adjust regestry values to allow a fast enough frequency for the ADC and the PWM. The output is fitered to remove the fast PWM carrier frequency.
    A lot of reading about FFT has helped understand it. Ive looked at demos of spectrum analysers and had the idea that: With spectrum analysers you have many bins of diferent groups of frequencys and you output the amplitude of each bin, well how about having 3 bins, 2 bins get discarded (the two bins below and above the accepted 500Hz bandwidth) and the 3rd bin is what we want and output the contents of that bin. Can I then just adjust the values of the bin's boundries.
    Does this sound feasable?

    Thanks, Phil.
  2. hgmjr

    hgmjr Moderator Staff Member

    Joined:
    Jan 28, 2005
    Messages:
    9,030
    Location:
    Tennessee, USA (GMT-6)
    Let's say for the sake of this discussion that you could successfully sweep the freq range you desire using the 500Hz freq window. A single sweep could take many seconds possibly longer. The question that arises is whether the specific frequency pattern you are seeking to find will persist for the time it would take you to perform the scan?

    hgmjr
  3. philwalker

    philwalker Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    41
    If that became a problem I could sweep slower or incrase the bandwidth to say 1000Hz.

    Ive done a lot of reading about Switch Capacitor Filters and these seem perfect. Ive read you can create quite a simple set up that will band pass a specific cutoff frequency dependant on the input clock frequency.

    Does anyone have a digram to show this set up? Is said setup sutable for analog Audio?

    Cheers, Phil.
  4. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    Those are pretty steep skirts on the filter even for digital. I'm hardly surprised you had little success with the analog approach. You need to refine your expectations.
  5. philwalker

    philwalker Thread Starter Member

    Joined:
    Aug 15, 2010
    Messages:
    41
    Does switched Capacitor sound like a feasable option? or am I asking too much still?
  6. windoze killa

    windoze killa Distinguished Member

    Joined:
    Feb 23, 2006
    Messages:
    605
    Location:
    Melbourne Australia
    It is feasable BUT you have to think beyond the capacitors. Are the bandpass filters LC, RC, or LRC? You have to consider the inductance and resistance as well. Using normal capacitor values the steps in frequency will vary and more than likely at rates you don't want. You could consider varicaps or varactors. These are diodes that have voltage controlled capacitance. Generally they are very stable although can drift with temperature. These are also normally used in RF but that is also an option for you. If you use 2 oscillators and mix them to get the audio bandwith you desire you can then mix this with you incoming audio to create the band you want. you then just have to adjust one of your RF oscillators to sweep your audio bandwidth.
  7. Papabravo

    Papabravo AAC Fanatic!

    Joined:
    Feb 24, 2006
    Messages:
    6,251
    Location:
    Michigan, USA (GMT-5)
    I would recommend spending a few minutes with a good simulation program like LTSpice to investigate the properties of various filters. Get a feel for how much attenuation is possible in the transition between the passband and the stopband. Then you may be in a better position to formulate "practical" requirements for both analog and digital filters
Similar Threads
Forum Title Date
The Projects Forum Digital Audio FSO Link Dec 31, 2011
The Projects Forum Ambitious Project - 16's Digital VU's and 16 Alpha Displays Monday at 10:42 PM
The Projects Forum Controlling an analog circuit with digital input from microcontroller Nov 9, 2014
The Projects Forum CONSTANT CURRENT SOURCE WITH DIGITAL POT Oct 30, 2014
The Projects Forum Digital PC Fan Controller Oct 29, 2014

Share This Page