Simple SD Audio Player with an 8-pin IC

Electronics & Electrical Engineering Topics

Simple SD Audio Player with an 8-pin IC

Postby Magneto » Mon Feb 01, 2010 5:18 pm

sdplayer.jpeg
sdplayer.jpeg (14.68 KiB) Viewed 11266 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 11266 times


Hardware

pcb_s.jpeg
pcb_s.jpeg (13.98 KiB) Viewed 11266 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 11266 times


(2) Stereo
stereo.JPG
stereo.JPG (23.99 KiB) Viewed 11266 times


(3) Mono Hifi
mono_hifi.JPG
mono_hifi.JPG (22.14 KiB) Viewed 11266 times


Firmware and Hex File
sd8psrc.zip
(40.64 KiB) Downloaded 1110 times
User avatar
Magneto
 
Posts: 430
Joined: Wed Jul 15, 2009 8:22 am
Cash on hand: 7,055.80
Bank: 3,811,838.30
Location: London
Medals: 1
EC_Achievment (1)

Invitations sent: 5
Registered friends: 0
Reputation point: 8
Corporal

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

Postby Rksk » Tue Apr 20, 2010 7:10 pm

1. Will the ic available in Lanka?

2. can we improve this to read usb flash drive?
User avatar
Rksk
 
Posts: 751
Joined: Thu Jan 07, 2010 10:49 am
Cash on hand: 4,834.60
Bank: 212,150.20
Location: Rathnapura, Sri Lanka
Medals: 1
EC_Achievment (1)

Invitations sent: 35
Registered friends: 12
Reputation point: 12
Corporal

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

Postby Reginald » Wed Apr 21, 2010 12:02 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
Reginald
 
Posts: 28
Joined: Mon Aug 03, 2009 4:24 pm
Cash on hand: 5,077.90
Location: Stockholm

Invitations sent: 0
Registered friends: 0
Reputation point: 1
Lance Corporal

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

Postby Nipuna » Wed Apr 21, 2010 3:50 am

Cool.

Thanks a Lot Friend
User avatar
Nipuna
Promo Team
Promo Team
 
Posts: 2788
Joined: Mon Jan 04, 2010 2:32 pm
Cash on hand: 53,704.00
Bank: 470,602.10
Location: Deraniyagala,SRI LANKA
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 5
Registered friends: 0
Highscores: 1
Reputation point: 33
Staff Sergeant

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

Postby Rksk » Wed Apr 21, 2010 4:38 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
Rksk
 
Posts: 751
Joined: Thu Jan 07, 2010 10:49 am
Cash on hand: 4,834.60
Bank: 212,150.20
Location: Rathnapura, Sri Lanka
Medals: 1
EC_Achievment (1)

Invitations sent: 35
Registered friends: 12
Reputation point: 12
Corporal

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

Postby Magneto » Wed Apr 21, 2010 9:36 am

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
Magneto
 
Posts: 430
Joined: Wed Jul 15, 2009 8:22 am
Cash on hand: 7,055.80
Bank: 3,811,838.30
Location: London
Medals: 1
EC_Achievment (1)

Invitations sent: 5
Registered friends: 0
Reputation point: 8
Corporal

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

Postby Rksk » Thu Apr 22, 2010 9:41 am

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
Rksk
 
Posts: 751
Joined: Thu Jan 07, 2010 10:49 am
Cash on hand: 4,834.60
Bank: 212,150.20
Location: Rathnapura, Sri Lanka
Medals: 1
EC_Achievment (1)

Invitations sent: 35
Registered friends: 12
Reputation point: 12
Corporal

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

Postby Magneto » Thu Apr 22, 2010 11:42 am

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
Magneto
 
Posts: 430
Joined: Wed Jul 15, 2009 8:22 am
Cash on hand: 7,055.80
Bank: 3,811,838.30
Location: London
Medals: 1
EC_Achievment (1)

Invitations sent: 5
Registered friends: 0
Reputation point: 8
Corporal

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

Postby Rksk » Thu Apr 22, 2010 2:09 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
Rksk
 
Posts: 751
Joined: Thu Jan 07, 2010 10:49 am
Cash on hand: 4,834.60
Bank: 212,150.20
Location: Rathnapura, Sri Lanka
Medals: 1
EC_Achievment (1)

Invitations sent: 35
Registered friends: 12
Reputation point: 12
Corporal

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

Postby Neo » Thu Apr 22, 2010 4:27 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
User avatar
Neo
Site Admin
Site Admin
 
Posts: 2612
Joined: Tue Jul 14, 2009 8:37 pm
Cash on hand: 221,202.10
Bank: 15,536,454.00
Location: Colombo/London
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 94
Registered friends: 12
Highscores: 13
Reputation point: 74
Lieutenant

Next

Return to Electronics & Electrical Engineering

Who is online

Users browsing this forum: No registered users and 2 guests

cron