Knowledge be the key, to unlock your brain and set your mindstate free.
you are here: Home >> Projects >> MP3 Player >>
MP3 Player
Updated 8/21/2006:
I made a new layout that has a single AA battery holder on the board. I step up the voltage to 3.3V with a
NCP1400 PWM step-up dc-dc converter.
Updated 8/7/2006:
PCBs arrived! They're double-sided and entirely surface mount. I used the hotplate method for soldering the top
side and soldered the bottom by hand. The hotplate worked incredibly well. I had no problems at all. There's a
very faint ~10kHz noise that I can't seem to remedy, but it' not really audible unless the player is paused.
The reference design used an LC filter to separate the analog and digital supplies, but I removed them from the
circuit since the filter made no difference on my breadboard. I also had to remove the decoder's crystal's resistor.
I couldn't get any audio when it was populated. The two issues maybe related.
Updated 5/19/2006:
At the core of this project is an 18LF4525, which controls all of the functions that are needed to play a file.
A media for file storage and a method of decoding the MP3s was also needed. Initially I was going to use Compact
Flash (CF) to store the files, but I switched to a Secure Digital (SD) card. It was a matter of simplicity, since
CF takes around 13? pins to implement compared to the 4 that SD requires. SD also uses SPI, so the bus can be
shared with other peripherals. I think the memory itself is also cheaper. MMC also uses the same interface, so
those types of cards can be used as well.
I wanted the files to be easily updated on the cards, so I chose FAT16 as the file system. I don't think they
make SD cards with capacities larger than 2GB, so the partition size limit shouldn't be a problem. FAT16 is
supported on nearly every OS, and is a bit easier to implement in firmware. There's no directory or long file
name suppport in my FAT16 library yet.
To decode the MP3s, I'm using VLSI's vs1001k. This is an older chip that I bought back when I first planned to
do the projects. Newer and better versions have been released, but I decided to use this since it was fairly
expensive when I first purchased it. The vs1001k has two SPI interfaces, one for commands and one for data,
that can share the same bus. Although they are SPI compatible, I bit-bang the vs1001 and leave the SPI hardware
for the SD card. This was done because I had problems with the SD card and the decoder working simultaneously at
first,but those can be fixed now that I know the hardware works for sure. The chip is supposedly able to drive
common 33 Ohm headphones directly, but doesn't do so very well from my experience. Whrn I layout a board I'll
include a simple headphone amplifier.
Also, the SD card and vs1001 operate at 3.3V. Level shifting of the PIC outputs would be required if it was
running at the standard 5V. I decided to use the LF type of chips that have a wide operating voltage. These
PICs can run off a supply voltage of 3.3V, so this made interfacing between devices much easier.
It successfully plays MP3s that are stored in the root directory of the first partition. Once I add the LCD and
buttons, it will be able to select and skip tracks. Right now it just plays them sequentially as they are stored
in the root directory table. I also plan to add long file name and directory support. Possibly a play list type
of file also.