I was just checking out the Arduino Due under the audio section where it says that it can play sounds. This is great, even if they are .wav files. I do have a question, however, in regards to the way it says to hook it up. It says it uses DAC0 and DAC1 for sound output. Is this indicating I hook the speakers up to DAC0 and 1 or do I need to hook them to DAC0,1, and GND, or what? and if so, which GND(s) does it want? I'm trying to work out an idea for a citcuit for pack sounds for ghostbuster cosplay.
Oh, and is it only able to play 1 sound at a time, or could it be mixed, aka a warning sound and the stream sound as an example.
Seems a good idea. (I dont know how fast it can write to analog out...)
I made mono from raw files (convert by "audacity") at 16KHz sampl.rate from an Uno via parallell SR and R-R2 network.
(there was just enough time to fetch data from SDcard. needed buffer for smuth run)
The Due pins have MUCH lower limits on output current than the Uno and Mega,
this is a VLSI low-voltage CMOS process, it doesn't do power in any sense. Unless
you know different for a specific pin a safe output current limit is +/-2mA, YES 2mA....
For audio out you need to feed the DAC outputs via a capacitor into an audio amplifier
with an input impedance of 1k minimum...
The DAC outputs are limited to rms output of 0.75V (2.2V peak-to-peak). They do not
go full-scale of the supply, note. They are also abyssmal performers, with sparkle
codes and equivalent to about 8 or 9 bits in practice due to the noise performance.
No good for music IMO.
[ For high quality audio out I suggest using noise-shaped class-D output directly ]
Basicly what I'm trying to do is i need to light a bunch of lights, and run sounds, for a proton pack prop. I would prefer to do this with 1 card if possible. The only problem comes with trying to do the sounds so far, the lights would be a simple task. So if anyone has any ideas on how to get the sounds to work, that'd be awesome
EDIt: Also, I don't mind setting up a set of PC speakers inside the pack if I need to, I just need audio out.
I want to share with you guys a sketch for playing all .wav files in the root of a MicroSD card, using an Arduino DUE.
The sketch is a mix of 3 examples found on IDE 1.5.5-r2 (Digital-Button, Audio-SimpleAudioPlayer and SD-listfiles).
Once powered, the DUE starts playing the first .WAV file it finds in the ROOT of the card.
The button on Pin 53 is for going to the next audio file. All other files and folders on the card are ignored.
The sketch sends all the debug info over serial.
Enjoy.
LE.: Both my Arduino DUE DAC's work perfect so far. I only used headphones and it almost blew my ears off. I would advise the use of a pot-meter. And DEFINETLY no speakers connected to that jack !
Please consider adding a series resistor to Pin53. This will add a bit of protection from the 3.3V line if some user inadvertently sets Pin 53 as an output.
A simple series resistor here could save the whole chip (and not affect the operation of your circuit in any way).