Spindle motor
gambrino
Posts: 28
Hello forum , i would like to connect a spindle motor ( Extract from a hard disk ) to the propeller . The spindle motor has 4 wires .The +12V should be from external supply , and what about +5V ? it should be from propeller , but the propeller gives 3.3V max. should i use converters or what do you recommend me ?
Thank you in advance for your answer
Post Edited (gambrino) : 1/6/2009 10:08:29 PM GMT
Thank you in advance for your answer
Post Edited (gambrino) : 1/6/2009 10:08:29 PM GMT
Comments
-Phil
Post Edited (gambrino) : 1/5/2009 10:17:52 PM GMT
first of all: a propeller-IO-pin can stand max 30mA. The whole chip 100 mA. You rmotor does surely exceed this current.
A brushless-DC motor is something complete different from "classical" DC-motors
In "classical" DC-motors the switching of the magnetic field is done electromechanically by the "brushes"
this is done "automatically" whenever to motor is rotating
In a brushless-DC-motor (BLDC-Motor) an external electronic has to do the switching of the magnetic field
always with a certain frequency depending on the rotation-speed of the motor. The exact position of the Rotor
is detected by a hall sensor.
So first thing is to clarify what kind of motor is this.
"classical" DC-motor, BLDC-motor, steppermotor with or without encoder
best regards
Stefan
If I think over that you have four wires it might be that - if it is a BLDC the 5V is some kind of an input
for a controller INSIDE the motor.
two ideas
1.) maybe feed it with a rectangle signal varying the frequency to control the rotationspeed
2.) maybe feed it with a PWM where the ontime is related to the rotationspeed
I would start expermintating about this with a transistor like shown below.
best regards
Stefan
I'm not sure if driving it like a stepper is going to work so well, the steps are huge, 3 steps per rev, but it's an experiment worth trying.
Now I don't know what voltages are used in hard drives but 5v will make it jump.
I always thought controlling these was a tad complicated. Shouldn't the poles be driven by a sine waves 120 degrees apart in phase and synchronized to the motor position.
Spindle position can be determined by a Hall effect sensor or such. I think real hard drives use the back EMF to determine this.
The sine waves of course could be pulse width modulated DC.
I'm sure a prop can do this with some driver FETs.
What would you use it for ? These motors don't seem to be up to much apart from spinning platters at a constant high speed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Here is a document that describes brushless DC motors and their applications. One of the things it mentions is the use of Hall effect sensors for position feedback. Given that your motor has only four wires emanating from it, I wonder if these sensors have been replaced with feedback from the disk platter itself (e.g. sector boundaries). In any event, some time spent with an ohmmeter probing the motor leads would give you (and the rest of us) a lot more information to work with.
-Phil
Thanks for you PM. I have a personal interest in getting hard drive motors running as I have a stack of them (who does not?) and took it as a challenge some time ago. I thought I would reply on the forum as more people may be interested in this and together we can make it work from the Prop. Hope you don't mind.
If your motor looks like the picture you sent then I think we are talking about the same thing, brushless DC motor. Most hard drive motors I have seen recently look much the same.
I am no electronics wizard but I think with a little research and experiment we can come up with something that works, even if not the most efficiently.
First you should read the wikipedia on BLDC motors: en.wikipedia.org/wiki/Brushless_DC_electric_motor
Next microchip has an excellent series of application notes on BLDC motors here: www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1523
Now what to do? Can't be that hard, it's only coils and magnets right.
Easy way out might be to get hold of a dedicated BLDC motor controler IC like this one from Texas Instruments focus.ti.com/lit/ds/symlink/uc2625.pdf. There are many others. No idea where you would get them.
But as we like to do everything with a Propeller or two around here that seems like cheating.
I have understood that some motors like sine wave drive but I'm sure +ve DC, 0, -ve DC will drive these also, perhaps not to perfection.
So we need +ve and -ve DC supplies, say +/-12v and some way of switching them to the coils.
With that it is only necessary to program the Prop to generate the correct sequence of drive pulses.
Next we need some sensors to detect the motor position to get the drive pulse in sync. Three Hall effect devices seems to be traditional. Detecting the back EMF voltage of the "undriven" coils maybe a bit tricky.
You mention wanting to attach mirrors to you motor in the completed project. Well perhaps you could use light reflected from the rotating mirror(s) onto photo diodes as the position detectors. Did you know that LEDs also work as cheap photo diodes?
If you have the L293 perhaps you could try an experiment to drive the coils with only the positive supply. May not work so well but perhaps well enough.
Phil is right about probing the motor connections with an ohm meter. I did that once and you can easily see how the coils are connected.
@Phil: Never heard of detecting rotor position from the actual sector info, sounds like a neat idea but I'm not sure the sectors are necessarily in fixed positions wrt the motor. Soft sectors and all. I think they normally use the back EMF from the motor to do this. Which I guess the Prop could also do up to some speed limit. Sounds too hard for now.
Anyone got suggestions for the +/-12 volt drive circuitry?. Is there a chip around to do this?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I feel a youtube video coming on!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
We should be able to do better with bipolar drive, correct phasing and position feedback.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
This discussion has been very useful for me; I have no experience with brushless motors, whatsoever. If a three-coil brushless motor is stopped with a single coil left energiezed, does this mean that the rotor wil end up in one of three possible positions? How accurate would this position be (for example, plus or minus ___ degrees)?
In the absence of significant friction, is there a pressing need for feedback control to regulate the rotation speed, or would frequency control of the three drive signals be adequate?
Cheers!
Paul Rowntree
I think that if there is any load on the motor that will prevent it from actually getting to the "pole position" as it were. So the accuracy may not be good.
Also some motors may have multiple sets of coils so there may be multiple rest positions for a single active pole, if you see what I mean.
In the absence of friction the thing might just get faster and faster until something breaks !
I've been thinking about speed control. Imagine the motor is turning at say 5000 rpm under some load. The controller is commutating at the same speed and in phase. Now we increase the load. What happens? What do we do about it?
At enough load the rotor won't be able to keep up with the rotating magnetic field and the thing will stall.
Having the controller increase the commutation speed to compensate will not help, indeed the commutation should be locked to the rotor position anyway, what we need is more power delivered.
So during the "on" periods of a pole the power should be delivered in a PWM fasion, say 5KHz. If the rotor starts to slow down increase the duty cycle of the PWM.
I'd love to stick a scope on a running hard drive motor and see what a real hard drive controller does. But no scope around here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Still, I would be hoping that the speed would be stable enough from the drive frequencies in my application, and elimiante the need for feedback.
The fellow with the 555-based drive circuit was showing that the coil current was decreasing with higher speed. How is that possible? Is it an artifact of the rms calculation inside the ammeter?
Cheers!
Paul Rowntree
I would keep the PWM frequency fixed for simplicity. What's to be gained by changing it. Just increase vary the duty cycle to control speed.
Problem is a cog only has two counters. I would suggest driving the three pole signals out of three pins using software bit banging in PASM. Generate the PWM signal from a counter. Mix the PWM signal with the drive signals externally with AND gates, job done in one COG. As for Video generators I'm really not up to speed on those.
As for the 555 guy, I wondered about his current measurements as well. Starting out at over one amp at slow speed with no load sounded huge anyway. But why does it go down with speed? As you probably know a normal DC motor when stalled with excessive load consumes a lot more current than when it is running. Basically a motor is also a generator so as it spins its back EMF fights the voltage that is driving it and current is reduced. When stalled there is no back EMF.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
With no PWM control you can control the speed just by slowing the commutation period, as the 555 guy does, be careful to watch the current those coils will burn eventually.
Depends how you want to set it up. I would start my first experiments with no feed back, just variable speed drive pulses. Sadly I have no time or resources to do this. Just sitting here with ideas....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I do not understand how keeping the PWM frequency constant would affect speed, since the overall frequency on each pin would be exactly the rotational frequency, no? Unless you are refering to a loaded rotor that cannot keep up. In air with a simple DC motor I see significant changes in rotation speed vs duty cycle as I change the disk profile, so I think that air resistance is a factor for benchtop testing. In the vacuum, the problem is overheating of the motor because of no convection cooling. Plus, most motors are lubricated for in-air service, and the lubricants they use can crud up my machine.
Bit-banging the pins would work, even without the external gating It would just take a slightly rolled out loop, since only one of the three coils is active at any time. I will try this.
Cheers!
Paul Rowntree
With PWM control the duty cycle would go down to zero at zero speed. Much less current. Good.[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
The problem is that the final speed is far below what I am driving them at (target 30 Hz shaft speed, getting 6-8 Hz) It is stable to ~0.1% (watching the scope of the interrupter, or monitoring the rotation speed with a PASM cog), but clearly not locked to the rotating coil frequency. Changing the PWM frequency changes the rotation speed, but the duty cycle of the PWM seems to have no effect. The current through the darlingtons looks irregular, and only poorly corresponds to the drive signals (do I need a resistor between the prop pin and the darlington, and/or a pull up/down resistor?). SO I think that the next step is to bring in bigger guns like a TIP120 on each channel and see if it improves.
This is more complicated than I was imagining ... we will see if the improvement over a duty-cycle controlled DC motor was worth the effort.
Cheers!
Paul Rowntree
Have you tried ramping up the speed from a standstill? If you just zap it with the target frequency, you may end up with a subharmonic of that target.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Yes, I ramped up very (!) slowly. I start the cycle at what should be 3Hz ( with a 1-2-3-1-2-3 )coil sequence per rotation, then make ~30 rotations at that speed before increasing the target frequency by 1 Hz. I repeat this until it fails, usually at a slow frequency. The mass of my rotor is much less that the 2 HD platters, and is well balanced.
The motor does not start smoothly, and jerks back and forth quite a bit at first. Sometimes a gentle push is needed. As I wrote above, the power/current waveform is badly distorted wrt the PWM control signal, so I am inclined to doubt the drive circuit. I have used the ULN2803 in a quasi DC application before, but not at 5 kHz; I know that the TIP120's work well on the 3.3 control voltages, and so will try that next.
Q : Do you think that the PWM frequency should be constant (so changing the shaft frequency means fewer pulses per coil activation) or should I have a set number of cycles per activation with shaft-speed dependent pulse widths? I thought that the bare motor worked better with fixed PWM, but haven't gone back to this approach with the disk attached ...
Another issue you may encounter, since you've altered the rotational inertia of the motor/load system by removing the platters, is resonance. If your system is resonant at a certain RPM, it may be hard to get past that speed without some sort of damping. I know this affects stepper motors, and I can only assume BLDCs are similarly afflicted. Resonance is easy to recognize, as the motor will chatter or operate with more jerky movements. You can change the rotational dynamics by using a heavier load or by frictional or magnetic damping.
-Phil