Let's Make Robots!

(Howto) Walz a Hard Drive Spindle Motor

an example of a driver for a brushless DC motor without microcontroller
AttachmentSize
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.

8ik

 

Comment viewing options

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

i built the clock input and connected it to the IC74164 but the three LED's after the 74164 didnt glow.Are there any other connections in the circuit other than the ones in the schematic?(i started building circuits very recently and without the complete design it's hard for me to figure out any connection left out)

so,can you please post the remaining connections (if any),and what is the value of v+ that you recommend.(i set V+ to 5v and did'nt give any potential to Vcc of the IC)

 

Your questions are not very specific. And I could not possibly guess what you're doing different. Also, you must understand that a circuit diagram is never a recipe for success. See it more like a road map where you have to navigate yourself. No road map will ever teach you East from West.

BTW 5V is about right. I can never tell the difference between VCC and VDD. Don't lure me into burning your components as well as mine.

Perhaps you could show us your circuit. In a diagram perhaps. Drawing your own is a very valuable way to learn electronics. Diagramming is the first language of engineers.

My project consists of three major circuits. Each with their own diagram.  You can combine them like I did, or replace any of them with your own inventions. I am not sure which connections you left out. An LED not glowing could mean anything. Start with your clock. Replace the values of C and R in the tank circuit to slow it down. Now you should be able to see with the naked eye how the signal is pulsing. Use a voltmeter or an LED or a buzzer. Experiment with different values to speed up or slow down the pulse.

But if this is your very first time with electronics, I can only give you this advice: start small. Smaller even than a 555 timer. Make the LED glow without smoke. And enjoy.

schematici don't have a software to draw schematics right now,so i drew one in good old MSpaint.please tell me if there are any mistakes.I also removed the switch after 100K.is it okay as it is used to "boot".plz help.

schematic

hope the image is not annoying

Your schematic looks like an exact copy of mine. So I trust it.

The booting "switch" is important. By making a brief contact, you bring the counter loop to life. I used a loose wire from R77 to pin 2 on the 74164.By briefly touching the contact, the sequence would begin. I drew a proper (momentary) switch in my circuit because I do not know the international symbol for "loose wire that touches stuff when I want it to".

I hope you find the patience to try this with a slow clock pulse, so you can follow the results with your own eyes. Two or three pulses per second or slower even.

I am now trying to decrease the frequency and trying to get it blinking.it's a lot of fun just like you said.I also saw in one of your diagrams that the input is sine wave.so instead of square wave can the input be a sinsoidal one from an oscillator?will it work?and what is the max RPM i can get with the circuit.

My diagram with the Sine waves was just guessing whether a Sine output (directly into the motor) would be an improvement. I did not try it out.

But to entertain your slightly misguided question: I suppose it might work. The bit shifter was not designed to work off a sine, but it's just another chip reading another voltage level. How fast it changes from low to high does not matter (much). Again: I never tried it. I also do not believe that my 555 timer setup produces perfectly square waves either.

The max RPM? I never measured it. I'm sure I never reached the full potential of these motors. In case you missed in the other comments, my circuit sucked. It did not work. The fact that I got any RPM out of it was a small miracle. This is why they sell expensive drivers for brushless motors at hobby RC stores. They're often called "brushless ESC" for Electronic Speed Controller.

this is what happened:

1)the clock is perfectly working.i could get a very low frequency.

2)i did all the connections to IC74164.i set V=+5v,and grounded the 7th pin(not shown in the diagram).connected an LED to 4th pin and grounded the other end.i switched on the power supply and the LED started glowing.then i gave the clock pulse and exactly after the clock pulse led stopped blinking the LED in IC74164(4th pin) stopped blinking and never turned on again,even after 2 min.

What might be the problem?

 

I can only guess.

Maybe your circuit only worked once, without looping. The diode provides the closing link in the circle.

Maybe your circuit lit up the LED before it started receiving a clock signal. The the clock switched it off.

Maybe you forgot to "boot up" the sequence. Without that very first "spark" on the register's input, it will not begin to loop.

"Maybe your circuit lit up the LED before it started receiving a clock signal. The the clock switched it off"

this is what exactly happened,I switched on the power supply and even without the clock being fed the LED was ON and after the clock LED turned ON and OFF and ON the 74164 LED stopped glowing and did'nt turn on even after i did the boot up sequence.(for the boot up sequence i connected a simple switch and clicked it a few times and finally.is it the right way to do it??).i even clicked the other switch but it had no effect.what might be the problem?hope i'm not troubling much.

 

first i left the above message and started working on the circuit.by mistake i removed the ground connection in 74164(pin 7) and suddenly the circuit worked.but when i connected the other two LED's they all started blinking at the same timeas the clock and not one after the other.i even tried the boot sequence,but still no effect.please help.