Let's Make Robots!

(Howto) Walz a Hard Drive Spindle Motor

an example of a driver for a brushless DC motor without microcontroller
3pulses_l293d_big.gif24.92 KB
3phase_pulsegenl293d.sch92.71 KB

This is a continuation of my blog on the same subject. Please continue your commenting here.



I am the proud owner of a stack of scavenged hard drives. I hoped to find really fast, torqueless motors inside. But instead I found myself a project for my new found 555 knowledge.

The logic chip 74164 is a "Serial In Parallel Out bit shift register" (datasheet). S1 acts as a reset button. S2 is the little white wire in the video that "boots" the sequence. Once one serial pulse makes it into the 74164, the system will maintain the sequence. When the pulse reaches the third output (red), diode D1 feeds it back to the first (green).



The motor driver is the well known L293D. The circuit with the driver is much simpler:

The EN/able pins apparently do not need pulling down to work. The three diodes D2, D3, D4 only serve to cut a tiny 0.7 V off the voltage. That keeps the current maintainable for the driver chip (rated at max. 1.0 A continues duty). I tried lowering the motor's voltage supply, but the driver would not separate the two supplies very well, when I did. It works OK when V-motor is higher than V-logic. Not the other way around.

The video lasts as long as 10 minutes. Oh, and you'd better take your sea sickness medicine! The video compression kills any details, so here is a closeup of the experiment as demonstrated.

Avenues of improvement

It has been suggested (by oddbot and robologist) that the shape of these square/block wave can be improved upon. Advantages include higher rotational speeds or power efficiency.

Also the control method can be improved a lot. Removing the need for a manual boot up and automatic ramping up of the speed.

Furthermore a decent feedback mechanism could make the driver much more intelligent. Two main alternatives remain to be inestigated: external feedback (e.g. hall effect or optical sensing) telling a processor about the state of the entire system, or internal feedback (e.g. voltage detecting on any of the motor's coils when it is not being fired) which in turn could help the exact firing of the next (round of) pulses. That could even help gradually ramping up (or down) the speed.

Practical issues

Finding the right leads. In this picture, I soldered in the wires shown. I also chose the colour coding to be like the international colour convention of traffic lights. Nothing to do with reggae or rasta.

Just as in a stepper motor, measure the resistance through the coils. In the above diagram any coil from a coloured wire to the "black center" would be a very low resistance: somewhere between 0.5 and 1.5 Ohm. You need a reasonably good multimeter (M-thingey) in order to get an accurate measurement. And some patience.

The resistance through any connection from a colour to a colour would be about twice as much.

The bottom line

You're probably better off using a microcontroller after all!

Watch this space (not the other space) for updates.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

it was a short in the 74164 that created all the problem.but i rectified it and finally it worked.first i set the clock freq. at 0.25 hz and step by step the motor started turning.

 the lm32d IC gets hot after a few seconds,how do i over come that?(i gave +5v to all v+) .how do i give the 12v the motor requires?should i give 12v to v+ of lm32d?what is the max freq of clock that i should give?


thank you.please reply.

Wow! I started to fear for your project. I was running all out of advice for yo. But this is absolutely great news. Please consider posting pictures or even video of a turning motor.

The motor driver chip I used is L293D. It is supposed to get quite hot. Just keep it well ventilated. If I remember correctly, the chip can handle up to 0.7 Ampere or even a full 1.0 A. Put your multimeter to use. Measure the current at the power source, to be sure. At 5 V I never exceeded 1.0 A (again: if I remember correctly). Only when the motor is stalling (not turning while drawing current) will you see it spike above 1.0 A. If your hard drive motor is anything like mine. You know: buyer beware!

Running more than 12V? Hmmm, first of all, check the datasheet for the driver. Check if it will feed on 12V. It has separate V+ pins for the motor power. Then make sure the 12V does not "leak back" to your micro controller. Feel free to post a new question about that in the electronics forum. You will probably get better and more answers there.

Oh, that's right: I used the L293D for just one reason: it was the only "power transistor" I had in stock. Its only function is to amplify the puny signals from the shift register.

Good work jayanth!  Keep reporting your successes please.

i studied a lot about flipflops and shift registers.Now i understand the circuit pretty well. I understood that the a bit 1 is shifted at every clock pulse to the next flipflop and the output is got at Q.the output at 5 is  fed back to 2/1 to get a loop.my circuit is kinda doing the opposite.first all the 8 led's connected to 8 outputs glow without the clock.then when i give the clock pulse.one by one the LED's start switching off.and the loop is not formed even after i spark the 2 with S2.

please tell me what to do next.I studied all about the IC's but could'nt figure out what to do.and as i see 1&2 are grounded and after i spark the 100K to 2 the circuit should give bit1 to the first flip flop and it should shift.but it can be seen from the diagram that the potential is grounded through 10k res.

Please explain that in brief..Thank you..Take your time..

i found few books lying around that have complete details about the IC.I shall study all the aspects and then get back to the circuit.
Hehe, there is actually an international symbol for "loose wire that touches stuff when I want it to", but it's more formally known as a 'flying lead'. This diagram has several small circuits on it, a few of which have a flying lead, such as the top-left circuit. The curvy line with the arrow on the end is the wire for the flying lead.
Ask a question,74 HC164s of 1 input  the low level at any time, how can let 74 HC164s of 3,4 and 5 output the high level?


i tried the circuit you have shown here but still i am not abel to get the motor to rotate, can you tell me some connections which i missed? i set the timer in astable mode, gave its o/p to pin 8, connected the switches and gave 3 o/p to the l293d driver and from there to the motor, but my 74164 is getting heated up and motor is locked but not rotating!!! can you help me with some clear circuit connection diagram!!!

First of all, this method of mine is NOT a very good one. If your really NEED a turning hard drive motor, look into other drivers. But if you are in it for the fun, keep on trying. Cause fun it is!

Did you measure the resistance between the leads into your motor? Are they the same as I described? There are different models out there.

Did you feed 5V from a battery directly into each coil of the motor? Did it twitch? It should. Did you repeat the twitching for alternating coils? That should make your spindle twitch around and round. My circuit is basically doing just that: give a short pulse to each one of the leads. One after the other and round again. But so much faster.

Does your pulse generator work? Use a very big capacitor to slow it down, so you can follow the pulse with an LED or a piezo buzzer. I used a bank of different capacitors in parallel. By adding and removing caps, I could adjust the total value of the capacitance.

Hook up LEDs to each output of the 74164. Check if they are indeed pulsing in the expected order.

About the LD293: you don't need that one. Any other way of amplifying the pulses would work. I just happened to have the LD293 and wanted to learn more about it. And I sure did. Pick transistors (BJT or FET) if you know more about those.

Did you try to feed manual pulses (just touch wires to the V+ rail) through your amplifier into the motor? Just to check if the amplification is working.

I needed to start my motor real slow and then ramp it up by decreasing capacitors. Or the motor would stall. I often hand started it like an outboard motor on a boat.

When I get home later, I will try and find that LD293 circuit. I must be able to upload a better readable version of it.


See the attached files: on e big graphic (gif) plus the same circuit in Eagle.
kun je ook gewoon een batterij op de hard drive motor aan sluiten zou je mijn een email terug sturen naar jeffrey_om@hotmail.com of je dat kan doen en hoe aleen met batterijen en die motor