Simple SD Audio Player with an 8-pin IC

Electronics & Electrical Engineering Topics
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Simple SD Audio Player with an 8-pin IC

Post by Magneto » Mon Feb 01, 2010 10:48 pm

sdplayer.jpeg
sdplayer.jpeg (14.68 KiB) Viewed 20680 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
8pin.jpeg (9.74 KiB) Viewed 20680 times
Hardware
pcb_s.jpeg
pcb_s.jpeg (13.98 KiB) Viewed 20680 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
s1.JPG (18.16 KiB) Viewed 20680 times
(2) Stereo
stereo.JPG
stereo.JPG (23.99 KiB) Viewed 20680 times
(3) Mono Hifi
mono_hifi.JPG
mono_hifi.JPG (22.14 KiB) Viewed 20680 times
Firmware and Hex File
sd8psrc.zip
(40.64 KiB) Downloaded 1446 times
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Simple SD Audio Player with an 8-pin IC

Post by Rksk » Wed Apr 21, 2010 12:40 am

1. Will the ic available in Lanka?

2. can we improve this to read usb flash drive?
User avatar
Reginald
Sergeant Major
Sergeant Major
Posts: 29
Joined: Mon Aug 03, 2009 9:54 pm
Location: Mount Lavinia

Re: Simple SD Audio Player with an 8-pin IC

Post by Reginald » Wed Apr 21, 2010 5:32 am

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 ?
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: Simple SD Audio Player with an 8-pin IC

Post by Nipuna » Wed Apr 21, 2010 9:20 am

Cool.

Thanks a Lot Friend
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Simple SD Audio Player with an 8-pin IC

Post by Rksk » Wed Apr 21, 2010 10:08 am

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.
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Re: Simple SD Audio Player with an 8-pin IC

Post by Magneto » Wed Apr 21, 2010 3:06 pm

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
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Simple SD Audio Player with an 8-pin IC

Post by Rksk » Thu Apr 22, 2010 3:11 pm

Hi magneto,

according to your words, this AVR microcontroler should available in lanka.

i will give a try to find it.

thankz a lot.
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Re: Simple SD Audio Player with an 8-pin IC

Post by Magneto » Thu Apr 22, 2010 5:12 pm

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
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Simple SD Audio Player with an 8-pin IC

Post by Rksk » Thu Apr 22, 2010 7:39 pm

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.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Simple SD Audio Player with an 8-pin IC

Post by Neo » Thu Apr 22, 2010 9:57 pm

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
Post Reply

Return to “Electronics & Electrical Engineering”