We found that we had only limited choices for building our device: we first tried to use rotary encoders, but it is not easy to find a cheap encoder that spins smoothly and freely. Another alternative was to buy some audio equipment (like turntables) that spin well and feel good to use - but this seemed both expensive and wasteful for our purposes. Then, while looking for inspiration amongst assorted junk in the lab, we came upon a broken hard disk drive with its case open. We admired the quality of the bearings in the motor that drives the disk plates, enjoyed the fact that even a soft flick would get it spinning for a long time, and wondered whether we could sample an output from it when it was spun by hand, in much the same way that an electric motor, when turned, acts as a dynamo and outputs a voltage.
The answer is yes - and it's a very simple process to turn a hard disk into a rotary input device that has some unique properties. All you'll need is an old hard disk drive, a few op amps, resistors and a programmable microcontroller of some kind.
In this Instructable we'll show the basic principles behind this hack, then provide the schematics and firmware for the HDDJ device (shown below) that we used in our project, and which includes a few extra buttons, lights and a motorized slider for good measure.
Remove these ads by
Signing UpStep 1Crack open a hard disk drive
Old, unwanted or broken hard disk drives (HDDs) are usually free and easy to get hold of. They come in all shapes and sizes, but the most common are the 3.5" HDDs that are used inside desktop PCs. We experimented with a number of different 3.5" HDD models, and found that most are suitable for our purposes (and would guess that smaller, laptop-sized disks would work just as well). The largest variation lies in how easy it is to open the case of some compared to others. Seagate HDDs, which often use plain Phillips screws in the casing, are our favorite.
The first step is to open the drive by removing all the screws that hold the case closed. Often these are torx screws, and you'll need an appropriate screw driver. Sometimes a screw will be hidden behind a label - so if you have trouble opening the case after all the screws seemed to have been removed, poke at the labels to find the culprit. If there is a label saying "Warranty Void if Removed," then, for sure, remove it.
Open the case, and reveal the disk platters in all their untouched glory. Never again will they be so free of fingerprints.
Remove the actuator that holds the read-write head, which stops the platters from spinning around freely. It's up to you how much more you want/need to remove (rule of thumb: anything sharp should go). The only thing that you need to keep attached are the frame, platters and spindle motor.
Thanks to Wikipedia for the "Anatomy of a Hard Disk Drive" image.
| « Previous Step | Download PDFView All Steps | Next Step » |











































If you are a beginner of PIC, I'll recommand you an easy book.
Add me up as a MSN friend, "staybesideyou@hotmail.com"
Then, the outputs of the comparators show two signals in quadrature (90 deg apart) and one signal that is the inverse of one of the first two. Doesn't seem like the same device is being shown.
With four wires all alike, I'd expect them to be 90 deg apart, so there would be two pairs of inverse signals, with one pair leading the other by 90 deg. With three wires and a common (wye) I'd expect the three wires to be at 120 deg apart.
Do your pictures represent two different disk drives, wired differently?
Thanks for the instructable -- I'm going to try it myself.
It's an IBM Desktstar, isn't it?^^
Really cool idea, my friends are gonna be like "wtf?" :D
http://www.youtube.com/watch?v=qaL5syVlae0
I posted the Arduino code here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251656637/0
Not quite how you did it, but I wouldn't have figured it out without this instructable. I used an old 1st gen iPod HD, and I only needed 2 pulse signals, amplified with LM386 op amps (would have used a LM358 dual opamp if I had one handy.)
It sends usb MIDI commands, routed by this program:
http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html
to a shoddy Max/MSP patch that I threw together.
http://arduino.cc/
Partlist
Exported from hddj-2.0.sch at 4/23/2010 4:52:42 PM
EAGLE Version 5.3.0 Copyright (c) 1988-2008 CadSoft
Part Value Device Package Library Sheet
B1 RB1A RB1A rectifier 1
C1 CPOL-USCT3216 CT3216 rcl 1
C2 0.1uF C_0805 C0805 rc-master 1
C3 0.1uF C_0805 C0805 rc-master 1
C4 0.1uF C_0805 C0805 rc-master 1
C5 470nF C_0805 C0805 rc-master 1
C6 0.33uF CPOL-USB/3528-21R B/3528-21R rcl 1
C7 22pF C_0805 C0805 rc-master 1
C8 22pF C_0805 C0805 rc-master 1
C9 CPOL-USCT3216 CT3216 rcl 1
C10 CPOL-USCT3216 CT3216 rcl 1
D1 BAT64_05 DIODE-2AC|CASOT23 SOT23 diode 1
D2 D-SMB SMB semicon-smd-ipc 1
D3 D-SMB SMB semicon-smd-ipc 1
J1 PN61729 PN61729 con-berg 1
J2 MA04-1 MA04-1 con-lstb 1
J3 MA06-1 MA06-1 con-lstb 1
J4 MA06-1 MA06-1 con-lstb 1
J5 MA05-1 MA05-1 con-lstb 1
J6 PINHDR2 PINHDR2 1X02 dongle 1
J7 PINHDR2 PINHDR2 1X02 dongle 1
J8 PINHDR2 PINHDR2 1X02 dongle 1
J9 MA06-1 MA06-1 con-lstb 1
J10 DC21P DC21P DCSKTP dcsocket 1
J11 MA04-1 MA04-1 con-lstb 1
L1 FB_0805 FB_0805 L0805 rc-master 1
L2 FB_0805 FB_0805 L0805 rc-master 1
R1 0R R_0805 R0805 rc-master 1
R2 DNF R_0805 R0805 rc-master 1
R3 22R R_0805 R0805 rc-master 1
R4 22R R_0805 R0805 rc-master 1
R5 470R R_0805 R0805 rc-master 1
R6 470R R_0805 R0805 rc-master 1
R7 470R R_0805 R0805 rc-master 1
R8 470R R_0805 R0805 rc-master 1
R9 470R R_0805 R0805 rc-master 1
R10 470R R_0805 R0805 rc-master 1
R11 1K R_0805 R0805 rc-master 1
R12 1K R_0805 R0805 rc-master 1
R13 1K R_0805 R0805 rc-master 1
R14 10K R_0805 R0805 rc-master 1
R15 10K R_0805 R0805 rc-master 1
R16 10K R_0805 R0805 rc-master 1
R17 4.7K? R_0805 R0805 rc-master 1
R18 10K R_0805 R0805 rc-master 1
R19 10K R_0805 R0805 rc-master 1
R20 10K R_0805 R0805 rc-master 1
R21 10K R_0805 R0805 rc-master 1
R22 10K R_0805 R0805 rc-master 1
R23 10K R_0805 R0805 rc-master 1
R24 10K R_0805 R0805 rc-master 1
R25 0R R_0805 R0805 rc-master 1
R26 DNF R_0805 R0805 rc-master 1
R27 10K R_0805 R0805 rc-master 1
R28 10K R_0805 R0805 rc-master 1
R29 47K R_0805 R0805 rc-master 1
U1 PIC18F4550PT PIC18F4550PT PQFP-44 dongle 1
U2 LM324D LM324D SO14 linear 1
U3 L78MXXCDT L78MXXCDT DPACK_3 dongle 1
U4 L293E DIL16 texas 1
Y1 4MHz XTAL/S QS special 1
Look up "quadrature encoding" for more details, but essentially it doesn't go A-B-A-B, but A-AB-B-None-A-AB-B-None, and *that* pattern lets you determine direction. Look at the first two traces in the image in Step 5, you can see the 4 distinct states.