Limor Fried, aka LadyAda, has introduced Wave Shield, a way to add audio output to Arduino projects:
Adding quality audio to an electronic project is surprisingly difficult. People tend to end up either using low-quality ISD chips (you might get 8Khz sampling rate for 30seconds out of these, if you’re lucky!) or mucking around with trying to control a CD or MP3 player. Although it’s possible to generate audio direct from a microcontroller using a PWM output, the quality is often low and its hard to fit a lot of music in an EEPROM chip. You can buy an embedded MP3 player board, but they’re either expensive or difficult to use!
Here is a shield for Arduino that solves many of these problems. It can play up to 22KHz, 12bit uncompressed audio files of any length. It’s low cost, available as an easy-to-make kit. It has an onboard DAC, filter and op-amp for high quality output. Audio files are read off of an SD/MMC card, which are available at nearly any store. Volume can be controlled with the onboard thumbwheel potentiometer.
The shield comes with an Arduino library for easy use; simply drag uncompressed wave files onto the SD card and plug it in. Then use the library to play audio when buttons are pressed, or when a sensor goes off, or when serial data is received, etc. Audio is played asynchronously as an interrupt, so the Arduino can perform tasks while the audio is playing.
Features:
- Can play any uncompressed 22KHz, 16bit, mono Wave (.wav) files of any size. While it isnt CD quality, it is certainly good enough to play music, have spoken word, or audio effects
- Output is mono, into L and R channels, standard 3.5mm headphone jack and a connection for a speaker that is switched on when the headphones are unplugged
- Files are read off of FAT16 formatted SD/MMC card
- Included library makes playing audio easy
Fried offers several suggested possible uses:
- Make a portable audio player
- Use the AT&T text-to-speech site to make snippets of speech that you string together for a talking project, like..
- Talking temperature sensor
- Talking clock
- Interfaces for sight-impared people
- Doorbell that plays a cool tune
- Jukebox/music-box that plays a song when its opened, or a coin is inserted
- Security system that warns the intruder
- Audio looper for musical effects and performances
- Synthesizer with different sounds
- Really freaky halloween props that scream
- Display (like a point-of-sale box) that you can plug into to hear the message