Difference between revisions of "Hacked Hard-disc Centrifuge"

From Hackteria Wiki
Jump to: navigation, search
(DIY)
 
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
 
Fast spinning hard drives in a solid aluminium housing are perfect for making small DIY centrifuges...<br>
 
Fast spinning hard drives in a solid aluminium housing are perfect for making small DIY centrifuges...<br>
  
 
== DIY  ==
 
== DIY  ==
 +
 +
=== 3D printed rotary holders ===
 +
 +
'''GynePunkFuge'''
 +
 +
[[File:Selection_587.png|400px]]
 +
 +
Parametrized design by pin&dusjagr in OpenScad: File will be uploaded to thingyverse soon...
 +
 +
Adding Font to the 3d object using https://github.com/brodykenrick/text_on_OpenSCAD
 +
 +
[[File:Selection_613.png|400px]]
 +
 +
'''GaudiFuge'''
 +
 +
[[File:HDD_GaudiLabs1.jpg|none|400px|]]<br>
 +
First GaudiLabs version of a hard drive centrifuge based on 3D printed tube holder. 3D printing is not precise enough for high speed applications...<br>
 +
 +
=== Laser cut rotary holders ===
  
 
[[File:HDD_Bengt.jpg|none|400px|]]
 
[[File:HDD_Bengt.jpg|none|400px|]]
 
Bengt's 7200 rpm IBM Deskstar with lasercut holder for 2 x 1.5ml Eppendorf tubes and 2 x 200 ul Eppendorf PCR tubes.<br>  
 
Bengt's 7200 rpm IBM Deskstar with lasercut holder for 2 x 1.5ml Eppendorf tubes and 2 x 200 ul Eppendorf PCR tubes.<br>  
 
Needs tape to hold tubes down and preferably a box around it to avoid getting hit by flying tubes...<br>
 
Needs tape to hold tubes down and preferably a box around it to avoid getting hit by flying tubes...<br>
[[File:HDD_GaudiLabs1.jpg|none|400px|]]<br>
+
 
First GaudiLabs version of a hard drive centrifuge based on 3D printed tube holder. 3D printing is not precise enough for high speed applications...<br>
 
 
[[File:HDD_GaudiLabs2.jpg|none|400px|]]<br>
 
[[File:HDD_GaudiLabs2.jpg|none|400px|]]<br>
 
Second try using laser cut acrylic parts. Now upgraded with a nice LCD display.<br>
 
Second try using laser cut acrylic parts. Now upgraded with a nice LCD display.<br>
 
Ordered a appropriate driver: Electronic motor control for hopyy cars...<br>
 
Ordered a appropriate driver: Electronic motor control for hopyy cars...<br>
  
== Useful Links ==
+
[[File:DesktopHDDCentrifuge.jpg|none|400px|]]<br>
http://www.thingiverse.com/image:190394
+
And another one, this time more safe with a metallic lid...<br>
 +
<br>
 +
 
 +
== Calculate g-force from design ==
 +
 
 +
http://www.endmemo.com/bio/grpm.php
 +
 
 +
== Instructions using the ESC Flyduino 25A and Arduino ==
 +
 
 +
=== Setup ===
 +
 
 +
 
 +
introduction bruslees motor as the one that is inside the HD :
 +
 
 +
To drive a brushless motor, you have to take DC, turn it into three phase AC (sinusoidal or trapezoidal wave) and then measure back-emf pulses (sensorless) to allow you to make sure the three phase AC is being generated at the proper frequency to turn the motor (timing).
 +
 
 +
As an academic exercise, this might be done with one motor. You will have to generate three AC currents with 120 degree phase difference. Then you have to time them so you have a rotating magnetic field. This usually involves driving six hexfets. See below for a better explanation of what you will need to do. It's actually quite interesting.
 +
 
 +
 
 +
Microchip appnotes to read to better understand driving brushless motors:
 +
http://ww1.microchip.com/downloads/en/AppNotes/00885a.pdf
 +
http://ww1.microchip.com/downloads/en/AppNotes/00857a.pdf
 +
 
 +
More Microchip, including selecting mosfets (Double H-Bridge) and using PIC microcontrollers to make a sensorless brushless motor driver (ESC)
 +
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1523
 +
Arduino forum
 +
 
 +
open source ESC control example is developing check also here [http://open-bldc.org/wiki/Open-BLDC]
 +
 
 +
[[File:setup_gynepunk.jpg|400px]]
 +
 
 +
First working setup using the Flyduino and controlling it from the arduino (servo lib). Double checking the servo control output with the oscilloscope.
 +
 
 +
=== Connecting stuff ===
 +
 
 +
 
 +
We used an external 12V power-supply to power the arduino. Via the breadboard we connected 5V, GND to a potentiometer and use the reading from Analog 0 (middle leg of pot).
 +
 
 +
Pin 9 on the arduino is the output of the servo control. only connect this one and GND to the small cables on the ESC. Black is GND, white or yellow is control. '''DON'T CONNECT 5V to the ESC.'''
 +
 
 +
[[File:connect_ESC_gynepunk.jpg|400px]]
 +
 
 +
[[File:connect_arduino_gynepunk.jpg|400px]]
 +
 
 +
The ESC is connected with the 2 big wires to the 12V power supply. black is GND, red is 12V.
 +
 
 +
On the other side the 3 wires are controlling the brushless motor / hard-disc motor. We kinda tried different connections, in the end the red wire to the red and the other howwever worked. If you have 4 connectors on the hard-disc, the 4th should be the speed signal to read-out.
 +
 
 +
about hall sensors and control the speed [http://www.instructables.com/id/BLDC-Motor-Control-with-Arduino-salvaged-HD-motor/step5/The-Hall-Sensor-Mechanical-Setup/]
 +
 
 +
if you wanna know how to make more than 150rev/seg check this interesting hack [http://www.rcgroups.com/forums/showthread.php?t=766589]
 +
 
 +
=== Getting it to run... ===
 +
 
 +
{{#widget:Iframe
 +
|url=https://www.youtube.com/embed/PS_HxlQnMIo
 +
|width=400
 +
|height=300
 +
|border=0
 +
}}
 +
 
 +
next week looking nice box and re-print new version of the initial desing :
 +
 
 +
 
 +
[[File:IMG_9899.JPG|400px]]
 +
 
 +
[[File:IMG_9870.JPG|400px]]
 +
 
 +
 
 +
 
 +
==Another use full code for arduino to run 7200rpm ==
 +
 
 +
I wrote this code for measuring the rpm of a fan. I think it can be adapted. It works by timing a specified number of pulses (by the saples constant). The NoSensors determines the number of pulses/revolution. Just change these constants to suit your needs.
 +
The code is based on my state machine library found here: http://playground.arduino.cc/Code/SMlib
 +
 
 +
[http://forum.arduino.cc/index.php?topic=273262.msg1927168#msg1927168]
 +
 
 +
== Experiments and more Info ==
 +
 
 +
I will love to explain here something more about this motors and the electric parts behind.
 +
Most of the HDD motors are BLDC (brushless) motors. They can be driven by brushless ESC. Cheapest would be to buy hobby RC ESC and drive it by PWM
 +
 
 +
I find this nice tutorial from http://www.instructables.com/id/ESC-Programming-on-Arduino-Hobbyking-ESC/
 +
I'm going to show you, how to program and use the Hobbyking ESC. I just found a few information and tutorials, which really didn't help me very much, so i decided to
 +
program an own sketch, which is very simple to understand.
 +
 
 +
Important to know:
 +
* ESC means Electronic Speed control
 +
* The ESC has a 5v(not used), GND and Signal Pin like a Servo
 +
* You control it like a Servo with write() http://arduino.cc/de/Reference/ServoWrite
 +
* or writeMicroseconds http://arduino.cc/de/Reference/ServoWriteMicroseconds
 +
 
 +
In my Example i use writeMicroseconds, because it is easier to understand.
 +
 
 +
Step 1: Getting ESC information
 +
 
 +
You really should remark the Amperevalue of your ESC. This tutorial is only tested on 20 AMP ESC : http://www.hobbyking.com/hobbyking/stor
 +
/__15202__hobby_king_20a_esc_3a_ubec.html
 +
I can't really promise, that this is working with an other ESC but i think so, because in the english manual are 20 and 30 Amp ESC's described. In the German version is a generalisation from 10 to 120 Amp, thats why I think this could work for every ESC.
 +
 
 +
Step 2: Connection to Arduino
 +
I tried it with an arduino uno R3.
 +
First you have to connect the ESC to you lipo or NiMH. When you have done that you connect the ESC like so:
 +
* Black to GND
 +
* White/Yellow to PIN 9
 +
Because you connected the ESC to your battery, the ESC is put under voltage. Thats why it It is important, that you DON'T connect the red wire to your 5v Port, because
 +
it could destroy your computer's USB Port.
 +
On this picture you can see the correct connection between ESC and Arduino (Mega).
 +
Picture source: http://1.bp.blogspot.com/-eqDaRgO5FjU/T9U3avwT2-I/AAAAAAAAALE/-8pj4qD12Q0/s1600/Figure2_2_edit.jpg
 +
 
 +
 
 +
 
 +
[[media:HDDCentri_Inlay_Laser.pdf]]
 +
 
 +
 
 +
//////// other code to crontrol this motors /////
 +
 
 +
 
 +
 
 +
Sorry about that. No, there is only one for each, but the parts of the array are the pins:
 +
 
 +
motor_left[0] = pin 5, and [1] = pin 6.
 +
 
 +
Uh, the whole sketch is fairly large all up, but separated into three files, one with the drive functuions (forwards, back, left, right), the main one, and one with other stuff.
 +
By Ro-Bot-X @ Wed, 2011-02-02 14:48
 +
Pins 5 and 6 are both PWM
 +
 
 +
    Login or register to post comments
 +
 
 +
Pins 5 and 6 are both PWM pins tied to Timer0. You need to connect one of them to motor_left and the other to motor_right. Then the second pin of the motors can be a regular digital pin (for example 4 and 7). Lets group the pins like this:
 +
 
 +
#define motor_left_0    4 // direction pin, set it LOW for forward, HIGH for reverse
 +
#define motor_left_1    5 // PWM pin, 0-255 values
 +
 
 +
#define motor_right_1 6 // PWM pin
 +
#define motor_right_0  7 // direction pin, set it LOW for forward, HIGH for reverse
 +
 
 +
The enable pins have to be connected to Vcc (5V).
 +
 
 +
When driving forward, you set the direction pin LOW. A PWM value of 0 will have the motor stopped, then higher values make the motor spin faster and faster, 255 being the max speed.
 +
 
 +
When driving in reverse, you set the direction pin HIGH. A PWM value of 255 will have the motor stopped and lower vales will make the motor spin faster and faster, 0 being the max speed. To make this easy to use, just subtract the desired PWM value from 255 to get the inverted one, like this:
 +
 
 +
byte setPWM = 200;
 +
 
 +
//forward
 +
digitalWrite(motor_right_0, LOW);
 +
analogWrite(motor_right_1, setPWM);
 +
 
 +
//reverse
 +
digitalWrite(motor_right_0, HIGH);
 +
analogWrite(motor_right_1, 255-setPWM);
 +
 
 +
 +
 
 +
Does this look clear enough?
 +
 
 +
 
 +
 
 +
an example of a driver for a brushless DC motor without Microcontroler
 +
 
 +
    Control method: open loop, no feedback
 +
    CPU: none
 +
    Power source: 4x AA NiMH
 +
    Sensors / input devices: none
 +
    Target environment: ex hard drives
 +
 
 +
other posibilitie:
 +
 
 +
http://www.bajdi.com/obstacle-avoiding-robot-made-from-cheap-parts/l293d-schematic/
 +
 
 +
 
 +
[[http://letsmakerobots.com/node/2898]]
 +
 
 +
[[Category:GynePunk]]

Latest revision as of 12:30, 12 September 2022

Fast spinning hard drives in a solid aluminium housing are perfect for making small DIY centrifuges...

DIY

3D printed rotary holders

GynePunkFuge

Selection 587.png

Parametrized design by pin&dusjagr in OpenScad: File will be uploaded to thingyverse soon...

Adding Font to the 3d object using https://github.com/brodykenrick/text_on_OpenSCAD

Selection 613.png

GaudiFuge

HDD GaudiLabs1.jpg

First GaudiLabs version of a hard drive centrifuge based on 3D printed tube holder. 3D printing is not precise enough for high speed applications...

Laser cut rotary holders

HDD Bengt.jpg

Bengt's 7200 rpm IBM Deskstar with lasercut holder for 2 x 1.5ml Eppendorf tubes and 2 x 200 ul Eppendorf PCR tubes.
Needs tape to hold tubes down and preferably a box around it to avoid getting hit by flying tubes...

HDD GaudiLabs2.jpg

Second try using laser cut acrylic parts. Now upgraded with a nice LCD display.
Ordered a appropriate driver: Electronic motor control for hopyy cars...

DesktopHDDCentrifuge.jpg

And another one, this time more safe with a metallic lid...

Calculate g-force from design

http://www.endmemo.com/bio/grpm.php

Instructions using the ESC Flyduino 25A and Arduino

Setup

introduction bruslees motor as the one that is inside the HD :

To drive a brushless motor, you have to take DC, turn it into three phase AC (sinusoidal or trapezoidal wave) and then measure back-emf pulses (sensorless) to allow you to make sure the three phase AC is being generated at the proper frequency to turn the motor (timing).

As an academic exercise, this might be done with one motor. You will have to generate three AC currents with 120 degree phase difference. Then you have to time them so you have a rotating magnetic field. This usually involves driving six hexfets. See below for a better explanation of what you will need to do. It's actually quite interesting.


Microchip appnotes to read to better understand driving brushless motors: http://ww1.microchip.com/downloads/en/AppNotes/00885a.pdf http://ww1.microchip.com/downloads/en/AppNotes/00857a.pdf

More Microchip, including selecting mosfets (Double H-Bridge) and using PIC microcontrollers to make a sensorless brushless motor driver (ESC) http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1523 Arduino forum

open source ESC control example is developing check also here [1]

Error creating thumbnail: File missing

First working setup using the Flyduino and controlling it from the arduino (servo lib). Double checking the servo control output with the oscilloscope.

Connecting stuff

We used an external 12V power-supply to power the arduino. Via the breadboard we connected 5V, GND to a potentiometer and use the reading from Analog 0 (middle leg of pot).

Pin 9 on the arduino is the output of the servo control. only connect this one and GND to the small cables on the ESC. Black is GND, white or yellow is control. DON'T CONNECT 5V to the ESC.

Connect ESC gynepunk.jpg

Connect arduino gynepunk.jpg

The ESC is connected with the 2 big wires to the 12V power supply. black is GND, red is 12V.

On the other side the 3 wires are controlling the brushless motor / hard-disc motor. We kinda tried different connections, in the end the red wire to the red and the other howwever worked. If you have 4 connectors on the hard-disc, the 4th should be the speed signal to read-out.

about hall sensors and control the speed [2]

if you wanna know how to make more than 150rev/seg check this interesting hack [3]

Getting it to run...

next week looking nice box and re-print new version of the initial desing :


IMG 9899.JPG

IMG 9870.JPG


Another use full code for arduino to run 7200rpm

I wrote this code for measuring the rpm of a fan. I think it can be adapted. It works by timing a specified number of pulses (by the saples constant). The NoSensors determines the number of pulses/revolution. Just change these constants to suit your needs. The code is based on my state machine library found here: http://playground.arduino.cc/Code/SMlib

[4]

Experiments and more Info

I will love to explain here something more about this motors and the electric parts behind. Most of the HDD motors are BLDC (brushless) motors. They can be driven by brushless ESC. Cheapest would be to buy hobby RC ESC and drive it by PWM

I find this nice tutorial from http://www.instructables.com/id/ESC-Programming-on-Arduino-Hobbyking-ESC/ I'm going to show you, how to program and use the Hobbyking ESC. I just found a few information and tutorials, which really didn't help me very much, so i decided to program an own sketch, which is very simple to understand.

Important to know:

In my Example i use writeMicroseconds, because it is easier to understand.

Step 1: Getting ESC information

You really should remark the Amperevalue of your ESC. This tutorial is only tested on 20 AMP ESC : http://www.hobbyking.com/hobbyking/stor /__15202__hobby_king_20a_esc_3a_ubec.html I can't really promise, that this is working with an other ESC but i think so, because in the english manual are 20 and 30 Amp ESC's described. In the German version is a generalisation from 10 to 120 Amp, thats why I think this could work for every ESC.

Step 2: Connection to Arduino I tried it with an arduino uno R3. First you have to connect the ESC to you lipo or NiMH. When you have done that you connect the ESC like so:

  • Black to GND
  • White/Yellow to PIN 9

Because you connected the ESC to your battery, the ESC is put under voltage. Thats why it It is important, that you DON'T connect the red wire to your 5v Port, because it could destroy your computer's USB Port. On this picture you can see the correct connection between ESC and Arduino (Mega). Picture source: http://1.bp.blogspot.com/-eqDaRgO5FjU/T9U3avwT2-I/AAAAAAAAALE/-8pj4qD12Q0/s1600/Figure2_2_edit.jpg


media:HDDCentri_Inlay_Laser.pdf


//////// other code to crontrol this motors /////


Sorry about that. No, there is only one for each, but the parts of the array are the pins:

motor_left[0] = pin 5, and [1] = pin 6.

Uh, the whole sketch is fairly large all up, but separated into three files, one with the drive functuions (forwards, back, left, right), the main one, and one with other stuff. By Ro-Bot-X @ Wed, 2011-02-02 14:48 Pins 5 and 6 are both PWM

   Login or register to post comments 

Pins 5 and 6 are both PWM pins tied to Timer0. You need to connect one of them to motor_left and the other to motor_right. Then the second pin of the motors can be a regular digital pin (for example 4 and 7). Lets group the pins like this:

  1. define motor_left_0 4 // direction pin, set it LOW for forward, HIGH for reverse
  2. define motor_left_1 5 // PWM pin, 0-255 values
  1. define motor_right_1 6 // PWM pin
  2. define motor_right_0 7 // direction pin, set it LOW for forward, HIGH for reverse

The enable pins have to be connected to Vcc (5V).

When driving forward, you set the direction pin LOW. A PWM value of 0 will have the motor stopped, then higher values make the motor spin faster and faster, 255 being the max speed.

When driving in reverse, you set the direction pin HIGH. A PWM value of 255 will have the motor stopped and lower vales will make the motor spin faster and faster, 0 being the max speed. To make this easy to use, just subtract the desired PWM value from 255 to get the inverted one, like this:

byte setPWM = 200;

//forward digitalWrite(motor_right_0, LOW); analogWrite(motor_right_1, setPWM);

//reverse digitalWrite(motor_right_0, HIGH); analogWrite(motor_right_1, 255-setPWM);


Does this look clear enough?


an example of a driver for a brushless DC motor without Microcontroler

   Control method: open loop, no feedback
   CPU: none
   Power source: 4x AA NiMH
   Sensors / input devices: none
   Target environment: ex hard drives

other posibilitie:

http://www.bajdi.com/obstacle-avoiding-robot-made-from-cheap-parts/l293d-schematic/


[[5]]