Go Down

Topic: Clickwheel with Arduino (Read 19447 times) previous topic - next topic


Thanks. :-)

If you could add a photograph of your motor connections that would be helpful too. :-D



That's the next thing to do, yes!  Of course, all CD-ROM motors are not the same, so it'll take a bit of figuring out which wire goes where on your particular motor.  Also, some motors might have the Hall sensors in parallel, instead of in series as I've shown them.  The motor driver chip datasheet shows that either configuration will work.


Through much pain and digging I came across this topic. I am not very much into electronics, so I cannot find the words that make google happy.
I have that same type of brushless CD motor, with obviously hall effect sensors in it (from the look of it probably 3). But it has a ribbon cable with 12 pins, so I cannot decode that :).
Obviously I am also waiting for your pictures and additional explanations. I also read your post about how to power and control such motor, but again - instead of 3 I have 12 pins, that I cannot decrypt.
Thanks for all the shared info so far!


Some of the wires in that 12-conductor cable may be unused, and some may be connected in parallel.  The first step is to use a multimeter to check for continuity between ribbon cable wires and the pins of the Hall-effect sensors.  Try to figure out the wiring of the motor coils, too, so that you can levae them unconnected.  Note from my diagram that the three Hall-effect sensors will have two wires each, plus power and ground.


Apr 06, 2009, 08:35 pm Last Edit: Apr 06, 2009, 08:38 pm by mircho Reason: 1
Thank you for your reply!
I went further with my observations, and traced which wires are connected to which hall-effect sensor. I traced the 6 wires to the 3 sensors.
Now what I don't know is if there is polarity in those sensors?
I assume that I have to count this way - 6 output lines from the sensors, power, ground for them, 3 control lines for the coils. (I traced those also). Is that right?
My motor comes from disassembled CD ROM. In it you can find two more motors the one opening the tray, and the one moving the optical head.
I managed to work with the DC motor that positions the head laser reader. On both drives I found a motor with linear optical encoder attached directly to the shaft. Because the encoder is linear (3 wires) and optical (led) I figured out the power and the ground (from the placement of a resistor) and was able to read the ticks from the data pin. (Sorry for the little off topic but I think googlers might find it handy)


6 output lines from the sensors, power, ground for them, 3 control lines for the coils. (I traced those also). Is that right?

Yes, that's right.

The Hall-effect sensors have four terminals, two of which come out on the connector (as you've found).  The other two terminals behave like a diode and pass a small current through the device(s).  On my CD-ROM motor, they were connected in series rather like a string of three LEDs.  I added current-limiting resistors (100 Ohms at each end) and powered them from the 5V supply.

Good to hear about the two other DC motors, too!


I did implement your suggestion Anachrocomputer.
Here is a short video of it:
The only thing I added to the proposed schematics are 4k7 pullups to the outputs of the comparator. The datasheet of the LM339 and the included test circuits all used a pullup (in the datasheet they usually used 10k).

The hardest part was soldering my own cables to the motor. This setup has good resolution for any practical user interface purpose and has solid, stable feel to it.


May 15, 2009, 10:09 pm Last Edit: May 15, 2009, 10:09 pm by anachrocomputer Reason: 1
Glad to hear that it worked!  I used a TLC3704 which doesn't need pull-up, but with the LM339, it's open-collector, so you'll need pull-up resistors. I managed to desolder the tape-wire connector from the CD-ROM's PCB, so I used that to make the connections.  Was tricky, though.



I tried to interfacing an Arduino MEGA board and a qt1106 but my program doesn't run (i use the evaluation board E1106). I found a code for AVR http://www.freaklabs.org/freakusb/html/. I tried with Arduino Mega SPI interface and with this code http://www.arduino.cc/playground/Code/MCP3208 but the qt1106 reply is allways 0.
Is somebody tried this code ??



In response to the original question about controlling Nuendo (or any other audio software), I would recommend sending midi data and then using Spekenzie Labs serial to midi converter to translate the data and map it to an existing software midi port on your computer.  I have successfully done this using HDD spindle motors.

The MIDI signals you will want to send are probably CC signals, here is the arduino code I used to send my signals.  

Code: [Select]
   Serial.print( 176, BYTE);  //Control Change identifier
   Serial.print( 70, BYTE);   //Controller ID Number
   Serial.print( 65, BYTE);   //Controller direction number

I have two encoders, one is MIDI control 70, and one is MIDI control 71.  These are rotary controllers in the MIDI standard, and most audio software will map to them.  The direction number controls how far/fast values change.  64 is the middle, so 65 is really fast to the right or up, and 63 is really fast to the left or down.  The range is 0 to 127, both of those being very very slow to the left/down (0) and up/right (127).  It seems backwards, but it works!

Go Up