The Super-Simple pocket size mp3 player!

Picture

It is based on the PIC 16LF877, with plenty of processor time to spare. There is a bare bones assembly version, and a new C version with more features and stability. It uses compact flash cards up to over 100 gigabytes (once they exist) including microdrives. (right now they are about 8 gig)  It uses the vs1001k decoder chip. Super simple, low pin count, built in DAC.

And most importantly, it does indeed play music! Have fun!  Please Email me if you have any specific questions, or just to let me know you are doing this project!

And it’s completely open source!

BEGINNERS BEWARE! This is an upper-intermediate project. You will need things like a PIC programming device and some working knowlege of C and/or assembly language programming, as well as a decent but not huge amount of electronics experience. An oscilloscope doesn’t hurt either. Be warned! It’s an involved project to say the least!

If you are a beginner, give these books and websites a try:

www.parallaxinc.com    www.tech-tools.com   www.microchip.com     www.microchipc.com   www.dontronics.com    www.jameco.com     ccsinfo.com (the midrange compiler is the one I used for this project)

all the Forrest Mims III books, available at radio shack

Practical Electronics for Inventors, by Paul Scherz

and Nuts and Volts Magazine (tower books has it most of the time)

Use at your own risk! 

This edition, dec 20, 2001 to Feb. 20, 2003.

By Raphael Abrams, not for commercial use under any circumstances!

-------------------------------------------------------------

A Friendly Note on PIC Burning

Please remember to clear the BROWNOUT fuse when burning the pic. Otherwise, nothing will work. This is the most common mistake, by far!

-------------------------------------------------------------

HOW IT WORKS:

The first thing to do is to format the CF card FAT32 and load the root directory with songs. Use a standard reader/writer like the Zio. It plugs into a USB port. Drag and drop the files onto the card in windows. The order that you put them onto the card is the order that they play. All files must be on the root directory, I haven’t added directory support.

First, the pic resets the CF card and the decoder chip. Then it sends the required spi commands to the decoder to set it up (volume, soft reset, data bit order and clock edge polarity). The pic sends a “read sector” command to the compact flash card to get some information from the boot block. It then figures where the FAT and the root directory are, and reads each file in the root directory one by one.

Once it has located a file, it clocks the card 512 times per sector sending all the information one byte at a time to the decoder chip. The decoder chip simply needs a valid data stream to be clocked in, and sound comes out of the built in DAC/headphone amp. The decoder has a data request line, so it asks for bytes when it needs them. All communication is sychronous, using the PIC’s built in USART  for data and SPI for commands/setup.

This is I think the simplest standalone mp3 player yet. If you know the PIC reasonably well, and can read a datasheet, you’re set. It’s also tiny, and not too expensive; at around $100 in parts for a 128MB setup. There’s no display or any fancy stuff, but all the other designs have that. There’s plenty of free pins on the PIC, so you could easily integrate a serial lcd or something like that. There’s enough processor time, ram and code space left to go nuts with extra features. And the interrupt is still free.

 

Link to expresspcb,  a cheap and easy printed circuit board maker (download their free software). If you use this, you will need to use their (excellent) service. The software will not print out for a do-it-yourself etching project. Sorry. If you end up with extra boards, let me know and maybe I can hook you up with someone who needs them. I do not make boards for sale.

link to microchip, makers of the PIC line of microcontrollers. DOWNLOAD THE DATASHEET!!! and MPLAB!

link to VLSI SOLUTIONS, makers of the vs1001 decoder  DOWNLOAD THE DATASHEET!!! 

YAMPP, another player based on the vs1001, and A PLACE TO BUY THE VS1001 (the only on that sells in small quantity. I have made a few purchases and they have a decent turnaround time.

link to a very helpful web page by Mark Samuels on interfacing a compact flash card to a pic. download the circuit cellar article!!!

Thanks to:

Mark Samuels for his help with the compact flash interface, which pretty much made this possible!

Amador Bouza of Portugal for his generous donation of eagle format schematics and pcb layouts, now in the downloads section! (note: i have not used them or tested them. you’re on your own with these!)

And to all the other people whose research and development was distilled by me into this dinky beginners project!

And especially thanks to kristi for putting up with me while i decayed to a zombielike state hacking this thing together!

Pcb and Source Code.

CF SPEC

PDF DOCS (thanks to Circuit Cellar Magazine for permission to post the CF article by Mark Samuels)

 

Picture

most parts can be equivalents, but make sure they have the right solder footprint and pinout!!!

getting extras is a good idea. these parts are very small.

digikey part number

descripion

quantity

SW426-ND

SWITCH TACT LONG STROKE 70GF

5

300-8526-1-ND

CRYSTAL 4.000 MHZ

1

P11303CT  

CAP 15UF 6.3V TANTALUM TE SMD

3

P1.0KECT-ND

RES 1.0K OHM 1/8W 5% 1206 SMD

1

P10KECT-ND

RES 10K OHM 1/8W 5% 1206 SMD

5

P1.0MECT-ND

RES 1.0M OHM 1/8W 5% 1206 SMD

1

     

300-8568-1-ND

CRYSTAL 24.576 MHZ SMT 18PF

1

PCE3093CT 

CAP 100UF 6.3V ELECT FC SMD

2

BC1300CT

any 0805 size .10uF smt. ceramic cap,  >10Volts

5

PIC16LF877A-04/L-ND

or PIC16LF877-04/L-ND

IC MICRO CTRL LP FLASH 8K 44PLCC

1

CP-3523SJCT-ND

CONN AUDIO JACK 3.5MM STEREO SMT

1

MCP1700T3302ETTCT-ND  

IC VOLT REG LO DRPOUT 3.3V SOT23

1

LP2980AIM5-3.3CT  

IC 50MA LDO REGULATOR SOT23-5

1

PCD1020 

INDUCTOR FIXED SMD 10UH 10%

1

311-1154-1-ND

any 1206 size 22pF smt. caps

4

description

 

quantity

any 1n914 type thru-hole diode (small package)

1

any 1206 size smt. led (high efficiency is best) wit a voltage drop of less that 3.3 volts. Many blue or white leds will not work. all red ones will work fine.

1

vs1001 or vs1011  http://www.myplace.nu/mp3/shop.htm. For this project, the two chips are completely interchangable. I have tested it fully.

1

compact flash card header(molex part number 55358-5028) try to get a free sample from molex. the last 4 digits may be different.

1

cf card (generic cards work so far) and reader/writer

1

and of course, the pcb www.expresspcb.com

1

   
   
   
   
Picture