Professional Documents
Culture Documents
Living
Outside
Play
Technology
Workshop
HDDJ: Turning an old hard disk drive into a rotary input device
by nvillar on November 10, 2008 Table of Contents HDDJ: Turning an old hard disk drive into a rotary input device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro: HDDJ: Turning an old hard disk drive into a rotary input device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Crack open a hard disk drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: Solder wires to the spindle motor contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3: Probing the motor output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 4: Amplifying the output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 5: Measuring direction and velocity of spin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 6: Schematics and firmware for the HDDJ device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 7: Video summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 3 3 4 5 6 7 7 7 7
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
Intro: HDDJ: Turning an old hard disk drive into a rotary input device
A couple of years ago we built a fun system that would allow DJs to mix music tracks in interesting ways . Our design called for an input device that would allow the DJ to quickly seek through a track and find a specific playback position, and we wanted to be able to do this by spinning a rotary control with a flick of the wrist - much like turntable DJs can spin the record back and forth to do the same. 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.
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
Image Notes 1. Unscrew 2. Unscrew 3. Unscrew 4. Unscrew 5. Unscrew 6. Unscrew 7. Unscrew 8. These three were hiding under the label.
Image Notes 1. We could solder four cables to these four points. 2. Or we could solder here.
Image Notes 1. You'll probably want to solder much longer cables than these.
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
File Downloads
HDDJ.zip (210 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'HDDJ.zip']
Related Instructables
Several Easy Steps to Boost Your Computer's Speed by lukethebook333
Tesla turbine from old hard drives and minimal tools by gerrit_hoekstra
Apple Floppy Amp by jeffkobi Techno-geek Roulette (or Who Makes the Coffee?) by AndyGadget
Comments
50 comments Add Comment view all 113 comments
Data643 says:
There isn't much of a difference between the two...
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
recordmasta001 says:
22 gauge wire will do fine :)
SaNjA2659 says:
Apr 11, 2009. 6:41 AM REPLY WANT A PARTS LIST, And can somebody tell me, how can I put files into microcontroller, or can I ask to write files there in a radio shack?
blackbeardlion says:
May 16, 2011. 1:37 PM REPLY no you can't bring it to radio shack but you can make your own software using an avr microcontroller and the usb keyboard and mouse library. it's a bit of a task but you could learn allot if your new to microcontrolers Feb 6, 2011. 5:48 PM REPLY
offnot says:
You have to read some books about PIC. If you are a beginner of PIC, I'll recommand you an easy book. Add me up as a MSN friend, "staybesideyou@hotmail.com"
natman3400 says:
You need a microcontroller programmer.
MECHOL says:
incomprehensible
MECHOL says:
incomprehensible
rlapse says:
could this be done with the old spinny drums from VCR's, i think that that would look boss.
Lowkill says:
Does the hard drive needs to be powered or I'm missing something here?
mman1506 says:
no. It does not, When you spin the platter it creates about 500 mv thats why you need a amplifier
CBMalloch says:
Feb 27, 2011. 4:06 PM REPLY I'm somewhat confused. The sine waves show three phases spaced at 120deg apart, and this implies that the fourth wire is some kind of common. This conflicts with the idea of "pick any three", because one is special. 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.
efiscp says:
I'm gonna implement this as a scrollwheel. A very fast scrollwheel. ;)
the_prototype says:
hehe just realised I'm using exactly the same HDD as you are in the instructable :D It's an IBM Desktstar, isn't it?^^ Really cool idea, my friends are gonna be like "wtf?" :D
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
tomtortoise says:
Nov 17, 2010. 3:36 PM REPLY can you make a schematic for JUST the rotary part no buttons or fader or lights and stuff because im thinking of using one of these for the most legit steering wheel ever for pc gaming Nov 16, 2010. 4:50 PM REPLY one prob though. Once the platter stops rotating it gets a little upity. the lights blink with the slightest vibration of the whole thing, but once the platter is rotated again, its running smoothly. I Imagine this oversensitivity could be corrected with a high value resistor, or low value capacitor
FurtherThanTesla says:
FurtherThanTesla says:
Just tested it, and it outputs the Grey Code as expected and behaves just like I imagined. Tesla would be proud :D
FurtherThanTesla says:
Nov 16, 2010. 4:12 PM REPLY It should also give you some error detection. like, it is impossible for it to go from 11 to 00, or vise-versa, so you can tell it is misreading either by going too slow or too fast and ignore the reading Nov 16, 2010. 4:09 PM REPLY Hey, my HDD only had three wires (im guessing a motor in a "whye" config) but it gave me an idea. use the green wave as the reference for the other two (save urself an opamp) and it will output a grey code like a rotary encoder! this will also improve your resoloution since a 2-bit grey code has four states per revoloution, while your three-phase setup gives three per rev. it goes like this- Green wave is higher than other two= 00, green goes below red=10, yellow goes up above green allong with red= 11, red starts to fall below green while yellow stays = 01 - This pattern will repeat and give you four steps per rev while saving an exta op amp! ill try it out and let you know :D Oct 3, 2010. 8:21 PM REPLY A couple months back I got this working. I used a Parallax basic stamp 2sx. Used an oscilliscope to find the correct pins. From there I connected them to the comparator (quad comparator in my case) and fed those to the stamp. It took me a few hours, maybe even a full day, but I got it working. I then took the serial out of the stamp and had that spit out to my desktop running virtualdj. Using midiYoke and some other stuff I changed the serial data to virtualdj midi commands. After that I could spin the disk and have the track play. The next step I have planned is to rebuild this setup and introduce a speed controller. This will allow me to set the speed of the disk by hand, press a button and have the speed controller maintain the disk spinning speed. Aug 22, 2010. 8:31 AM REPLY Minor correction: "a very simple process". Change to: "a very simple process for an electronics engineering graduate with access to a lab for etching their own PCB."
FurtherThanTesla says:
AriderM says:
Ashiro says:
jhakker says:
I'd pay for one of these !
swathisanthu says:
can u pleas send the HDDJ zip which is working pleazzzzzz
teinai says:
Jun 14, 2010. 6:14 AM REPLY Very very cool. I love the cubic fader tool in your paper too. It makes me very happy to be alive at this time when people are sharing brilliant ideas incorporating fun, music and technology. Makes me wish I was more focussed at university! Great work!!! Jun 11, 2010. 7:37 AM REPLY Very Cool. Adding this one to my to do list. I want to adapt or use in windows movie maker for a shuttle knob. Maybe size the platters and the case down to something more convenient that does not take as much space. Good instructable. Great idea. Aug 30, 2009. 11:26 AM REPLY
T-Hawke says:
mattgilbert says:
Thanks for the instructable! I got one working with an Arduino: 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://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
SinAmos says:
Sweet. What about with different inputs? Like actual tracks?
kbishop says:
Sep 10, 2009. 3:17 PM REPLY i got a question though, how do you connect the usb cable to the op-amps, or where does it play it's role on the schematics? i ask this because i'm really temped to try but never done usb stuff like this before
mattgilbert says:
Sep 10, 2009. 5:41 PM REPLY kbishop, if you mean my Arduino version, the Arduino communicates with the computer over USB, and it also powers and senses the output of the opamps. http://arduino.cc/
SinAmos says:
My kind of fun-zeyz.
dark_angel000 says:
May 2, 2010. 11:22 AM REPLY this thing is awesome ..................................can i have the parts list too ................i sure am gonna try tp make this thing...................thankx
bmxlife says:
can I please have a parts list 2
Wessinc says:
Hi Hope this helps. Parts list: 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 B1 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 D1 D2 D3 J1 J2 J3 J4 J5 J6 J7 J8 J9 J10 J11 L1 L2 R1 R2 R3 R4 R5 R6 R7 R8 R9 Value Device Package Library Sheet
RB1A RB1A rectifier 1 CPOL-USCT3216 CT3216 rcl 1 0.1uF C_0805 C0805 rc-master 1 0.1uF C_0805 C0805 rc-master 1 0.1uF C_0805 C0805 rc-master 1 470nF C_0805 C0805 rc-master 1 0.33uF CPOL-USB/3528-21R B/3528-21R rcl 1 22pF C_0805 C0805 rc-master 1 22pF C_0805 C0805 rc-master 1 CPOL-USCT3216 CT3216 rcl 1 CPOL-USCT3216 CT3216 rcl 1 BAT64_05 DIODE-2AC|CASOT23 SOT23 diode D-SMB SMB semicon-smd-ipc 1 D-SMB SMB semicon-smd-ipc 1 PN61729 PN61729 con-berg 1 MA04-1 MA04-1 con-lstb 1 MA06-1 MA06-1 con-lstb 1 MA06-1 MA06-1 con-lstb 1 MA05-1 MA05-1 con-lstb 1 PINHDR2 PINHDR2 1X02 dongle 1 PINHDR2 PINHDR2 1X02 dongle 1 PINHDR2 PINHDR2 1X02 dongle 1 MA06-1 MA06-1 con-lstb 1 DC21P DC21P DCSKTP dcsocket 1 MA04-1 MA04-1 con-lstb 1 FB_0805 FB_0805 L0805 rc-master 1 FB_0805 FB_0805 L0805 rc-master 1 0R R_0805 R0805 rc-master 1 DNF R_0805 R0805 rc-master 1 22R R_0805 R0805 rc-master 1 22R R_0805 R0805 rc-master 1 470R R_0805 R0805 rc-master 1 470R R_0805 R0805 rc-master 1 470R R_0805 R0805 rc-master 1 470R R_0805 R0805 rc-master 1 470R R_0805 R0805 rc-master 1
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R23 R24 R25 R26 R27 R28 R29 U1 U2 U3 U4 Y1
470R R_0805 R0805 rc-master 1 1K R_0805 R0805 rc-master 1 1K R_0805 R0805 rc-master 1 1K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 4.7K? R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 0R R_0805 R0805 rc-master 1 DNF R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 10K R_0805 R0805 rc-master 1 47K R_0805 R0805 rc-master 1 PIC18F4550PT PIC18F4550PT PQFP-44 dongle LM324D LM324D SO14 linear 1 L78MXXCDT L78MXXCDT DPACK_3 dongle L293E DIL16 texas 1 4MHz XTAL/S QS special 1
1 1
George1024 says:
Nov 20, 2008. 4:05 PM REPLY My attempt at making one has failed...the hard drive I'm using only has 3 wires, therefore only 2 outputs to measure. Regardless of the direction the platters are spinning in, the sequence of the rising edges will always be A-B-A-B-A-B-A-B. Back to the drawing board...
pelrun says:
You only need two signals, the third is redundant (it's just an inverted copy of one of the others).
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.
stefannasehi says:
@pelrun do i still need to put the op-amp if i have 3 wires? how do i wire it to the usb cable? and what part of the zip file do i need?
George1024 says:
Apr 11, 2010. 5:05 PM REPLY I was able to set up the project using three wires and no op-amps. However, you'll need a microcontroller with built in Analog to Digital Converters (ADC), like the ATmegas used in the Arduino boards. As far as I can remember, one of the wires goes into +5V, and the other two go into the analog inputs on the microcontroller. Three wires = six possible arrangements, so test them all until you start getting proper signals on both analog inputs. As for the code, you can either write up your own implementation based on the pattern that the two pins' signals will form (which @pelrun describes above), or you can be lazy and use someone else's :) My implementation for the Arduino (with lots of comments) is here: http://github.com/George1024/arduinoturntable/blob/master/Turntable/Turntable.pde
George1024 says:
Thanks, I'll give that a go.
ruzter says:
Nov 23, 2008. 10:37 AM REPLY Yes, mine only had three wires too, but I can get 2 signals 90 degrees apart, enough to count pulses AND know what direction the platter is turning. i.e use one wire for ground and the other 2 as signals. Mar 11, 2010. 7:53 PM REPLY
MediocreNinja says:
Im guessing parts list is: Old HDD disk drive Thats it?
kennethchaco says:
can i conect that to arduino duemilanove? please help
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/
maxout says:
Sep 10, 2009. 7:13 PM REPLY nice project can't be done without details on part list yet i still want to build it.. i am itching to scratch lolz.. also is this connected thru USB? i mean what software u test it with? Virtual Dj, etc? please if you can do this project in detail on WIKI would be great.
kyle.marsh says:
Coffee bean: would that be the opposite of defragging?
ReCreate says:
Just remove the de, Fragmenting...
chipboy says:
SO IS THIS TECHNICALLY A CDJ U CAN SCRATCH AND TREAT AS 1
ReCreate says:
YA DATS RITE!!!111
Gamernotnerd says:
Aug 4, 2009. 5:19 PM REPLY AND YOU CAN USE IT TO TURN CAPS LOCK OFF TOO AND MAYBE IF YOURE LUCKY IT WILL PUNCTUATE YOUR SENTENCES FOR YOU
http://www.instructables.com/id/HDDJ-Turning-an-old-hard-disk-drive-into-a-rotary/