You can salvage some nice motors out of optical drives but they can be tricky to control. That’s because brushless DC motors require carefully timed signals used in a process called Electronic Speed Control (ESC). [Fileark] built and ESC using an Arduino and has a couple of posts explaining the concept and demonstrating how it works. His test circuit uses six 2N2222 transistors to protect the Arduino from excessive current. You can see six red LEDs above which are inline with the base of teach transistor. This gives visual feedback when a transistor is switched, a big help for troubleshooting your circuit.
Once you’ve seen the videos after the break you’ll probably come to the conclusion that this is an impractical way to use a brushless motor. But it is a wonderful way to learn about, and experiment with the concept of ESC. Chances are you can get your hands on an old optical drive for free, making this an inexpensive weekend project.
[youtube=http://www.youtube.com/watch?v=ZL0YqvxwTKc&w=470]
[youtube=http://www.youtube.com/watch?v=LRZXTG6SEEM&w=470]
Very cool project. I was shocked because actually I was doing something quite similar this week. My idea was to build a small platform to teach control theory and what I do is to control a three wire computer fan from an arduino using transistors scavenged from a broken PC power supply to drive the motor and to buffer the pulse encoder signal from the fan. I should write something about this one of these days because I want to document it for the workshop. I’ll tell you as soon as I do.
“you’ll probably come to the conclusion that this is an impractical way to use a brushless motor”
Why do you think that? You don’t have to use an external controller IC, you can even remove the discrete transistors and use some uln2003 to manage all at once.
Regarding the program, it should really be written using timers and interruptions, to reduce the cpu usage to the minimum
legit
As best as I can tell, the reason why he is having so much trouble getting the motor up to higher speeds is because there’s no system for detecting the position of the rotor so he can power the next coils at just the right moment. Usually people do this by sensing the back emf generated by the coils not in use, then making the switch.
useful
I designed a shield for exactly this purpose. You can find the open source hardware and the (crude at this time) software at:
https://code.google.com/p/threephase/
I use this as a platform for developing motor control algorithms.
This is such perfect timing.
I have a shitload of these transistors lying around but haven’t been able to afford any ESCs to test out my new outrunner brushless motors.
I had a few dual H-bridges lying around from sparkfun I was going to try and program to do this, but I didn’t really have the energy to get around to it.
This is super simple, easy, and cheap.
A+++ thanks for the inspiration!
FSK tracking. Done.
What about adding transitional steps where only one coil is active ?
for example :
100000
110000
010000
011000
001000
…
the rotation should be more precise, smoother and stronger. And maybe it can fix the buggy behavior at high speed.
What do you think about that ?
It’s a bit of a cheat I suppose but the optical drive the motor came from will also have the driver chip that does the back EMF measurement. Spec sheets are often available. Have your micro interface to that device instead.
This is exactly the sort of “experimental” study that I’d like to see more of. Though not without flaws, it demonstrates the sort of results you can get without going to extreme efforts…
I’m a little surprised that the high-side drivers (+V – 2n2222 – motor) work well enough to get the motor to turn at all. Usually you use PNPs in that spot (with opposite drive voltages…)
The microcontroller used in many commercial RC ESC units is apparently an ATmega8; a processor very similar in capabilities to an Arduino (in fact, the mega8 was used in some of the earlier arduino boards.)
@Chris
That would work for a unipolar stepper, but this is a 3 lead brushless. If you only turn on one of the transistors, no current will flow through the motor.
Very cool project indeed, good sirs. I was in deep need for exactly that thing for my epic project. May the queen be with you.
@WestfW It’s just the atmega168/atmega328 (arduino) with less RAM. So, basically they are an Arduino.
The schematic is rather flawed. He should have used a different kind of drivers, PNP transistors for the high side would have been better, but they are not enough. The motor from the CD drive is actually powered form 12V in order to achieve such speeds. Feedback is also given through the hall effect sensors in the motor that are not used here, but are necessary in order to use the motor at higher speeds.
There are also no protection diodes used.
The best chance of making the motor spin correctly with minimum work would be to use the actual driver from the cdrom and control it with a micro controller.
I is a proof of concept, but it has errors. Errors which beginners will just propagate…
Its not going fast because he is going from 1ms to 0 delay. He should be using delayMicroseconds()
@bogdan: i don’t think, there are any hall sensors in a CD drive. Just like there aren’t any in an HDD (i took some SCSI-HDDs apart). They are controlled via the back-EMF which you can measure on the third rail (read: the one that is not switched to ground or VCC)
Lol @ Cat 5 cable – its so springy for wiring
@Nomad
All the cd-rom drives that i opened had hall sensors inside the motor. I suspect this has one as well and you may see that in the rather wide ribbon cable connecting to the motor(you need just 4 wires for the motor itself).
It is true you can do things with back emf, but maybe back when cd drives were made that was too complicated.
You are also forgetting that hard drives have the advantage of having to run at a single speed and the motor has a constant load.
Here is what i typically saw in cd drives:
http://www.ziva-vatra.com/index.php?aid=26&id=RWxlY3Ryb25pY3M=
I am confused at the schematic. Did he use npn transistors for both the positive a d negative rails?
@Roberto
That’s right. It woks like this too, that is not a problem. But not correctly, the motor is powered from the 5V supply which is only good for low speed/load.
Also, this trick will not work when powering from 12V.
You should use PNP transistors or P-Channel MOSFETS for the high-side. You are wasting 0,7V with those NPNs.
I did this 1-2 years ago. Sadly, we need some kind of feedback (back-emf or hall sensors) to trigger the coils. It’s have been discussed in arduino forums.
Without it the motor just drives crazy at certain speeds, I and some others tried it on several motors.
post back-emf sensors circuit
The motor did have hall effect sensors but I blew them out while figuring out which wires went to the coils so I didn’t get to play with them much!
Since we’re talking BLDC motors from CD drives, they are designed for much lower voltages than 12V mentioned above. I did some poking around an open DVD drive some time ago and I believe the motors are only energised from the 1.9V rail in the drive – there’s virtually no load once the disk starts spinning. Also, I believe they respond much better when PWM is involved else they are prone to skipping steps, especially without feedback. There’s a video illustrating the effect here http://elabz.com/bldc-motor-with-arduino-circuit-and-software/ with a very simple schematic and the Arduino code with PWM.
I was actually hoping to use one of those CD spindle motors as a sort of a 36-steps per revolution stepper. Not having much luck with that as yet tho…
404
Is there any way to run Bldc motor without ESC ? I want to run Turnigy XK1222 at maximum speed all times. I don’t want to use receiver and transmission.