Starting with Arduino (Musical Floppy Drives!)

First, a confession.

I have forgotten almost everything that I used to know about electronics, and I didn’t know that much to begin with either. I’ve spent the last week or so getting a tentative reintroduction to the fundamentals. Frankly, a current running across a wire is still a novel and exciting thing for me. I used to build my own computers when I was a teenager, but I’ve lost interest in recent years in favour of computers that just work.

With that disclaimer out of the way, the idea of mucking around with Arduino has been stewing in the back of my head for a while. Arduino is an open source, hobbyist computer hardware hacking platform, and can be used for anything from automated plant feeding to powering remote control aircraft. A couple of weeks ago, I was passing by a local electronics store (Maplin), and, on a whim, decided to see if they had any Arduino kits in stock.

I had no real idea what I wanted to do, but I was pretty sure I could figure that out along the way.

Arduino Uno

The first thing I discovered is that there are several types of Arduino for various reasons, with the variable factors seeming to be the physical size of the board (weight/size is important in embedded systems), power of the microcontroller (probably not an issue when you’re starting out), and number of available connector pins (complexity of device you’re building).

Make: Arduino Bots and Gadgets

Make: Arduino Bots and Gadgets

Available in the store I visited were the Uno and the Mega. There are quite a few other types, including the awesome-looking LilyPad (can be sewn into clothing), but the Uno seems like a good general starting point. I did not know this, however, and decided on balance that the slightly more expensive Mega was a good way to make sure I didn’t have to come visit the shop again too soon. I also found a surprisingly good book on a nearby shelf: Make: Arduino Bots & Gadgets published by O’Reilly. I flipped through the first few pages to discover what was not inside the Arduino box (but was still required to get it working) and discovered that a USB-B (fat, square connector) cable is a necessary component, so picked up one of those (the book, too) and made my first Arduino purchases.

I also picked up two small packets of jumper wires, an adjustable power adapter (3.3V up to 12V with interchangeable heads) and a precision screwdriver set, not really knowing what the heck I was going to use these for, but they all seemed like reasonable purchases. There was a device called an “ethernet shield” on the rack next to the Mega, but the name “shield” did not help me make any immediate logical connections so I ignored it (bit of sensory overload at this point).

I should also mention that the book had a litany of tools listed, which I decided to ignore in favor of getting familiar with the software environment of the Arduino first. I was short on time that day, and didn’t get much done other than installing the development software and running the blinking LED “Hello World”.

I started reading my newly acquired O’Reilly book the following evening, and it quickly became apparent that I had nowhere near enough basic electronics resources to do anything immediately satisfying. Wire cutters, wire strippers, alligator clips, breadboards, soldering irons… I dithered. I let about a week slip by before I decided to press on with the book.

Further reading rekindled my interest, I decided another trip to the electronics store was in order. This time, I picked up an Uno, an Ethernet Shield, a combined wire cutter / stripper and decided I was in business. Satisfied, I spent a good chunk of that evening hunting down and taking apart every old, broken and/or unused electronic device in my apartment to salvage for parts. This yielded me a couple of motors, a 3.7V rechargeable battery, some microphones, speakers, the core of a CD player, and, most promisingly, a pretty simple LCD screen salvaged from a Nokia 3310 (drivers and sample code are available).

Unfortunately, none of these were really morphing into project ideas in my head. Then, while chatting to colleagues the following day, the idea of recreating the “Derezzed on floppy drives” video I’d seen a couple of weeks previously came up, and I had my goal. I was ready for a grueling few weeks of trial and error bit manipulation, but it turns out that floppy drive music is a something of a micro community. One chap, Sammy1Am, seems to have kicked off the recent interest by releasing some software (Moppy) to let people stream MIDI sequences to their Arduinos, and manipulate the floppy drives. This was the software used to create the Derezzed video I’d seen. Not only that, but he had also put together a helpful tutorial video. What a hero!

First problem I encountered: no floppy drives. At least, none near me. Hell, my laptop doesn’t even have a DVD drive. Another week passed, and I visited my family for Easter. I figured I had a few useful bits and pieces in storage, so I rummaged around the attic and pulled out two floppy drives, an old PC power supply and a few other bits and pieces. I also borrowed a digital multimeter from my dad, but I haven’t used it much yet – have been using that 3.7V battery to test whether current is going through something so far.

Power supply turned out to be a dud, but it took me a good while to figure that out; damn thing would work for a little while, then go through periods of shorting out entirely. Eventually I decided that I could power the floppy drives via the Arduino itself, as it has a handy little power passthrough socket. Also, I have no idea how Sam does it, but hooking up wires salvaged from Cat5 to a floppy drive male pin is hard. Well, more precisely, it is really, really fiddly.

I gave up and decided that yet another trip to the store was in order; this time I purchased a couple of small breadboards, a box of variously sized jump wires, some little jumpers (like you get on the main board of your PC – if you’ve ever built one) and some plastic containers to store the small pile of parts I had been accruing. Now I had all the pieces assembled. I cabled everything up as well as I could, then tried to get Moppy working.

Moppy on OSX Lion does not work. Or, at least, does not work without some fiddling – it’s most of the way there. It’s been a long time since I’ve touched Java above the JVM, and I had to install “Netbeans IDE” to get the project built. I’ve forked the project and updated it with the changes that got it working for me, but I’m not comfortable pushing them back since it changes the assumed development OS from Windows to OSX, and that’s not something that should be pushed back upstream.

Eventually, this evening, I got the whole ensemble working together, and recorded my first test (one of the sample MIDIs included):

Now I just need to get a lot more floppy drives, and either Learn How to Music, or find a musician who can create MIDIs and wants to floppydrive-ify some music :) I’ve a bunch of ideas I want to muck around with on the software side too.

Bootstrapping from zero-electronics was a little expensive, but a lot of fun, and it’s been great to get into the hardware in a way I haven’t done for some time.

The (current) finished product

This entry was posted in Arduino. Bookmark the permalink. Both comments and trackbacks are currently closed.

One Trackback

  1. By Floppy Seconds | Broadsheet.ie on April 10, 2012 at 12:58 pm

    [...] Starting with Arduino (Musical Floppy Drives!) [...]