Short version: I have a HDD motor I want to spin. I have the L293D chip and after hours of fiddling with code and timing, can only achieve 1200 RPM. How can I get more out of it?

Long version: I have wanted to build the HDD pov clock for a long time, and finally got the L293D chips in the mail the other day.

after hours and hours of experimenting, the most I was able to get was about 1200RPM.. and even then, if I bump or slow the motor it would often stop and just chatter.

Here are a few key things I want to mention: I glued a small neodymium magnet onto the platter. I'm using a hall effect sensor, and I'm having some kind of magnetic interference. I have the 6 steps that it cycles through for each quarter-turn and when I write the 3 outputs, I first turn off an ENABLE pin, write all 3, then turn ON the ENABLE pin. However, if I connect the enable pin [on the breadboard], it causes the hall effect sensor to trigger false, and instead of once per revolution, it triggers multiple times a rev [I'm assuming back-emf?]. So for now I just leave the enable pin alone, or tied to VCC, and the sensor works.

Oh and the other thing, I have 2 L293D's in parallel so to speak. I hooked up 1, and it was getting too hot at ~500mA, so I put another one above it and put a jumper on each pin that was being used. shared the load, not quite even but it ran cooler.

that's all I can think of.. oh here's the full code: http://pastebin.com/8bQZWcFA I switched from millisecond to microsecond delays so the comments of the code might not all be 100% correct.

the main things I'm wondering: is not shutting off the power before I switch polarities [due to interference I get when enabled] limiting my max speed? if so, if I get an infrared sensor what speed can I expect to gain?

and for the project I'm thinking of [http://www.ian.org/HD-Clock/ -- I haven't cut the slot in the plate yet] would ~1200RPM be enough for POV? I'm thinking no, because it's 20 R/second, i.e. 20 FPS, and 24 FPS is what smooth animation looks like. [it would look choppy I guess?]

  • \$\begingroup\$ is ur motor capable of doing more than 1200 rpm??? \$\endgroup\$ – Lokanath Sep 18 '15 at 12:10
  • \$\begingroup\$ Yeah, I forgot to mention the original speed is 5400 RPM hard drive. \$\endgroup\$ – Matt Sep 19 '15 at 0:15
  • \$\begingroup\$ Why are you using your analog pins for outputting? You should use your digital pins because analog pins work a little differently and may cause unintended side effects. \$\endgroup\$ – Klik Nov 16 '15 at 18:51
  • \$\begingroup\$ Also, you may be limited by your source. Depending on how your circuit is set up, it may require a higher current draw than your chip will allow. You'll need more power to turn faster. Lastly, you should check that your interrupt is set up correctly to ensure it fires exactly when it needs to. I'm not sure how you have your sensor set up, but you could just set an interrupt on the pin so when the sensor reads a value it will interrupt your code to fire the next phase in the BLDC sequence. \$\endgroup\$ – Klik Nov 16 '15 at 18:55
  • \$\begingroup\$ @Klik I don't understand. The BLDC sequence has 6 points where it changes polarity (if I recall correctly), so I don't see how i could do it like that. Also I have a bench supply with CC or CV and it was constant voltage so it should have enough current(it said 1.x amps I think, max 5A out of my supply). \$\endgroup\$ – Matt Nov 17 '15 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.