Simple SD Card Audio Player with an 8-pin IC

    This is a simple SD audio player biult with only an 8-pin microcontroller. The ATtinyX5 series (25/45/85) 8-pin AVR microcontroller has two fast PWM outputs in 250kHz carrier frequency. This enables to output a wide frequency range audio signal. I built an audio player with the 8-pin AVR and an SD memory card (SDC). The SDC can be controlled with only six lines, two for power supply and four for control signals. It can also be easily attached to 8-pin microcontrollers. The main application of the tiny X5 series AVR seems SMPS and related according to its integrated peripherals.

    Anyway this audio player is very simple and a few wires to be solderd so that it is suitable for brief soldering work before breakfast.



Hardware

   Right image shows the world's smallest audio player (as MicroSD player, perhaps...). There are three schematics for the player in different configurations. The recording media to be used is a MicroSD. Of course the standard SDC and MiniSD can also be used by proper socket conversions.


     The speakers are driven directly with PWM output of the AVR. The load may be too heavy for the output port. However the output current is never exceed the absolute maximum ratings at 3 volts supply voltage even if the port is tied to the power supply rails. Therefore it cannot sound loud but it will create sufficient sound that listen on the desk with high efficiency speakers. When connect the audio outputs to the amplifier, the high frequency component must be filtered out with LPF. Do not input the PWM signals directly to the amplifier or the amplifier and speakers can be damaged.

                                               Schematics: Mono | Stereo | Mono(Hi-Res)

Software

    Using the memory cards on the embedded projects means that the firmware must manipulate the FAT file system. I used Petit-FatFs module branched from full featured FatFs module. The Petit-FatFs was developped for very small memory system that available RAM size is less than 512 bytes. It is suitable for tiny AVRs and PICs.

    There are some different firmware files in the archive for each hardware configuration. The fuse values are combined to the hex files. However some AVR programmers may not support this sort of hex files. If it is the case, remove last three lines from the hex file. The fuse values to be programmed are found in the main.c. The dual output configuration that other than mono uses all I/O pins including RESET pin. To switch RSTDISBL fuse, it must be programmed in HVSP method that most AVR programmer does not support. ISP method can also program it only first time but never re-program. The monaural output configuration uses five I/O pins and it does not need to switch RSTDISBL fuse. It can be programmed in ISP method that supported by all AVR programmers.

     The SD audio player supports only RIFF-WAVE format files in LPCM, 8/16-bit, mono/stereo and upto 48kHz sampling rate. MP3 files must be converted to the WAVE file. The player start to play on power-on or card insertion. If a sound file directory "wav" is exist on the root directory, the WAVE files in the sound directory will be played in order of directory listing. If the directory "wav" is not exist, the WAVE files on the root directroy is played instead. Push button switch is to jump to the next file.

Resources


Firmware (Source files + HEX files) {DEC. 04, 2011}

Related Movie: 8-pin microSD player (This project)

Origional Source : enl-chan.org


0 comments:

Post a Comment

You Like the article, Then Please Leave a Comment here !!!

ShareThis

Related Posts Plugin for WordPress, Blogger...
 
ELEX IDEA BLOG © 2012 | Powered by Blogger