Tuesday, August 23, 2011

Cassettepunk MP3 Player

Hi all,

Time for another hack. I've been doing these for a few years and though they're pretty diverse there are some common threads: one, they often involve music; two, they involve a particular niche of time after something has ceased to be useful but before it's gotten interesting as an antique. Call it "Cassettepunk".

I'm interested in obsolescence, and I'm in luck, because there's a lot of it around. Just looking at audio media -- of course everyone knows turntables, cassettes, CDs, etc, but few have ever heard of a wire recorder (just got one of these!), wax cylinder (got to toy with one a few weeks ago!) -- and many others. I have a soft spot for the hard-to-love 8-track cartridges that still clutter thrift stores, and have long planned a project with them.

But physical media are clearly past their prime. I converted fully to MP3 in the late 1990s, sold all my CDs, and built a portable (cough cough) MP3 player -- that's right, a whole millennium before iPods arrived.

Mark One

That's a laptop hard drive you see underneath the flip-up door on the left; there's an audio jack dangling out of the back, and the white jack just visible on the right-hand side of the photograph is for networking.

The keypad attaches to the parallel printer port (!) of the computer inside, and I had to write some software to scan the keys to read what was happening. Inside was an Aaeon single-board computer (which I eventually poached to use in this project).

The keypad was actually a late addition to the project -- it was originally controlled by Morse code key, believe it or not. The key had four status LEDs, and by keying in simple commands, you could skip between albums, search for songs (by keying in parts of song names in Morse code, of course), etc.

I made this for my car -- an execrable 1989 Mercury Topaz -- and it served well until the car finally died. The pinnacle of this machine's existence was a trip I made across the border into Blaine, Washington, not long after September 11th, 2001. The border guards couldn't make any sense of it and ended up tearing it apart -- along with a custom-built speaker cabinet and a non-trivial amount of the interior of the car. Border guards are obliged to keep the country safe; they are not obliged to re-assemble something they've checked for explosives. Since then I've learned to leave these kinds of things at home.

It didn't have a display, so I used the Festival speech synthesizer to speak the name of the current song or album when the appropriate button was hit. The whole thing ran a custom-rolled Linux and all the music management was written in C. Surprisingly functional and full of party tricks.

Mark Two

Some years later I joined a band and suddenly discovered that I was a touring musician. In the months leading up to the first tour I frequently encountered stories of tour vehicles getting robbed, and while the idea of going two weeks without my music was worrying, the very real prospect of getting my laptop stolen was worse. Buying an iPod was out of the question for reasons of immense personal stubbornness, so the only option was to build another MP3 player.

When I built my first MP3 player, it was basically necessary to buy specialized hardware if it was going to be a small device with enough guts to decode MP3 files. Since then, technology has marched sufficiently far that anything with a plug on one end has enough brains to play music. Re-flashed routers are a hacker favourite for all sorts of projects -- these devices are generally something inexpensive like a home wireless access point, but can be re-programmed to do whatever the hacker desires. There are a variety of Linux distributions made for these: OpenWRT, DD-WRT, NSLU2, and others.

Some of these devices have USB ports, hard drive controllers for storage, and a wide assortment of ports and lights and buttons. As soon as you can store a lot of files and plug in a USB sound card, you have everything you need for an MP3 player.

I found an amazing device that has since gone off the market -- probably because it's so terrifying. It's the ASUS WL-HDD, a very compact little device that encloses a laptop hard drive and adds network and wireless support to it. Basically, it's a tiny computer with a lot of room for storage and a wireless antenna.

It's always struck me as the perfect vehicle for a very dangerous data logger; imagine placing one of these somewhere in an airport, logging a few hundred GB of web traffic (since airport access points are unencrypted), then picking it up and sorting through the data for passwords at leisure. Many of the recent successful high-profile hacks involved people who should have known better using the same password on multiple sites. This would be a very effective way to collect them. But I digress.

More to the point, it also has one built-in USB port and a second that can be easily added by modifying the hardware. I picked up a USB Bluetooth dongle and a USB sound card, hooked it all together, installed OpenWRT, and scripted up the various interconnections.

My goal was to control this via a defunct cellular phone -- as you can see, the little joystick in the middle has completely snapped off, leaving major features of the phone unreachable:

This means that 99% of the phone works, but the broken 1% means that it's useless unless someone very stubborn can put it to use. I figured it would be an excellent Bluetooth remote control.

I wrote a Java Mobile Edition program to run on the phone and basically act as a simple serial terminal, leaving all of the work to the Linux side of things, since I'm much more familiar there.

Remember that part of my motivation was to avoid getting everything stolen. By building it into the 1980s AM/FM radio chassis pictured above, and using a truly thrashed old cell phone to control it, the whole thing is effectively made thief-proof -- who would possibly steal it?

On to the construction. Here's what it looks like inside:

Here you can see the WL-HDD enclosure, and behind it, a little two-watt built-in speaker. On the other side of the chassis...

Here you can see the two USB dongles, one for bluetooth, the other for audio. The audio dongle is wired both to the built-in speaker, but also to the audio jack on the side of the chassis, so that an external amplifier can be used -- or a properly retro cassette adapter, in the case of our Plymouth ghetto tour vehicle.

The back of the chassis has two additional compartments:

One has nothing to offer beyond a view of the built-in speaker, delivering a crushing two watts of thunder:

...but the other hides a handy network cable, if you feel like synchronizing your music collections that way.

Here's the whole thing in action:

If anyone's interested, I can probably dig up some how-to-ish information on the software side of things.

[Note: I've posted part 1 of hopefully 2 in a howto here. -AS]


  1. Holy Shit! Those are some awesome hacks!!

  2. Wow, very nice! Great how you've re-used old pieces of gear. Also, I would be interested in a short write-up on how you've done the software!

  3. Thanks, guys! Bas, I'll write up the software side fairly soon (assuming foolishly that I can find and decypher my notes).


Note: Only a member of this blog may post a comment.