Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hard Driver motor

Status
Not open for further replies.

AtomSoft

Well-Known Member
I recently found some old and newer hard drives too damaged to be repaired for normal PC use now i took one apart for parts such as the motor inside. I know nothing on motor like this. I know about normal motors like with magnets and stuff and how it works but beyaond normal 2 wire stuff i got no clue.

Ill take some pictures but for now let me explain in words. The motor has a 4 wire interface which i soldered 4 wires to a pin header for testing. How do i apply power to it? I tried normal but i think this is like some PWM type thing because i cant apply constant power it stops. But when i put power and then off/on it........... it works.

Any suggestions on how i can power this for use?

**broken link removed**
 
Last edited:
it is stepper motor. You need to measure resistance between all wires in order to find out what type of stepper motor it is ...

check out : Jones on Stepping Motors

the motor I salvaged from old HDD drive is
Variable Reluctance Motors and it is as figure 1.1 found here:
Jones on Stepping Motor Types

**broken link removed**
Code:
sequence to drive it:
  Winding 1 1001001001001001001001001
  Winding 2 0100100100100100100100100
  Winding 3 0010010010010010010010010
              time --->

most common stepper motors around are unipolar but for some reason I prefer bipolar.
most of the HDD's are multiphase motors (5phase) but they are with 5 leads. The one I have (use) is 4 lead just like the one on the pic and it is Variable Reluctance.

Pay attention, when you test the motor,
- if you start the sequence to slow it will jiggle and not rotate
- if you start the sequence to fast if will oscillate and will not turn
- this motors have very low torque
so in order to achieve rotation (4000 - 7000 rpm) you need to start slow and then increase speed ..

I hope this helped
 
hi,
In addition to 'arhi's good explanation.

If you follow the copper track on the driver pcb, from the 4 pin connector, you should find the motor drive ic.
If you are lucky it will have the ic type name on its case.

Remove it carefully and you have a ready made driver..:)
 
Last edited:
wow there alot of info there a bit scary... makes me just one to buy one instead lol...

Pins
1 & 4 = 1.3 Ohms
2 & 4 = 2.0 Ohms
3 & 4 = 2.0 Ohms

1 & 3 = 1.1 Ohms
2 & 3 = 2.0 Ohms

1 & 2 = 1.2 Ohms

How does this help? Havent really read all on that page yet
 
It looks like the spindle motor that rotates the platter. A stepper motor would flat out not work for that application.

The schematic diagram in ahri's post is likely correct, but I think this is a 3 phase brushless DC motor. A very different animal from a stepper.

It also looks like ST Micro has disavowed all knowledge of this motor control chip. At least nobody answered the guy who posted the question in 2006.
 
Last edited:
wow there alot of info there a bit scary... makes me just one to buy one instead lol...

Pins
1 & 4 = 1.3 Ohms
2 & 4 = 2.0 Ohms
3 & 4 = 2.0 Ohms

1 & 3 = 1.1 Ohms
2 & 3 = 2.0 Ohms

1 & 2 = 1.2 Ohms

How does this help? Havent really read all on that page yet

read the page :)
pin1 is the common lead, as pi1 to pin(2|3|4) is ~1R and between pins 2,3,4 you have 2R so if you look at the schematic, the "winding" resistance is 1R

You drive the motor pretty easy .. connect it like this

+5V - 100R - pin1 //I drive it without resistor but it should be smart to limit the current
RC0 - pin2
RC1 - pin3
RC2 - pin4

and drive:
Code:
// config ...
//...

main(){
  unsigned short delay, a;
  TRISC = 0; //output
  delay = 250;
  a = 0;
  while(1){
     PORTC = 0b00000110;
     delay_us(delay);
     PORTC = 0b00000101;
     delay_us(delay);
     PORTC = 0b00000011;
     delay_us(delay);
     if (++a == 0) if (delay>0) delay--;
  }
}
as you see, the motor will "increase speed" every 256 cycles.

now, it might happen that still motor "bounces" around, e.g. run back/forth. this mean that you need to get the right "order" of the wind1-3 (not too many combinations, so you can try all 4)

you can also try to connect "common" pin to GND and source power from pic, but I'm not sure if pic can give enough current to drive it.

as for the motor driver, I managed to salvage bunch of HDD's and I never managed to find any datasheet on the driver from the HDD board :( (some of them had no markings, some are strange NEC chips .. anyhow google was silent)

as for the "brushless dc" vs "stepper" .. try to rotate the motor with your hand, if you feel the "steps" that's a stepper
 
Is it your position that a stepper could actually be used for rotating the spindle of a hard drive? You should know that I did spend a few years in the HDD indusry once upon a time.
 
Last edited:
Is it your position that a stepper could actually be used for rotating the spindle of a hard drive? You should know that I did spend a few years in the HDD indusry once upon a time.

It would be a VERY slow and useless HDD if it used a stepper! :D

As you suggested, it's a DC brushless motor.
 
It would be a VERY slow and useless HDD if it used a stepper! :D

As you suggested, it's a DC brushless motor.
I know you know that and I know I know that, but the question is do the other posters know that?
 
For some reason i get this error.. the thing is that the file is there im using ver 8 of MPLAB
Code:
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F1320 "b.c" -fo="b.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v3.20 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited:  60
C:\PicCode\b\b.c:14:Warning [2058] call of function without prototype
C:\PicCode\b\b.c:16:Warning [2058] call of function without prototype
C:\PicCode\b\b.c:18:Warning [2058] call of function without prototype
Executing: "C:\MCC18\bin\mplink.exe" "C:\MCC18\lkr\18f1320.lkr" "C:\PicCode\b\b.o" "C:\MCC18\lib\c018i.o" /o"b.cof" /M"b.map" /W
MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
[B]Error - could not find file 'c018i.o'.[/B]
Errors    : 1
 
Radical left turn! Perhaps a new thread would be in order.
 
i get that while compiling the below code (related to this thread)
Code:
#include <p18f1320.h>
#include <delays.h>
#pragma config OSC = INTIO1, WDT = OFF, LVP = OFF, DEBUG = ON



void main (void){
  unsigned short delay, a;
  TRISA = 0; //output
  delay = 250;
  a = 0;
  while(1){
     PORTA = 0b00001100;
     delay_us(delay);
     PORTA = 0b00001010;
     delay_us(delay);
     PORTA = 0b00000110;
     delay_us(delay);
     if (++a == 0) if (delay>0) delay--;
  }
}
 
@Papabravo ah you must be right then :) .. I drive the 4pin HDD drive just like any other variable reluctance stepper motor, from outside it looks like any other variable reluctance stepper motor... when you turn it you "feel the steps", when you power one coil it snap to "same" location .. all this (for me) are the stepper motor properties - so, I call it stepper :( .. to be honest I do not get the whole difference between brushless dc and stepper in this point .. what is difference between 5phase stepper and 5phase dc ?

anyhow, however it is called, the code provided should spin it (i tried it few times)

p.s. don't get me wrong, I know that mine knowledge of the issue is limited, I'm not being sarcastic - just explaining why I said it is stepper
 
Last edited:
Imade the below code from the above code. It jitters a little and i tried many ways of switching the pins but do you think i need a diff delay time?
Code:
	LIST	p=18F1320		;tell assembler what chip we are using
	include	<p18F1320.inc>		;include the defaults for the chip
	CONFIG	OSC = INTIO2, WDT = OFF, LVP = OFF, DEBUG = ON		;sets the configuration settings (oscillator type etc.)

	cblock 	0x00 	
	d1
	endc

		org	0x00
Init
	MOVLW	0x62			; 4MHz clock select
	MOVWF	OSCCON
	CLRF	TRISA
Start
;1
	MOVLW	b'00001010'
	MOVWF	PORTA
	CALL	DelayStart
;2
	MOVLW	b'00001100'
	MOVWF	PORTA
	CALL	DelayStart
;3
	MOVLW	b'00000110'
	MOVWF	PORTA
	CALL	DelayStart

	BRA 	Start
DelayStart
	movlw	0xff
	movwf	d1
Delay_0
	DECFSZ	d1
	goto	Delay_0
	return

	END
 
Last edited:
hi atom,

If you want to easily try different delays you can connect a 10K pot from +5V to 0V, wiper to a ADC inp on the PIC.

Read the pot/ADC and load the delay register with ADC value.

To get realistic delays, multiply the ADC value by say 100 and then add 50 before you load the delay register. Vary the pot in order to change the delay.

IIRC the motor has 4 wires, how are you connecting the 3 phases.???

This jpg is the output from your program on Oshonsoft.
 
Last edited:
atom, if that motor is similar to the one i'm doing tests with .. i noticed following, when delay is too low it will produce "squealing sound" but will not turn, if you then spin it with your finger it will "hold on" and start spinning on it's own ... if delay is too high it will uncontrollably spin back/forth ..

anyhow, the hdd drives (I tried 3 different ones) have no torque .. there might be some way to use them (if someone give the idea I would love to try too) but I personally gave up some time ago as, at low speed when you stop it, it will continue to spin when you "let it go" but on high speed, it will not restart so you need some encoder to check the spinning and restart from low speed .. and as light touch is enough to stop it at "usable" speeds, I discontinued idea of using them for anything ...

(btw, the "no torque" might be due to "wrong driving" .. the way I managed to drive my motor was believing it is variable reluctance .. as people explained it is not, so, maybe it should be driven differently... also, maybe someone should tell if 5V is enough, I used in my test uln2003 to drive it but iirc i managed later to turn it directly from pic when I got the timing right... one more thing, one of the 3 motors I tried was 12V and not 5V driven)
 
Last edited:
From my experience in the HDD industry I can tell you that starting and running a brushless DC motor at a constant speed is going to be a tall order. You need to ramp the velocity up to a steady state. A typical speed range is 4000 - 10000 rpm. Different manufacturers have different spin-up times and things may have changed but 15-30 seconds for the spin-up would not surprise me.

There is one other thing that puzzles me. We used Hall-effect sensors to detect the rotor position so we could fine tune the rotation speed and also know where to start the phase sequence. As you might know changing the speed of the platter changes the effective density of the bits by compressing or expanding the time the bits are under the read head. I've heard that you can use back EMF sensing, but we never thought that it was reliable enough for our purposes. There was just too much noise that could not be effectively filtered.
 
From my experience in the HDD industry I can tell you that starting and running a brushless DC motor at a constant speed is going to be a tall order. You need to ramp the velocity up to a steady state. A typical speed range is 4000 - 10000 rpm. Different manufacturers have different spin-up times and things may have changed but 15-30 seconds for the spin-up would not surprise me.

There is one other thing that puzzles me. We used Hall-effect sensors to detect the rotor position so we could fine tune the rotation speed and also know where to start the phase sequence. As you might know changing the speed of the platter changes the effective density of the bits by compressing or expanding the time the bits are under the read head. I've heard that you can use back EMF sensing, but we never thought that it was reliable enough for our purposes. There was just too much noise that could not be effectively filtered.


The radio control electric airplanes have been using 3 phase brushless motors for years. At the very first the motors were using hall effect sensors but that was soon dropped in favor of motor controllers that utilized back EMF sensing and it works very good. These motors are very efficient and quite powerful. Not sure if the control is stable enough for jitter free control that hard drives would need.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top