Page 1 of 3
Simple SD Audio Player with an 8-pin IC
Posted: Mon Feb 01, 2010 10:48 pm
by Magneto
![sdplayer.jpeg](./download/file.php?id=1313&sid=9ac6a0b04c3586196917545404267445)
- sdplayer.jpeg (14.68 KiB) Viewed 20823 times
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 can output wide frequency range audio signals. 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 handiwork before bed or breakfast.
![8pin.jpeg](./download/file.php?id=1311&sid=9ac6a0b04c3586196917545404267445)
- 8pin.jpeg (9.74 KiB) Viewed 20823 times
Hardware
![pcb_s.jpeg](./download/file.php?id=1312&sid=9ac6a0b04c3586196917545404267445)
- pcb_s.jpeg (13.98 KiB) Viewed 20823 times
Right image shows the built SD audio player. I wrote two schematics for the players in different configurations because there is a limitation on programming method due to the pin usage. The card type to be used is MicroSD. Of course the standard SDC and MiniSD can also be attached by pin 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 will not exceed the absolute maximum ratings at 3 volts supply voltage even if the port is tied to the 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
Software
Using the memory cards on the board 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.
There are two different firmware files in the archive for each hardware configuration. 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. The WAVE files on the root directory will be played in order of directory listing. Push button switch is to jump to the next file.
Schematics
(1) Mono
![s1.JPG](./download/file.php?id=1314&sid=9ac6a0b04c3586196917545404267445)
- s1.JPG (18.16 KiB) Viewed 20823 times
(2) Stereo
![stereo.JPG](./download/file.php?id=1315&sid=9ac6a0b04c3586196917545404267445)
- stereo.JPG (23.99 KiB) Viewed 20823 times
(3) Mono Hifi
![mono_hifi.JPG](./download/file.php?id=1316&sid=9ac6a0b04c3586196917545404267445)
- mono_hifi.JPG (22.14 KiB) Viewed 20823 times
Firmware and Hex File
Re: Simple SD Audio Player with an 8-pin IC
Posted: Wed Apr 21, 2010 12:40 am
by Rksk
1. Will the ic available in Lanka?
2. can we improve this to read usb flash drive?
Re: Simple SD Audio Player with an 8-pin IC
Posted: Wed Apr 21, 2010 5:32 am
by Reginald
2. can we improve this to read usb flash drive?
You might be able to do that. But you'll have to write extra codes to handle USB interface, etc...
You can do all these with a single chip(without coding) from MAXIM. See
USB to SD card interface IC.
What do you think Magneto ?
Re: Simple SD Audio Player with an 8-pin IC
Posted: Wed Apr 21, 2010 9:20 am
by Nipuna
Cool.
Thanks a Lot Friend
Re: Simple SD Audio Player with an 8-pin IC
Posted: Wed Apr 21, 2010 10:08 am
by Rksk
Thankz friend.
But i think it will not available in my country.
also i want to know, howto interface usb by coding?
all we waiting for Magento's idea.
Re: Simple SD Audio Player with an 8-pin IC
Posted: Wed Apr 21, 2010 3:06 pm
by Magneto
Hi Friend ,
You can interface the USB , with this ic. But the processor also should have built in USB interface. The processor
mention in this circuit has not contain such one. And also this chip is not available in Sri Lanka.
So I suggest , first try to interface a SD card to the microcontroller , as this not want any additional devices
Re: Simple SD Audio Player with an 8-pin IC
Posted: Thu Apr 22, 2010 3:11 pm
by Rksk
Hi magneto,
according to your words, this AVR microcontroler should available in lanka.
i will give a try to find it.
thankz a lot.
Re: Simple SD Audio Player with an 8-pin IC
Posted: Thu Apr 22, 2010 5:12 pm
by Magneto
Dear Friend ,
I am not sure whether I have done some mistake. up to my knowledge , you can not find any AVR microcontrollers from
sri lanka market. But you can order them from Farnel ( Colombo -02 ) . I think most cheapest method to buy those is from
ebay. But I am not sure this microcontroller is available there. But there are lots of similar micrcontrollers available in enay in avr family. You want to do little modifications for switch between microcontrollers in AVR family. Farnel prices are some
bit expensive. And there are lots of other sites also for you do order this chip , by on line
Thanks
Re: Simple SD Audio Player with an 8-pin IC
Posted: Thu Apr 22, 2010 7:39 pm
by Rksk
Dear friend,
online buying is not fit for me. because i havent any way to pay them. also i cant spend money to buy expensive things because of i'm not a rich. i'm a son of a farmer in SRI LANKA.
I will try to do another thing with cheap things.
THANKZ.
Re: Simple SD Audio Player with an 8-pin IC
Posted: Thu Apr 22, 2010 9:57 pm
by Neo
Dear RKSK,
You may take a WEB CARD from Sampath Bank. It is a VISA Debit Card which anyone can take. You load money to the card (Say Rs. 1000 or so) and spend for online purchasing. You will also be able to add the card to PayPal which will enable you to buy good from eBay, etc... which is considered more safe.
You might start a business for your area with it as well.
If you would like to talk about that, pls open up a new topic.
BR
Neo