Pages: [1]   Go Down
Author Topic: Audio Due or not Due...  (Read 1392 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi to all,

Just starting on Arduino, old dev on ASM (68k, PPC...), I have a dev to do, needed audio.
The goal is to build an AED Trainer. An AED is the device you put on someone in cardiac arrest and which give an electric shock.
The "trainer" version of an AED don't give shock but simulate all the process.

Form hardware point of view: a push button, 2 leds blinking and a litle speaker. Maybe a DIP to select the program (shock needed or not, etc...)

The main problem is that info are given with a voice and that the lenght of all messages, linked together, is of about 30 seconds.
At 8khz 8bit, this mean 240.000 bytes.

First choice was an Arduino Uno, but we need more memory, or need to add a shiled to read SD Card.
I'm also afraid of the speed of data transfert and think reading byte after byte from SD and sending each time to the PIN of the Arduino Uno will not work (Am I wrong?)

Also, if we need to "buffer" the sound, the Uno has too little amount of memory.  smiley-fat

So I've had a look at the Mega, and at the Due.

The sound library of the Due seems to work with a SD Card, coping sound to RAM and then play. Which is not my goal. If the Due as 512K, it's enought to store our sounds.

So my question is: even if here, we are in the Due part of the forum, what is your opinion?
- Uno with SD reader?
- Mega with sound in RAM?
- Due with sound in RAM?

Thanks very much for your answer

Pierre-Louis
Logged

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The SAM3X8E has an MMU interface designed specifically to deal with large data throughputs from SD cards etc, and can move data about using its 'DMA', which means the main executed code in the CPU isn't directly involved in this - so from they respect, it's a good choice.

Of the three, the DUE (well, the SAM3X MCU specifically) is best suited to audio data by a long way.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK jtw, thanks a lot!!

Best regards
Pierre-Louis
Logged

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're welcome - I assume being a trainer this is just a personal project etc, as I don't believe the SAM3X8E is rated for use in medical equipment...
Logged

Chicago
Offline Offline
Sr. Member
****
Karma: 5
Posts: 456
With every answer comes more questions.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This can handle 22kHz 12bit audio on UNO -

http://youtu.be/kYKLJoUwGKo

http://www.adafruit.com/products/94
Logged

0
Offline Offline
God Member
*****
Karma: 26
Posts: 623
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The SAM3X8E has an MMU interface designed specifically to deal with large data throughputs from SD cards etc, and can move data about using its 'DMA', which means the main executed code in the CPU isn't directly involved in this - so from they respect, it's a good choice.

Has anyone published software which uses this capability to stream audio from a SD card to the DAC?
Logged

UK
Offline Offline
God Member
*****
Karma: 1
Posts: 530
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Has anyone published software which uses this capability to stream audio from a SD card to the DAC?

Honestly, no idea... Saying that, there is code in the Atmel Software Framwork (ASF) that deals with it yes. As for Arduino libraries, no idea.
Logged

Venezuela
Offline Offline
God Member
*****
Karma: 17
Posts: 522
Ground, ground, always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello fiercy-rabbit,

AS6 ASF for SAM3X-EK has two examples that play digital sound using a WOLFSON codec WM8731 in slave mode (via SSC). In the first one, one wav file (48KHz, 8bit, mono) is stored in a 32MB SDRAM. In the second one, one wav file (8KHz, 8bit, mono) is stored in a 512KB eeprom (via TWI). There is no example with wav files in SD card. The mentioned examples AFAIK are not ported yet to Due (I could do it). There is a handful of Arduino wav/mp3 SD shields out there that could cope with your requirements. Most of them for UNO. There is even a nice tutorial (David Mellis) using only the UNO board alone for short audio files :
http://dangerousprototypes.com/2011/12/25/tutorial-play-simple-arduino-audio-samples/

Here a brief list of Arduino sound shields:
-Sparkfun: DEV-10628: $39.95
-Sparkfun: DEV-11290: $39.95
-Adafruit ID:94: $22.00
-SpikenzieLabs SPL-005011: $55.95
-Rugged Circuits: Rugged Audio Shield: $34.95

I would recommend to contact their tech support. Good luck.
Logged

Pages: [1]   Go Up
Jump to: