Floppy drive music (almost finished but...)

Hello, this is my first Arduino project. I connected the Arduino Uno and a driver IC (L293B) to the motor of a floppy disk drive.

The problem is that the sound is not loud enough, so you almost can't hear it. I think it's not a good idea to connect directly to the stepper motor anyway, so I bought a new floppy drive and I want to connect to it via IDE. This way there is no need for a driver and it should also be louder, I guess.

I found this pinout: http://www.interfacebus.com/PC_Floppy_Drive_PinOut.html but can't really get a grip on that.

Here are my questions: * How do I know when to change the direction of the motor * Where is the LED pinout? * Where is the sensor so I know whether a floppy disk is inserted or not?

so I bought a new floppy drive and I want to connect to it via IDE.

Once more in English, please.

That is hardware. The only hardware that the Arduino IDE knows how to communicate with is the USB chip on the Arduino. Does your hardware look like a USB chip?

I connected the Arduino Uno and a driver IC (L293B) to the motor of a floppy disk drive.The problem is that the sound is not loud enough, so you almost can't hear it.

The sound of what? The motor spinning, and moving stuff around?

Once more in English, please.

I'm from Germany, so never mind my grammar :)

The sound which it produces is music using Arduino code I wrote. And I'm not intending to read/write any data from the floppy disk. I only want to hack the motor to make music. That's all ;)

And there is a pin on the IDE pinout which directly connects to the motor. But I don't see where the pinout for the LED and the "IsFloppyDiskInserted push button" is.

I'm sorry if you misunderstood my question.

You will see that IDE has two meanings:- http://en.wikipedia.org/wiki/IDE 1) Integrated development environment, a software application that provides comprehensive facilities to computer programmers for software development

2) Integrated Drive Electronics, a computer hardware bus used primarily for hard disk drives and optical drives (CD, Hard Drive, DVD, etc.)

And there is a pin on the IDE pinout which directly connects to the motor.

No, it connects to the stepping motor driver not the motor.

Pin 34 tells you if there is a disc in.

But I don't see where the pinout for the LED

There is not one. The LED is controlled by the operation of the drive itself.

No, it connects to the stepping motor driver not the motor.

Eh, yes. I meant that. This is the main reason why I'm going to use IDE instead of connecting directly.

You will see that IDE has two meanings

Well, I thought in this context IDE clearly stood for "Integrated Drive Electronics" sorry :grin:

There is not one. The LED is controlled by the operation of the drive itself.

What do you mean by "operation of the drive itself"? Is the LED on as long as the motor is on or as long as data is written or something else?

Thanks.

Is the LED on as long as the motor is on

Yes.

Okay then. Thanks for your help. I will try it and see if it works :)

I think he's building something like this http://www.tkkrlab.nl/wiki/Arduino_midi_floppy_Jukebox

You can always try to contact drbytes from tkkrlab (enschede), he made this floppydrive machine and it sounds really great in our hackerspace :-)

My goodness. It's going straight to my class slides for the sound chapter. I had the Honda musical road there already but this can be done on a desktop. Thanks for sharing!

My goodness. It's going straight to my class slides for the sound chapter. I had the Honda musical road there already but this can be done on a desktop. Thanks for sharing!

I recognize every single one of those words. Arranged in that order, though, they mean nothing.

i made something very similair: a arduino hooks up to some of the floppy pins and pulses them accordingly with instructions from a .mid file java interpreter app.

http://dduino.blogspot.com/2011/10/moppy-playing-music-with-floppy-drives.html

PaulS:

My goodness. It's going straight to my class slides for the sound chapter. I had the Honda musical road there already but this can be done on a desktop. Thanks for sharing!

I recognize every single one of those words. Arranged in that order, though, they mean nothing.

http://www.youtube.com/watch?v=YR5Cejq2uyc

Honda's musical road (2009 Honda TV ad) shows another way to make music with something (rumble strips) not meant to make music.

@sirbow2: Cool thing you built there. But how do you manage the direction change? How do I know when exactly to change the direction? Is there something like an analog output to get the head position? What happens if you drive it to far into one direction?

There's indeed a hardware-limit of number of steps that can be made in one direction, those limits can be programmed in software though. Once the stepper reaches a limit, change direction and keep counting (by software) where the head is untill it reaches the other end and direction needs to be changed again. By keeping the software limits smaller as the hardware ones, you're safe. Direction = pin 18 on a floppydrive connector, step = pin 20.

Every now and then a thread on Stepper-music surfaces on CNCzone by the way.

http://www.cnczone.com/forums/mach_software_artsoft_software/51348-cnc_music.html shows some nice examples, one member of the "band" even uses a tesla-coil as speaker to play synth.

Floppydrives by themselves don't make a lot of noise, the drive is quite poor when it comes to resonance. One probably could calculate the right box to get the best sound, but... mounting 'm on a sheet of wood or just laying 'm on a table will already improve the sound a lot.

Those are all sounds made by the old 5 1/4 drives, you could easily hear them across an office room. In normal use they just didn't happen so coordinated or for such stretches. The old 20M Seagates were much quieter and far more melodic during heavy data runs, had to really listen to those.

DevilsChild, it takes the whole drive with a disk in it to get those sounds. Put a pickup right on the frame of the PC or each floppy drive to get separate tracks and you'll get solid sound! Whoever first did that to make music is some kind of genius.

@Simpson_Jr: A software direction change after a number of steps could be difficult. It's that 1.) you don't know where the head starts and 2.) you don't know how many steps it does playing one note (a different one would produce more steps?)

How does the actual software driver of a floppy drive get the startup position? And how do I step the motor just one out of X? My guess is that higher pitches produce more steps, but yet an unknown number of steps.

I'm currently using the tone() function on this. Is there a better approach for a floppy drive?

The heads would always retract to a start position (and I think there's a sensor to be snagged at least on the less cheap drives... lots of parts on those old drives!) and the controller kept very close track where the head should be. It required a scope to calibrate the things back around 1980 but I never saw that done since maybe 83.

Yes, but even if I have a nice startup position somewhere in the middle; It would still leave the question on how to count the steps I made. I mean, not every tone is exactly like 100 steps... Does a floppy drive even protect itself agaings such things?

Basically every change (High/LOW) on the step-pin will advance the motor 1 step further. The input on the direction pin (also High/low) determines whether the head will travel forwards or backwards.

Different tones can be created by changing the amount of time paused between steps. Since duration of a note also is important different tones of the same duration indeed require more/less steps.

Beauty of the tone() function is not having to calculate the pauses between steps, but it indeed tells you little about the distance the head travels. It may be possible to use the tone() function though and simply calculate the distance travelled. A 440 Hz note, played for half a second should move the head 440/2 = 220 steps.

I don't know how accurate this will be, perhaps tone() will change the output pin 221 times during a half second note and 440 times during a 1 second note at the same frequency. If so I'd expect this to happen in both directions and have little effect on the position of the head.

I don't know whether it would work if you connect both direction and step of the floppydrive to same Arduino-pin. The head should remain as good as stationary and if all is right it should step/create music as well.

Stepping out of the starting position should be done by first choosing the right direction on the floppy drive and changing the step-pin (digitalwrite(steppin, HIGH/LOW)) X number of times. This would of course not work in my "stationary" proposal where both are connected to the same arduino pin, every step would automatically change the direction as well.

Disadvantage of the tone()-function to me seems that it only works on one arduino pin. You'll be limited to one tone at the same time. By calculating the pauses needed between steps instead and adapting the "blink without delay"-example it should be possible to have several floppy drives "sing" A capella :).

P.S. As GoForSmoke wrote I expect most floppydrives to place the heads at position 0 when they're powered, I also expect most floppydrives to be aware of the limits, but to be absolutely sure is something else. Sofar I've only experimented with drives that were all ready taken apart and I was able to rotate the motors the same direction as long as I wanted.

Continuously trying to get past its hardware limits may not be a good idea, but having a stepper miss a step won't ruin it automatically.

I think he's building something like this http://www.tkkrlab.nl/wiki/Arduino_midi_floppy_Jukebox

There was really no need to explain any of this now or in the original post since it is so obvious. After all this is something that we all do with our floppy drives every day.

Don