Floppy Drive Music

3.1
2015
CC0
Floppy Drive Music 3.1.zip

Let's divert old hardware from its originally intended purpose to make it play music!

Anything can create sound waves and music, such as stepper motors, floppy drives, hard drives, etc. To do this, some basic musical knowledge is required, i.e. knowing the musical alphabet and having a somewhat musical ear.

The Build

Each drive is connected to 3 pins on the Arduino. The button on the top can be used to skip a song. This setup is self-contained and works without a computer.

Implementation

Notes and frequencies

The frequency of each note can be calculated. There are 12 halftones in the musical alphabet:

C - C# - D - D# - E - F - F# - G - G# - A - A# - B

This is one octave. The frequency doubles for each octave. For two octaves, the frequency is multiplied by four, for three octaves by 8, and so on... The note scale is logarithmic and the difference between two halftones is the 12th root of 2, which is about 1.05946. If you multiply any note with this number, you'll get the next halftone. This way, frequencies are calculated.

This way, anything that can vibrate in a specified pitch and timing can be used to make music.

Connecting a floppy drive to the Arduino

This may be the trickier part. At least two pins of the IDE cable need to be connected to the Arduino.

This article is a reference for the floppy IDE pinout. There are 34 pins, where 17 of them are GND. They don't need to be connected, as long as GND is shared with the Arduino and PSU. The even ones (2, 4, 6, ...) are data pins of which the following are connected to the Arduino:

When using my source code, you need to connect a button for the "skip song" function. Schematics are here.

Multi voice

This one is rather tricky. An Arduino doesn't have multithreading as we know it. So, I solved it using a loop that checks what to do every CPU cycle - step the motor, advance to the next note or do nothing. The current version supports up to 6 channels.

FAQ

So, I received a lot of questions, especially on YouTube. Here are the most frequently asked ones:

Q: Why not more than two channels?

Very good critique... Actually, I planned to do that. The data pins, however, consumed a lot more voltage than I initially expected. So, I had to use driver IC's just to power the pins. In the end, I developed version 3, having 6 channels with only one floppy drive each. The 40 floppy drive concept just didn't work out in the end.

Q: Where did you get 40 floppy drives?

I purchased used ones on eBay in bulk. When I asked, some of the sellers offered cheaper quotes, because they can finally clear their stock off of hardware that nobody wants.

Q: Fifth floppy drive in first row is broken!

No, only the light. Maybe the connector just fell off...

Q: How about making a 57.6 MB RAID 0?

Not related to the question, but take a guess on how large a song is... - It's about 0.5 KB ;)

Q: mrsolidsnake745 makes better videos.

I wish I had the equipment he has, especially the microphone. He also uses more channels and put in more effort into soundtrack editing. Check out his channel, it's really nice! At some point, I didn't really take the time to further improve my setup. My primary goal was to make it a self-contained box with no computer required to run it.

Q: You voided the warranty on your drives!

I still wonder, if they work. Maybe someone could make a test on this...