Make Your Own Musical Floppy Drive


Uploaded by Sammy1Am on 07.01.2012

Transcript:
Hey there YouTube, Sam here. A lot of you have been requesting a video on how to make the floppy drives.
this is that video
you're going to have to bear with me though this was my first time using
windows to make a video, so some of the edits may be a little iffy
should mostly make sense though. if you have any questions leave them down below. Good luck!
first thing we're going to do is setup the hardware
so here's a list of parts you are going to need you're going to need obviously
an arduino
you can purchase these online; you can get them at a lot of radio shacks these days
next thing obviously you're going to need a floppy drive
it needs to be a floppy drive with one of the 34 pin IDC connectors
If you don't know what that is,
probably your drive is okay. basically there are some of the old macintosh
drives from way back in the day
with these weird little proprietary
they don't work. So just
any-old normal floppy drive
you're also going to need a power supply
i'm using an ATX style supply for this example but from what i
understand you really only need five volts
which is just the red wire, so you don't need the yellow wire. so you
don't need a whole pc power supply but
but people tend to have those laying around so that's what I'll use
also you need wire. I used cat five ethernet cable
its color coded which is handy
and I had a lot of the laying around
doesn't matter
just some kind of wire. First thing we're going to do is hook up the wires to the floppy drive now
if you look at the back of the drive, you'll see something like this on the back of
the drive; whole bunch of pins
the bottom pins are odd pins. the top pins are even pins. It starts over on the
bottom left with one
the one above that is two &c., &c.
the odd numbered pins on the bottom are all ground pins. even-numbered pins on top
are the pins that are going to be
doing things activating features
uh... the pins that we're most
interested in are twelve eighteen and twenty
pin twelve and pin eleven below it are the drive select pins for drive B computers have
up to two floppy drives. floppy drive A and floppy drive B,
and there's some weird stuff going on so they can share the same cable
so what you want to make sure is that if you have a little jumper on your floppy drive
(a little tiny jumper)
that it's set to drive B
if you can't find a jumper on your drives it's possible some old drives hardwired as
only drive A or drive B
which you do in that case is look to pin fourteen in pin thirteen
and just substitute those instead of pins twelve in eleven for the drive
select pins. That'll select A.
everything else should be pretty much the same
you can see real light in brown there uh...
pins
sixteen and fifteen are the motor enable pins that'll basically spin up the motor on
the floppy drive we don't use that for the music but i thought i'd throw that in
there in case you're using cat five
might as well hook it up now, you never know when that motor might be fun later
pin [20] and the corresponding ground pin [19]
are the pins that are gonna make the read head step
everytime [20] is connected to [19] the head we'll step once either
forward or backward
depending on the direction pins. the depression pins are [18] and the
ground pin [17]
wired these up in orange, green and blue just 'cus it's handy. Again, colors
aren't that important, but i'll be using the same colors throughout the example
now that we've got the control pins hooked up to the floppy drive, we're going to test them
just to make sure everything's all hooked up. to do that we have took the
floppy drive up to a power supply
uh... again,
I used an ATX power supply, it's the easiest way, you could just use a 5v PS if
you want to
for ATX power supplies, if you have a mother board, plug it in the mother board
and press the power button, it works that way
if you have just a power supply by itself, without a motherboard, what you can do
is you can connect the green wire and the black wire, which you can see in
this little picture
and then when upi turn the power supply on that will power on the power suplly even
without a motherboard
alright now that we everything hook to the power supply we're going test out of the
floppy drive, just to make sure everything is working okay
bear with me here, I know it's a little hard to see these wires but these are the same colors
as we were using before
so I have the orange wires hooked up as the drive select
you can see if you look at the floppy drive here
that when i connect the orange wires
the light comes on
it's probably a little hard to see, again I apologize. the floppy dirve only responds
to input if the drive select is selected so we're going to just twist
those orange wires together
and that will keep the light on, and the drive responsive
next thing we're going to do
is connect the blue wires together the blue wire are the direction wires
when blue wires are connected, the head's going to move forward
when the blue wires are disconnected, the head will move backward.
Since I just turned it on, you can see that the head is already all the way back
so it can't move back anymore
so we're going to hold the blue wires together here
and then every time i tap the green wires together
that head is going to move just a little bit
once the head gets all the way to the front it'll stop moving
if I let go of the blue wires,
and tap the green wires together again
the drive's moving backward
again I understand it's a little hard to see the colors of the wires in this video
but you get the idea. if you follow the directions up to now it should be pretty
straightforward. just make sure the drive is clicking along when you put the green
wires together
all right now that we know the floppy drive's working
let's hook the floppy drive up to the arduino
the drive select pin as we saw only needs to be connected to the ground directly
below it so you can go ahead and twist those wires together if using cat five
or put a tiny jumper over the pins if you're
doing it without wires
the step control pin number [20] is going to connect to the Arduino
on pin 2
the direction control pin, number [18]
is going to connect to the Arduino on pin 3
now if you have more than just one floppy drive,
the other drives are going to follow that same pattern. instead of connecting to
two and three
the step pin will connect to four
and the direction will connect to five
then the step pin will connect to six the direction pin will connect to seven
and so on
the ground pins
for the step and the direction can be connected together but then also need to
be connected to the ground
on the Arduino
now this is important because the floppy drive circuitry only detects that a
step should be taken when pin [20] reaches the ground voltage
if the ground voltage on the Arduino is
different than the ground voltage of the floppy drive
the floppy drive may not detect that or possibly the floppy drive may decide to
step on its own sometimes; that's not good. So make sure that these are
connected up
and with that, we've got the Arduino and the floppy drive all wired together
that pretty much wraps up the hardware section and we'll move on to software now
so just like for the hardware we've got a list of software parts
you'll need a java runtime environment I'm using six probably you'd be okay with
five or seven
so so whatever you'd like but things don't go right you might want to check
six
I use the NetBeans IDE
it makes it really easy to open up the software just because i've built the project
using that. you don't strictly have to use it
uh... but it's a great IDE you should check it out anyway
You're going to need the Arduino software
you're going to need the TimerOne Arduino library
you're going to need
my Moppy software
from github
which has both java code and Arduino code you'll also need to download the
RXTXcomm serial driver
for Java
i have a version bundled with the software
on github
and i worked for me
but that doesn't it'll work for you because it tends to be kind of very
operating system specific i'm running windows seven sixty four-bit and it's fine
other people may need slightly different driver's or if you're running on a Mac
or Linux box they have rxtxcomm drivers for those operating systems
I've got links for all of these
in the doobly-doo
uh... or you can just Google search
first step of software setup is to pretty much install all the prerequisites
install Java, NetBeans, the Arduino software and get the
rxtxcomm drivers set up
next thing you're going to do is open up the Moppy Arduino project from the Moppy
folder in the source download. Plug in your Arduino and
you're going to upload the code
shouldn't be any modifications necessary but feel free to take a look, especially if
you're not using an Arduino Uno
the other Arduinos should be pretty much the same but
there might be some adjustments needed for
different pins or that sort of thing
Next open up netbeans
which you've installed earlier hopefully
and open up the MoppyDesk project
which is in the Java folder in the Moppy source download
then you're gonna press run. this is where you might run into rxtxcomm issues if
you're going to have them
unfortunately i can't give you a cure all solution here in this video because
there's so many different variations of
operating system configurations,
computers, java setups, all that...
use Google, use the internet
ask people in the comments, ask people on github
get it figured out
this'll probably be the trickiest part but once you pass this everything else
is pretty smooth sailing
after the program launches you'll get a little window that pops up with a drop-down
menu to select a COM port
select the COM port that your Arduino is hooked to
this'll be the same COM port you used in the Arduino software
to upload the Moppy code
press "Connect" that'll activate the bottom half of the window
press "load sequence" choose a MIDI file
press play
and if all goes well you have a musical floppy drive. Congratulations!
a few quick tips on the MIDI files you're going to be feeding it
now you can use any MIDI file you want
in this program and it will play it but it's not always gonna sound very good
unless it follows a few guidelines
each drive can only play one note at a time
and can play any note between C1 and B4 so you have four octaves, but
outside of that range doesn't play at all
the first MIDI channel
maps to the first pair of pins on the Arduino (that's Arduino pins two
and three)
the second MIDI channel maps to pins four and five, etc.
so you'll want to make sure your midi file has the music you wanna play
on the right MIDI channels. generally speaking putting a little space between
the notes makes them come out a little bit clearer on the floppy drives things tend
to get a little muddled if the notes are very long and connected