February 4, 2011
The Mp3 Garbler

This is my mp3 player, the “mp3 Garbler”. I called it that because that’s mostly what it
did during the construction phase. :)

a picture of my mp3 player

Pretty close to electronic craftsmanship perfection, just needs a little duct tape

Most of my design came straight from Lady Ada’s minty mp3.
So in this page I’ll concentrate on the differences.
Including my construction techniques/experiences.

So, what are the differences?

They are as follows:

  • vs1001k instead of the sta chip, which also means no dac since the vs1001k has one integrated into the chip
  • An led display, 140 of them to be exact. Though, this wasn’t as difficult as it sounds. I used 4 5×7 led matricies with a max6953 chip which is a neat chip that controls lots of leds using not many pins with a neat visual illusion type trick very similar to a mechanical scanner.
  • only two buttons. Not much of a difference really but I’ve got a reason for making the interface so simple. My basic idea is to have an extremely simple interface along with the ability to plug the device into other things for a more complicated interface. Enabling things like playlist creation, song deletion or live control. What other devices? Probably the most obvious is a computer. I’ve got a mini-usb connector on the latest revision and an ftdi usb to ttl chip to do the conversion. Mp3’s can also be transfered this way. Maybe more interesting is a nintendo gameboy advance. The gameboy has an interesting feature that allows you to boot the device via it’s propriatary serial port. So, my idea is to develop an intelligent cable to connect the gba and my mp3 player. Subsequently, booting the gba with my own program that can then communicate with my mp3 player. Although it’d be easier to use a simple pda like palm’s z20. (No proprietary protocols involved!)

For the hardware side of things I’m including eagle schematics and board.

At this point, if anyone with some experience is reading this, I’d be eternally grateful if you’d look over my design and see if I’ve got any major flaws. Please note, though, that these are for the second revision of my mp3 player, though the only major differences are power supply and usb instead of serial.

Mp3 Garbler 2

So, firmware. Here is my code which is a modification of Lady Ada’s code and is therefore also under the MIT license (very similar to the BSD version). The main differences in the code is lcd control, i2c control of the max6953 and maybe most importantly, the code to control the vs1001k mp3 chip.

firmware for the Mp3 Garbler

The code to control the lcd is trivial and not really worth mentioning because I’m communicating with Spark Fun’s extremely cool lcd backpack module. Except for the fact that it may be a good example of multiple serial streams for anyone new to the concept.

The code for the vs1001k is straight forward too, I won’t detail it here but I wouldn’t mind answering a couple questions should anyone have them, just leave a comment.

My first break-out board... shiny, no?! :D

Now, the code for the led display. I found this part pretty interesting, because I’m using this chip for a slightly different purpose than it was designed for. First a quick blurb on how the chip works. To control 140 leds can be a daunting challenge. This chip makes it easy by putting the leds in a matrix of rows and columns. So basicly the chip can only control leds individually on one row at a time. The trick is to light the leds in each row in rapid succesion, in effect, tricking you into seeing one pervasive pattern. Usually a letter of the alphabet. The chip has all 26 letters plus some other characters (Just check out the datasheet). But it also has the ability to store up to 26 patterns. In my code I’ve got the leds first showing two four letter words. They happen to be the phrase “fuck yeah”. Sorry for the vulgarity, i chose that expression because of my elation at building a working breakout board for the chip. :) It was my first board. Secondly, it shows the picture of a skull. The reason it works is because I’ve set my four 5×7 matrix’s into a square formation with no gaps.

Here is the hex for the image in the above picture. If you look at the ones and zero’s closely you can see the image of the skull and crossbones. Each block is one 5×7 led matrix. If you take the columns from right to left, bottom to top then convert it from a binary number to a hex number, that is what is fed serially to the chip. With that and the code contained in led.c you can probably figure out what I’m doing here.

00011 11000
00111 11100
01001 10010
01001 10010
00111 11100
00000 00000
00101 10100

00000 00000
11000 00011
11000 00011
00110 01100
00001 10000
00110 01100
11000 00011

0000000 0
0001100 C
1010010 52
0010011 13
1011111 5F

1011111 5F
0010011 13
1010010 52
0001100 C
0000000 0

1000110 46
1000110 46
0101000 28
0101000 28
0010000 10

0010000 10
0101000 28
0101000 28
1000110 46
1000110 46

Finally just a quick note on some of the techniques used to construct my proto-type. First of all, read the excellent tutorial by Spark Fun Electronics on how to do surface mount soldering. It’s incredible, but it really works! I followed their tutorial to the letter execpt for one small detail, the application of solder to the bare PCB. I didn’t really like the idea of a stencil, although, for large numbers of boards it’d be crazy to do it any other way (that I know of). In my case, I was only doing one small board, so I messed around with a few different idea’s and ended up using a small wooden tooth-pick. Basically I squirted out a small amount of R276 No-Clean solder on a piece of paper (or whatever). Then I took small dabs of the solder at the end of the tooth-pick and carefully applied it to the pads on the board. Pretty straight forward. A little bit trickier, though, was the chip. The max6953 is a 36 pin ssop package, so the leads are very close together(therefore, so are the pads). So I just made a small line of solder along the pads. I’ll have to do more experimentation to figure out how much, but, if you do too much you’ll have bridges and too little means disconnects.

For the proto-type in the picture at the top, the entire device is made with break-out boards from Spark Fun, with the exception of the mp3 chip, which came from YAMP, and my custom led display board. Although, Spark Fun now has a great break-out board and the chip itself for the vs1002. I can’t recommend this way of proto-typing enough. It was quick, not much soldering involved and was very forgiving of all the mistakes I made.

P.S. here’s a note from Nathan Seidel, the leader of the Spark fun crew, regarding this project. I’m really proud of this letter so I hope it’s ok that I posted it here, Nathan :)

Well hell [falldeaf], thanks for the excellent feedback!

I started SFE just over three years ago and it’s been great to see it grow. But I rarely get to hear from customers that have been as successful as you have! Lots of people try the MP3, most get some functionality, but it looks like you got the entire thing including some fancy extras (thanks for the LED driver part # – I’ll have to try one out!). Congrats on the project! You did really well!

Had enough pictures? take this!

wide shot

Behold the enormous, impractical, prototype mp3 garbler!

panel open

And with the front panel removed, it's naked in this shot, sort of NSFW if you're a robot.

closeup of flash card slot

Close-up of the flash card slot

Closeup of the mp3 chip on it's break-out board

Closeup of the mp3 chip on it's break-out board

π

Hey thanks for reading this far! Maybe you'll be interested in more of my projects? Check out my homepage :)