Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

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

Basics on playing WAV with Arduino

Sometimes you may want to ad sound to your projects, but adding additional hardware (like MP3 decoder) doesn’t seem worth efforts and expenses. Beep tones also seem to be not acceptable. What you are left with is simple WAV player, which can be played directly from microcontroller pin using PWM modulation. How hard can it be to set up a simple WAV player on Arduino? Kathy Yang has shared great guide on building simple WAV player on Freaduino UNO. He vent through all steps how to get your results. First of all he goes through audio basics where he analyzes sampling and quantization. This is a point where you need to decide your sound quality. Then follows to getting audio data from WAV files because file consists of data part (head) and audio data that can be played. The rest is to store audio data in to RAM. OF course with limited RAM you can play couple seconds of audio. If you are looking for more space, you can use external storage like SD card, EEPROM, flash, etc. Audio data… Continue reading