Improved Arduino Wav player with SD media

Not long time ago we featured simple Arduino wav player that played music stored in internal microcontroller RAM. Due to memory limitation, you can play only couple of seconds of sound on Arduino UNO. To remove this limitation Kathy Yang extended player by adding SD card, where any size and length music files can be loaded. Before you can listen for music, wav files need to be converted in to appropriate format so Ardiuno could play them correctly. This is done by special software provided by author. In order to select file and play it, you need to connect to Arduino via serial port debugger, where list of files are visible and with several control commands you can play file, stop, pause or switch to next file. Having this you shouldn’t have problem implementing you own user interface to control player. But more practical way of using it would be embedding sound effects in to project – think of educational child toy or other. Continue reading

SD Card Rescue Using Arduino

We all have that one day in our life, where our SD card suddenly dies on us. The author also had the same problem, but instead of throwing it in the trash, he end up recovering the data using an Arduino. SD cards can be accessed with two modes. The first is the SDIO mode, which is what cameras, laptops, and other card reader’s use. The second mode is SPI mode. SPI is slower, but much, much simpler. This is what we use when we have to connect the microcontroller to a SD card. The SD card library in the Arduino IDE contains an example called CardInfo. It connects to the card, and gets information such as size, file system type, and a list of files on the card. The author used a few sketches to dump the data on the SD card to his computer. The first looked at the file system and grabbed a list of files contained on the card. The second iterated over the file system and output all the files in hex over the serial port.… Continue reading

Playing real music with Arduino

Usually in electronic projects people choose to use low quality sounds like ISD chips with 8 kHz sampling rate, direct PWM, or end up with MP3 decoders. Las option is to play uncompressed audio files from SD/MMC card via DAC. Such solution can give good sampling rate and good quality especially when sound is filtered and amplified with op-amp. This project is set up around Arduino board. It takes wave files from CD/MMC card and plays them asynchronously as an interrupt. So there are resources left for additional tasks between them. It can play 22 kHz, 16 bit mono wave files of any size. Files are stored in FAT18 formatted media card – so it is easy to upload new files via standard card reader. All files and libraries are downloadable or as usually you can order a kit to enjoy the music. Over all project is well described – I recommend to read even if you aren’t going to build one. There are some good materials about audio sampling and interfacing SD/MMC cards with arduino. Continue reading