DIY-duino, arduino for audio processing.

Hi! First time poster here

I really like the Arduino platform. Its very easy to learn and lets you do a lot of cool stuff. However there are some major problems which keeps me from loving it. I have a interest for guitar effect pedals and I aspire to make digital ones using the Arduino platform.

The main problems when it comes to sound-programming for Arduino is the very limited program memory (cant write long complex codes) and the poor bit-resolution of the ADC and the DAC. Improving the ADC and DAC can easily be fixed by adding a external Audio codec (DAC and ADC). Now I've seen a few DIY-Duino guides around the internet. My question is. Is it possible to write the Arduino program onto more complex AVR chips with larger program memory? Or alternatively could one hook up additional memory to the Arduino and are there any guides on how to do this?

You can get more memory AVR chips. The '1284p is a good one (128Kbytes) and is the largest chip you can get that is still DIP form. The next would be a '2560 (256Kbytes) but that is SMD and is hard to prototype.

For adding memory to an existing chip, it's extremely difficult process and programming. I would just go with a chip that has more memory built in.

very limited program memory (cant write long complex codes)

The common UNO board with ATmega328 chip has 32 KBytes of code space but only 2 KBytes of RAM. The RAM is "extremely" limited, but having done a lot of DSP work, I can't imagine what you are wanting to do that would require more than 32 KBytes of code space. That's really quite a bit for most embedded work. The 1284 that codlink mentioned does have 16 KBytes of RAM, but that's still rather small for audio work, and none of the common Arduino boards has any more RAM.

OTOH, the new DUE boards might be the ticket, http://arduino.cc/en/Main/ArduinoBoardDue

Thank guys this is really helpful :) Doing some more research I found this http://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/ Should get me started all right. I might have exaggerated a little using the word 'extremely'. Its just that the pretty simple programs Ive coded (a 9x clock signal generator for instance) seem to use up half the program memory. Now that might just be inefficient coding from my part, but I would imagine that if for instance I wanted to code a reverb with multiple delay lines using 16 bit audio the UNO would run dry pretty quick.

Something I noticed in the guide I posted is that the author favors running the chip with a 16MHz crystal, not a 20MHz. Is there any direct correlation between system clock speed and recommended supply voltage? I was unable to find any good sources on this

knutolai: Something I noticed in the guide I posted is that the author favors running the chip with a 16MHz crystal, not a 20MHz. Is there any direct correlation between system clock speed and recommended supply voltage? I was unable to find any good sources on this

No, you can run the chip at 20Mhz and at 5V.

Just take a look in the 1284 datasheet in section 28, Electrical Characteristics. 20-mhz xtal
is fine for Vcc > 4.5V, etc.

I’ve been using the 1284 a lot lately, and really like it. My robot needs much more code and
RAM space than the 328 chip has. There have been NUMEROUS threads about 1284 here in
the Microcontrollers section of this forum recently. The Bobuino variant files in the maniacbug
library have several errors, in case you use that version, which happens to be the most similar
to the Arduino header pinouts. Bob sells 1284 boards,
http://www.crossroadsfencing.com/BobuinoRev17/

knutolai: The main problems when it comes to sound-programming for Arduino is the very limited program memory (cant write long complex codes) and the poor bit-resolution of the ADC and the DAC. Improving the ADC and DAC can easily be fixed by adding a external Audio codec (DAC and ADC). Now I've seen a few DIY-Duino guides around the internet. My question is. Is it possible to write the Arduino program onto more complex AVR chips with larger program memory? Or alternatively could one hook up additional memory to the Arduino and are there any guides on how to do this?

I think the Arduino isn't very suited to Audio processing. You can expand the hardware to add proper ADC/DAC but it lacks RAM and it really isn't a powerful enough CPU for applying audio effects (which need floating point, FFTs, etc).

If you really want to make audio processors you'll need to use a proper DSP chip.

If you really want to make audio processors you'll need to use a proper DSP chip.

You are probably very right on this. From my research this require coding in C which I find very complicated compared to Arduino. If you know of any more user friendly alternatives or resources I'd love to see them :)

It's always nice to recommend DSP chips, but today's ATmegas are faster than the DSP chips from the 1990s. If the 1284 doesn't do the job, then the DUE is very fast.

oric_dan: It's always nice to recommend DSP chips, but today's ATmegas are faster than the DSP chips from the 1990s.

I don't think so.

eg. An Analog Devices 2101 (a fairly basic chip even then) would easily beat today's ATmegas at math:

http://www.analog.com/static/imported-files/data_sheets/ADSP-2101_2103_2105_2115.pdf

16 bit math with single-cycle multiply-add ("MAC") instructions.

Fully-floating-point chips were quite common, too, eg. http://www.ti.com/product/tms320c30

Call me when you've got an ATmega doing 50 Mflops, I'd like to see your source code... :)

Yeah, those are very fast, but are the 2nd or 3rd generation of TI DSP chips already. People were doing audio stuff and 5-10 msec FFTs with the earlier chips - audio is not really all that fast. You can chase after these things forever, but I would just try the Arduino and see if it will handle the job, then worry about something else. C is C is C, so algorithm code should largely transfer over to different processors. You only need to write digital filter or FFT code once.

Someone mentioned this on another thread, 168 Mhz Netduino Plus 2, http://netduino.com/hardware/