# Floppy drawbot

Make a fun spiral drawing robot out of an old floppy drive and arduino!

Stuart and I wanted to design a project that would be a good introduction to upcycling electronics, robotics, arduino, art with maths/code. We came up with a drawing robot based on an old floppy drive.

Bigups!
Remove these ads by Signing Up

## Step 1: Take apart the floppy

We need to get at the insides, so take off the lid and have a look inside. We need to remove the loading tray which can often be lifted out when it's in the eject position. Others have a latch or springs that need to be released. Have a look and work out what works for your drive!

Remove the top of the read/write head and put the screws back in so you don't lose them!

Also, now is a good time to make the drive think that a floppy is loaded (otherwise it won't spin up the platter). So use some bluetack or glue down one of the microswitches on the left hand side. You could also bypass one by removing one and soldering a wire between the contacts.

Keep hold of all the small screws and springs because they'll be useful in other projects!

## Step 2: Wire up the floppy

Control
Check the "floppy drive A pin out" table on this page . We're interested in:
• 10: 0=motor enable drive 0 (when at 0v the motor will be spinning)
• 14: 0=drive select 0 (so that step and direction commands go to drive0)
• 18: direction (which direction to move the stepper)
• 20: step (pulse this to make a step)

Note that all the odd pins are ground.

Wire up the floppy cable like this:

floppy pin 14 -> floppy pin 13 (this selects drive 0 as we tie it low by connecting to ground on pin 13)
floppy pin 1 -> arduino ground (we need to connect the ground of the arduino and the ground of the floppy)
floppy pin 10 -> arduino pin 4 (platter motor)
floppy pin 18 -> arduino pin 3 (direction)
floppy pin 20 -> arduino pin 6 (step)

Power

We also need to power the drive. I measured current draw and it peaked at 300mA. I did some research and it seems safe to power this from the 5v pin of the Arduino. USB has a maximum rating of 500mA for current draw and we're safely within that limit.

If you have a floppy power cable then connect the Arduino ground to a black and Arduino 5v pin to the red cable. Otherwise you'll need to work out which is pin 1 (it might be marked on the drive) and then use the table floppy power connector to know which pins to connect where; pin1: 5v, pin2 or 3: ground.

Turn on the power and check you get a light coming on somewhere at the front of the drive.

## Step 3: Load up the software

The fun part of the project is coming up with different software to make different shapes, but here is something to get you started:

https://github.com/mattvenn/arduinosketchbook/tree/master/floppyDrawBot

Download the floppyDrawbot.pde and timer.pde files. Open floppyDrawbot.pde with the arduino editor and then add the timer.pde file like this:
• choose the timer.pde file
Then compile and transfer to the arduino. The drive should spin up and the arm start moving if it's all working!

Have a look at the code to see what's going on - it's pretty straight forward.

If it doesn't work
• Is the floppy powered up? They usually have an led that will be lit with power supplied.
• If the platter isn't spinning, check the microswitches are properly pressed down.

## Step 4: Enlarge the platter

Now that we've got the floppy drive under Arduino control, it's time to add drawing functionality!

The platter is a bit too small and uneven to draw on, so we boosted its size with a DVD. You need to find something tubular, about 3cm diameter and 2cm high.

Put it in place and then check that the read/write arm can move fully in and out. If your tube is too big then you'll have to remove part of the lower read/write head. We did this with the dremel's grinding attachment.

You want everything as central and level as possible so it's better to hold stuff in place and then glue it after.

## Step 5: Add the drawing arm and pen holder

Drawing arm and pen holder

We used the metal from the top of the floppy and a dremel with grinding attachment to cut out an arm. Look for a piece that has a hole for your pen to stick through. You might be able to avoid drilling a hole by being clever about your reuse!

Then we held it in place with a spindle and sprung loaded it with one of the floppy's old springs.

To give us more movement, we can extend the read/write head out with another small piece of metal. This screws on to the read/write head and has a bolt at the other end that connects with the drawing arm. By playing with the length of the metal and the position of the bolt you can make a lever that magnifies the movement of the read/write head so that the pen can cover more of the DVD's surface.

Turn everything on and check that the pen can move a good distance over the radius of the DVD. You adjust things fairly easily just by bending the metal bits.

## Step 6: Draw!

Cut some paper circles using another CD as a template. Then load up some paper (we used tiny scraps of masking tape to hold down the disks of paper), insert a pen into your pen holder and make it go!

Then start hacking the code and send us your best pictures!

## Step 7: Adding platter speed control

We wanted to be able to slow the platter down because it moves so fast compared to the pen that only tight spirals are possible. It would be cool to be able to do spirograph style patterns too.

We checked all the signals crossing from the small "main board" to the bigger motor board. One of the signals was around a 1Mhz signal (check the photo). We cut the path and then used a signal generator to inject our own signal and it worked! So some code was added to generate a slower signal. The slowest we got the platter moving was about 120rpm before it started juddering and losing torque.

After cutting the trace on the PCB (careful not to cut any others), solder a wire onto the spot nearby and then plug this into pin 5 of the arduino.

## Step 8: Add stepper speed control

Wire up a potentiometer with ground and +5 on each side. Then take the central signal to analog input 0 of the arduino.

## Step 9: More ideas to explore

• Use a small solenoid to be able to lift the pen up,
• use a diode laser from a laser printer to burn patterns on the paper (perhaps using thermal paper?) We can operate a diode at very high speeds so we could potentially do rings of dots and dashes.
• make a pen holder that can hold more than one pen,
• make the code respond to something that happens in your environment so that it becomes a funky physical data logger!
• there is meant to be an index pulse from the platter motor that we could use to synchronise the platter and the stepper, but we weren't able to get a good enough signal from it to do this. Let us know if you manage it!
jsbliyl2 years ago
I'm having a few problems with the code. I've downloaded both files and add the timer to the floppyDrawBot sketch, but I'm getting the error " 'PD5' was not declared in this scope".

Any ideas?
matthewvenn (author)  jsbliyl2 years ago
try changing PD5 for PORTD5
2 years ago
Thank you, all works fine now!
Such a good tutorial!
dmark23 years ago
I am very very interested in adjusting the spindle motor. I tried measuring the wires on the 'spindle motor pcb' going to the larger pcb and I wasn't sure which configuration I had to adjust my voltmeter to. I didn't find any signal amongst the pins, but one of them sent the spindle motor spinning when grounded (pin 4 from the left) but I wasn't able to do anything useful. I think I was close but... no cigar.

(I want this motor adjustment for my floppy tape delay project!)
matthewvenn (author)  dmark23 years ago
does the platter spin up when you ask it to over the interface? If not then you need to either pin down one of the disk detect microswitches, or fake it by forcing the correct i/o line high or low.

When you can get the disk to spin up reliably, then look for the control signal. If you don't have a scope, what I'd try is taking a 2k resistor and connecting each of the lines via the resistor to ground. When you find a line that stops the platter moving, you have a candidate.

Check the rest to be sure, because one of the lines will probably be a signal to start/stop the motor.

Another way to find the line is by looking up the driver chip and then tracing the tracks.

Hope that helps, and let us know how you get on!

Matt
3 years ago
as for now, the spindle motor is completely jammed - it was an issue from the beginning acutally but not that servere - so I'll be building one without platter control first and maybe mod one with a motor knob later.

but thanks so much for your help and advice! I think finding a datasheet for the driver IC is the way forward! to be completely sure.

Best,
Dal
randofo3 years ago
Very cool. You can probably get some interesting patterns by moving the read/write head back and forth "rapidly". Or, at least, as "rapidly" as it will let you. I have a few floppy disk drives lying around in close to an identical state. Maybe if I get bored enough one day I will attach the marker arm and give that a try.
matthewvenn (author)  randofo3 years ago
Yep, this would be great! Problem is that the platter rotates at 300rpm, (5 per sec), and the arm takes about 0.3secs to do a full travel. So we need to slow down the speed somehow... Gearbox? Hack the brushless motor?
3 years ago
What if you were to attach a rather small gear or pulley, like around the size of a quarter, to the spinning motor and use it to drive the platter of an old turntable or outer diameter of a CD drive using a rubber band. The smaller the driving pulley compared to the platter, the slower the platter will move.
matthewvenn (author)  Taranach3 years ago
good idea!
3 years ago
That's a very good point. I had not considered that. More to think about...
dmark23 years ago
So nice to finally see a detailed guide for hooking up the floppy with arduino - but I'm not too strong in coding and I keep getting fail messages from the arduino software.

"SetupTimer was not declared in this scope" :/
matthewvenn (author)  dmark23 years ago
it's because you haven't got the timer.pde file in the project as well.

https://github.com/mattvenn/arduinosketchbook/blob/master/floppyDrawBot/timer.pde

Then in the sketch menu, choose 'add file' and choose the timer.pde file. Then it should work! Let me know!
bertus52x113 years ago
Great! Now I know what to do with my old record player!
BTW, if you make the position of the arm dependant of say pressure or temperature (through your Arduino), you've just made an old fashioned chart recorder!!
matthewvenn (author)  bertus52x113 years ago
great idea! we just need to slow down the platter, at the moment it spins at 300rpm! So probably need a gearbox... Any ideas?
3 years ago
don't know, but would a resistor work?
3 years ago
potentiometer will maybe work?? then you nac choose the RPM as you like
matthewvenn (author)  bertus52x113 years ago
don't think so. It's a brushless DC motor that is designed to operate very precisely at 300 rpm. It may be possible to hack the controller circuitry so that it spins it at a different speed. I'll check the driver chip and see if I can find a datasheet on it next time I'm at the hackspace.
matthewvenn (author)  matthewvenn3 years ago
we worked out how to get the platter to spin much slower by providing a slower clock to the driver chip! We'll update the instructable soon with details...
stackerjack3 years ago
Good work chaps, especially the author.
Following on from Randofo's idea, if the arm could be made to move at a speed which was very slightly out of synch. with the rotating disc, beautiful patterns could be produced, similar to the old Spirograph idea.
An interesting idea, if anyone is clever enough, would be to connect the floppy drive to it's usual slot on the computer, then write to it so that the arm position would move differently to what it does now.
matthewvenn (author)  stackerjack3 years ago
We've now done this by slowing the platter down. Check the last step of the instructable.

I think what you suggest would be possible by writing a new floppydrawbot driver. Personally I like the fact that it doesn't depend on an existing computer!

What I'd like to see is someone working out how to get the index pulse into the Arduino, so the pen arm could be synchronised with the rotations of the platter...
Fred826643 years ago
neat project but it only makes target rings!
thegrendel3 years ago
It's an interesting project, and a good use for otherwise useless old floppy
drives. And something similar might work for an old CDR drive, too.

But, a question. Are you sure that the 'duino can supply enough juice to
drive the floppy motor? I'd guess that the floppy might need as much as
500 ma, and that's straining the 'duino a bit. Maybe connecting this project
to a motor shield, or with a power transistor buffer would be a good idea.
matthewvenn (author)  thegrendel3 years ago
Thanks! Yes I think a CDR drive could work too.

I did check the power stuff, but I omitted it from the instructable; I've added it now. Essentially I ran it through its paces with a multimeter and a PSU: maximum power draw was 300mA. USB limit (and the polyfuse on the Arduino board) is 500mA, so I think it should be fine.

And, I've had it running for quite a while and made lots of pictures with it all running from the Arduino direct.
matthewvenn (author) 3 years ago
problems with instructable; won't show video or extra steps when not logged in!