Multiple Audio Outputs

So for an engineering project we need to essentially create a small 5-way filter bank to be used as an audio crossover. We have the speakers, each with an amp of its own, but we really want to save time and not deal with making our own analog circuit and dedicated DSP chips are too expensive. So I figured, why not use a computer program to process and filter the audio and then tell the arduino to output each band.

Would this be possible? Is the Arduino capable of outputting 5 signals simultaneously given to it over USB?

I doubt it would be fast enough. What rate are you sending the data? 44 kHz? At 115200 baud, the fastest you can reasonably run serial comms, you would only receive 11520 bytes a second. And you only have 2048 bytes of memory to put it into.

Maybe someone has better ideas but I think speed will be the limitation.

That was my concern as well, just kinda sucks that there doesn't seem to be a simple solution to this.

Perhaps that's why DSP chips are expensive. They have to work fast and do a lot. Buy maybe someone else has better ideas than me for this.

Yea I can see that, yet all my processing is on the computer side, I'm just needing a decent solution for the 5+ outputs

So I figured, why not use a computer program to process and filter the audio and then tell the arduino to output each band.

I'm not following that... If the computer is processing & filtering, what's the Arduino doing?

You could probably do this with a computer and a 5.1 channel soundcard (two soundcards for stereo). Assuming you know how to do audio programming on a PC or Mac. Is it OK to dedicate a computer for this?

...outputting 5 signals simultaneously given to it over USB?

They do make 5.1 channel USB soundcards. (Watch-out for "virtual 5.1" if you buy a cheap one.)

I'm not a DSP expert, but I don't believe the Arduino by itself is fast enough for audio DSP. In any case, you'd need separate ADCs & DACs. The ADC is only 10 bits, and I don't believe it's fast enough for 20kHz audio. The PWM "analog" outputs are clearly not fast enough for quality audio.

Analog filters are probably the easiest if you are going to build something. If you need variable crossover frequencies, I believe there are voltage-controlled filter chips and digitally-controlled filter chips. You could control those with an Arduino, since you would just be sending control signals rather than doing DSP.

24dB/oct Oops, I mean 12dB/oct variable Sallen-Key filters can be made with an op-amp, two caps, and a 2-gang pot for each mono filter. If you don't need the filter frequencies to be variable, then you can use plain resistors. Even easier.

I would imagine a five-way filter is only useful as an academic exercise, outside of synthesis applications, so as an analog circuit, it's artificially complex just by the sheer number of filter stages. But even still, it's a simple design duplicated a few times.

@Nickity

Looking it, up I can find some equations for deciding on the components. So all that said, yer pretty much just saying that i start with my original signal, split it into a low-passed and a high-passed, Send the low to an amp/speaker and send the high to the next set of filters and then repeat until I get my number of speakers? Really it seems simple, just a matter of getting design well down.

Edit: Would these be good calculators for my cap/resistor values?

http://sim.okawa-denshi.jp/en/OPseikiLowkeisan.htm
http://sim.okawa-denshi.jp/en/OPseikiHikeisan.htm

I don't believe the 328 is fast enough to process audio in this way. But you can DETECT energy in 5 frequency bands.

DroxPopuli:
Looking it, up I can find some equations for deciding on the components. So all that said, yer pretty much just saying that i start with my original signal, split it into a low-passed and a high-passed, Send the low to an amp/speaker and send the high to the next set of filters and then repeat until I get my number of speakers? Really it seems simple, just a matter of getting design well down.

Yes, that's generally the idea. You can combine them if it makes sense, but I might choose a more parallel layout to reduce the number of filters in any given signal's input chain... so, picking some random ranges, for example:

0-50Hz, 50-150Hz, 150-1000Hz, 1000-5000Hz, 5000-20000Hz

I might go from an input buffer to high-pass stages at 50Hz, 150Hz, 1kHz, and 5kHz, plus the lowpass at 50Hz. The 5kHz highpass goes straight to an output, and the 50Hz, 150Hz, and 1kHz highpass filters cascade into their respective lowpass filters (at 150Hz, 1kHz, and 5kHz).

This way, you reduce noise and phase distortion by the number of components in any particular signal's path.

I believe the links you gave are the same calculator I used when I designed a variable-frequency lowpass filter for a little powered sub. Sallen-Key isn't the best filter in the world, so if you have no need to vary the frequency (or you want a different filter slope), Linkwitz-Riley might be a better choice. Then again, if it's just academic, SK is more than adequate.