Pickup signal router

Hi,

My goal is to use an arduino to route up to 8 audio signals (signal in and out of the guitar itself and up to 6 pickups) I've looked into crosspoint switches, relays, optoisolators, and fets to switch analog audio, but they all required too many external components and I'm limited on space as this will be mounted in a guitar. I'd prefer to not route out the body any more than need be.

I was thinking about doing an ADC/DAC combo, well 8 of each I suppose, and digitally route the audio, but I would like anyone to share any advice they could give on this. Would this be too ram intensive for an arduino to handle? As it would ideally use 16 bit adc/dacs and the arduino can handle 16 bit numbers, would there be quite a bit of latency that I'd need to take into account?

It's sort of like a DSP thing, although I'm not going to be doing effects, just volume of signal, phase (polarity) inversion, and sending input x to output y.

Things I'm looking to get out of this post: -good adc/dacs to use, maybe multi channel ones? I've looked through quite a few, but my knowledge is limited when it comes to these kinds of chips. -advice on how to code this perhaps? -input, etc.?

Thanks, Mattias

This sounds like it could become a big project... I start by experimenting with one "effect" at a time, just using the regular guitar-output, and build from there. And, I'd build the breadboard/prototype separate from the guitar.

My goal is to use an arduino to route up to 8 audio signals (signal in and out of the guitar itself and up to 6 pickups)

I think there's a guitar that has a separate signal from each string. You could probably modify a pickup to do that.

]It's sort of like a DSP thing, although I'm not going to be doing effects, just volume of signal, phase (polarity) inversion, and sending input x to output y.

For those things, you don't need DSP. The Arduino is a little slow for high-quality sampling & DSP, but you could use an Arduino to control everything. It's a bit of a trade-off... Once you have the ADCs, DACs, and DSP hardware, you can do everything in software, and the possibilities are almost unlimited. There are some specialized DSP chips, but I've never used one. But for some "simple" things, doing it in "analog" hardware may be cheaper and you don't need to do any programming. (Most guitar effect pedals are analog.)

For digital volume adjustment, you can get a "Digitally Controlled Amplifier" chip or a digital potentiometer.

You can do polarity inversion with a simple op-amp circuit. It will take some additional circuitry to switch the polarity inversion in-and-out.

For switching, you can use Analog Switch chips. If you need all kinds of crazy switching/connection options, the wiring could get crazy and it might be easier to go with DSP.

As it would ideally use 16 bit adc/dacs and the arduino can handle 16 bit numbers, would there be quite a bit of latency that I'd need to take into account?

The latency issue is usually related to multitasking PCs. In a computer, the audio flows into and out of the buffers at a constant rate. The CPU reads/writes data to/from the buffers in quick bursts whenever it gets around to it. Without the buffer and the associated delay, you couldn't get smooth-constant audio.

These buffers/delays are not required with dedicated DSP hardware. There may be a small delay associated with the actual processing, but you rarely have latency issues with any kind of hardware effects box.

but they all required too many external components and I'm limited on space as this will be mounted in a guitar. I'd prefer to not route out the body any more than need be.

Miniaturization is tricky for hobbyists. You can get small surface mount components and have a custom circuit board made, but hand-soldering is difficult, and troubleshooting tends to be more difficult.

So far, I've managed to avoid surface mount on any of my home projects, but whenever I've tried to squeeze the design into a small box, I've had "extra" problems and everything was more difficult.

Hi DVDdoug, thanks for replying.

I suppose I should have been a little more specific. Mainly, I'm just going to be routing the pickups for different switching combinations that can be recalled as a preset. By doing this all digitally I could route a coil A of the neck humbucker into coil A of the bridge humbucker, as was all paralleling the signal from coil A of the neck with coil B of the bridge in reverse polarity.

Yes, my example is a bit extreme in the sense of common switching, but it's just to show the flexibilty that I'm aiming for.

My main concerns would be size, cost, and ability to play well with a soldering iron adc and dac combo, and the code that would be associated with this i.e. would I just read the signal like a regular analongRead, use the int returned and send it to the output that I want? That would give me the routing options I need, but how would i reverse the signals polarity in code? Would I just use a regular int and invert the number? For adjusting the volume (not gain, just cutting the volume) could I just use basic math like multiplication and division? Say, take input 1, divide by -0.5, send it to output 2, thereby sending out the opposite phase of the input signal at half volume?

In all honesty, I'm much better at coding than I am with actual analog hardware -I don't have to worry about frying anything with software :)

Bump: