How to play music with Floppy Disk Drives

I recently stumbled upon  a few videos of floppy drive music on Youtube and just knew that I had to try to do something like that. Fortunately, SammyIAm had a wonderful tutorial and even open-sourced his code entirely! This post is a written guide of how to turn those old paperweights into a musical instrument. You will need:

  • A Power Supply Unit
  • An Arduino
  • A Floppy Disk Drive
  • Cat 5 cables/electrical wires
  • A computer

Power Supply

In order to power the drives, I recommend that you salvage/borrow a power supply unit (PSU) from an old computer. You can use a single PSU to power many drives, if you wish. If you take it out from the computer, you need to short the green cable and any black cable from the main ATX connector in order to power it on. If you don’t have many drives, you can use the 5v connector on your Arduino.

ATX boot

Arduino & Floppy Disk Drives

So, you want to make those floppy drives sing? The first step is finding a few that work. One is fine, but most MIDI music files have multiple channels and you’ll probably want at least 3 or 4 drives, eventually. The component of the drive that is going to be used to produce musical notes is the stepper motor. This is the thing that moves the drive’s head back and forth. By changing the speed at which it rotates, we can produce different notes. The faster it spins, the higher the pitch.

In order to connect the drive to an Arduino, SammyIAm recommends using a stripped out Cat 5 (typical ethernet cable), and they were a good solution for us. You can also use simple breadboard wires if you have some lying around, but any kind of electrical wire should suffice.

Here’s the pinout for the drives:

Floppy drive pinout

A little explanation is in order. First, you need to find if the drive is in mode A or B. The most simple way is to turn the drive on and shorting pin 12 with any ground pin (the ones on the bottom row). If the light on the front of the drive lights up, then it’s in mode B (which it should, by default). However, if it does not light up, try shorting pin 14 with any ground pin. Make sure that the light is turned on, which means that the drive is in mode A. It does not matter what mode it is on, as long as you short the correct pair of pins and, consequently, make the light stay on.

Next you need to connect pins 18 and 20 to the Arduino. This step is exactly the same independently of which mode (A or B) the drive is on. Take 18 and 20 and connect them directly to outputs 2 and 3. These two outputs will be used for Channel 1 of the MIDI sequence. If you want to use more drives for the other channels, you should follow the same procedure but connecting to pin 4 & 5, 6 & 7, etc.

The last thing you should do is connect any ground pin on the drive (the ones on the bottom row) to the Arduino’s ground pin. Some floppy drives have every ground pin, but others only have a few. You just need to connect one of them.


All necessary software is available on Sammy’s gihub page . There are two parts: the Arduino project and the Java project.

Arduino project

Download the official Arduino SDK and the TimerOne library. The library should go into the libraries folder in your Arduino SDK installation folder. Open the Moppy.pde file with the SDK and upload it to the Arduino. You’re done!

Java project

Download the Netbeans IDE  and open the project. You should get Netbeans, even if you prefer Eclipse, because it comes bundled with a few necessary GUI libraries. You also need the RXTX library to communicate with the Arduino (Win/Linux, Mac). If you can’t seem to launch the Java project, it is probably because of the RXTX library version. Try to search around for different versions of this library to see if that solves the issue.

You should definitely check out SammyIAm’s video tutorial on this subject.

We decided to mess around with the code and ended up implementing a method to play music using a MIDI keyboard. This little project was a joint venture with Carlos Lima, Luís Nabais, and João Pires. The code can be found here and you can check out the results here:

I also hacked together a new version at Codebits VI where you can play a real guitar with the floppies! The audio is in portuguese, but there’s a live demo at around 0:50: