Go Down

Topic: low-pass audio filter (Read 995 times) previous topic - next topic

chris-h

hi people, new to the forum and new to arduino programming so please bare with me.

a bit of background:
i make rotary subwoofers to produce ULF (ultra low frequencies) for audio systems. the problem is is that the unit that i make cannot accept certain frequencies because of its design.

question:
i would like to use the arduino (UNO) to accept an audio signal from a 3.5 jack, filter out everything over a set frequency of my choice and then output the filtered frequencies to an amplifier.

any help would be greatly appeciated


Grumpy_Mike

Quote
filter out everything over a set frequency of my choice
Please give some sort of clue as to what frequencies you want to exclude. What is wrong with a low pass filter using op amps?
The Arduino is not good at digital signal processing what with its limited resolution and low sample rate.

chris-h

#2
Sep 02, 2017, 05:34 pm Last Edit: Sep 02, 2017, 05:44 pm by chris-h
frequencies to exclude would be anything above 20hz and 30hz. i would also like be able to change these frequencies as well according to preference between 5 and 30hz. i thought that using the arduino would make life for me a bit simpler and more accurate as i cant go over these frequencies at all and would enable me to program what the maximum output would be e.g if "output" > 30 = mute or something like that! im not too sure.. (or would it not output over the set frequency anyway?). im not to bothered about the sample rate so much as it isnt high fidelity output im looking for, as long as it gives a reasonably clean output and low distortion. i could also make a hardware lowpass filter to smooth out the output if necessary :)

i would also like to set the volume output according to the inputted frequency. i forgot to mention that

Grumpy_Mike

Quote
im not to bothered about the sample rate
No but Mr Shannon is.

You can not handle frequencies where you have less than two samples per cycle. So saying:-
Quote
frequencies to exclude would be anything above 20hz and 30hz.
Assumes, in the digital filtering world that you have some sample rate and you have a pre filter before the digitiser to completely remove frequencies where you get less than two samples per cycle. That is to say at that frequency you must be at least 60dB down.

Quote
and would enable me to program what the maximum output would be e.g if "output" > 30 = mute or something like that! im not too sure.
So now you want to measure the input frequency, that is a whole other ball game.

Quote
i would also like to set the volume output according to the inputted frequency. i forgot to mention that
You have just multiplied the complexity of the project by 100 and probably taken it out of the realm of an Arduino Uno and into at least the Zero class of processors. What sort of range of volume control do you want? I think you are looking for a better A/D and D/A that the Arduino has internally so you will need to add that as well.

DVDdoug

The Uno doesn't have a DAC.

You can make a low-pass filter with an op-amp, or there are some specialized "switched capacitor" filter chips that should be easier than an op-amp filter, or there are specialized DSP chips, or there is something called the miniDSP.

chris-h

i know i was asking of a lot, but that miniDSP you suggested it think will do just what i want! thank you

MarkT

hi people, new to the forum and new to arduino programming so please bare with me.

a bit of background:
i make rotary subwoofers to produce ULF (ultra low frequencies) for audio systems. the problem is is that the unit that i make cannot accept certain frequencies because of its design.

question:
i would like to use the arduino (UNO) to accept an audio signal from a 3.5 jack, filter out everything over a set frequency of my choice and then output the filtered frequencies to an amplifier.

any help would be greatly appeciated


This is a job for high resolution sigma-delta audio ADCs/DACs, which are usually I2S - most Arduinos cannot interface to this high speed synchronous bus.

You need high resolution ADCs and DACs because otherwise quantization noise will be audible on the
subwoofer.  You need to sample at 44kHz or above even though you are only interested in 30Hz, because
otherwise you will alias down the main audio frequencies onto the subwoofer.

Use opamps, much simpler.  6 pole butterworth with a 20Hz cutoff?

BTW below 20Hz is felt, not heard.

Quote
i would also like to set the volume output according to the inputted frequency. i forgot to mention that
Do you just mean the filter passband isn't flat?  Can you provide details?

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

rickso234

You could buy one of these for $7.50 ...
https://www.parts-express.com/variable-low-pass-filter-electronic-subwoofer-crossover-preamp-board-with-gain-control--320-670

It offers "Variable 22 - 300 Hz low pass frequency control"
Believe if you replace the audio caps C5 and C6 (may have to change C1, C2, and C7 also) with 10x the value, you get "2.2 - 30.0 Hz low pass frequency control".
A schematic is shown on the site.

pjrc

i would also like be able to change these frequencies as well according to preference between 5 and 30hz.
I understand low pass filters, but these words confuse me.

What does this mean?

MarkT

I think that means a tunable low-pass filter.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Southpark

No but Mr Shannon is.
I think so. It was shannon or nyquist... or both. Hats off (and on) to those guys.

Go Up