Digital Audio Filter.

Thread Starter

philwalker

Joined Aug 15, 2010
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:

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.
 

hgmjr

Joined Jan 28, 2005
9,027
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
 

Thread Starter

philwalker

Joined Aug 15, 2010
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.
 

Papabravo

Joined Feb 24, 2006
21,225
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.
 

windoze killa

Joined Feb 23, 2006
605
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.
 

Papabravo

Joined Feb 24, 2006
21,225
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
 
Top