Mechatronics > Motor Control

Help with Arduino control of an Out Runner Brushless motor

<< < (2/5) > >>

ElectroNick:
Just wanted to mention that I did find a similar outrunner BLDC motor and hooked it up to the circuit. Although it does run, I'm finding that I cannot really control the speed which is very slow - about 100~120RPM. I've got to do some calculations here - it may actually turn out that the PWM frequency is messing with the timing.

I tried to load the version of the Arduino sketch without PWM ( http://elabz.com/wp-content/uploads/2011/11/DVD_three_phase_discrete_steps.zip ) and it does control the motor much better - I could rev it up to something like 600-1000RPMs, and perhaps more can be achieved. Please  note that without ESC the motor can easily lose steps under load and that creates vibration, and the rotation does not appear smooth, at least until it gathers enough speed to get past the dead zones (the missteps in windings' commutation).  Also, the SN754410 cannot handle the power of a motor like this and gets really hot in a matter of seconds - so this can only be done as a test or perhaps to prove a point, but for any real work with this motor at any real speed you would need ESC and different components that can handle 10 times the current.

I plan to look closer into this myself, check the blog from time to time, I'll post updates on BLDC ESCs.

melonFury:
Hi there,
I've been having the same 'vibrating' problems with my motors. Unlike the spec, I'm using a similar L293D H-Bridge IC. It has the exact same pinout and it seems to be giving (almost) desired results so I assume it's ok as a stand in. I've tried playing with the base RPM value in the code and changing it between 0 and 2000, but with or without my 10k pot it doesn't seem to make any difference apart from increasing the rate at which it vibrates back and forward.

I've tried using the discrete steps code as well as the pwm version, but to no avail, both seem to vibrate just as much as each other and neither makes the motor go a full revolution.

Here's a video example of what's happening:
Also, I've tried running the motor on 4.5, 9 and 13.5v, and I've hooked up both the button and the pot to the arduino, leaving out the leds as I don't really need any flashy lights :)

Thanks in advance

ElectroNick:
melonFury, thank you for the video, it goes a long way in describing what's going on. As they say, picture is worth a thousand words; video must be worth 30,000 words per second then  :)

Anyway- regarding the vibrations. First thing first: these motors are usually fed from the +1.9V rail in the DVD drive, so there's no good reason to hook them up to 13V+. Their windings are usually between 1.5Ω and 5Ω (measuring two at a time of course) , so we're talking some serious current here - 9A is way-way too much for these little motors. They are sturdy enough to just dissipate all the extra energy as heat but increasing the voltage on the H-Bridge won't do anything useful except for making it rush past the points of maximum magnetic attraction faster than the software moves those points around the circle - it may be one of the things that's happening. I would think that if you played with the RPM  setting in PWM mode, you would be able to still catch the moment when the timing is just right despite the very high voltage but perhaps it still moves way to quick (or your potentiometer is very non-linear and you move past the desired setting too quickly).

Another thing that comes to my mind - it would behave like this when one of the three legs is not attached. I noticed it's a ribbon cable, and those can be a pain to hook up if you don't have a proper connector. Are you sure all thee windings' ends are hooked up to where they're supposed to? Since it's a ribbon cable, there are many more lines in there - there's +5V and ground, then there are three outputs from the Hall-effect sensors. Be sure that you're hooking up to the actual windings, and not to Ground, for example. Usually the winding's traces on the PCB are wider than the rest, but not always. Just verify that the resistance between all of the three ends you consider windings is the same within the 1.5Ω - 5Ω range. Perhaps it could be a different value but it has to be exactly the same between all three.

And yet another thing that could be causing it is the design of the motor itself - if it's not a 9-cog 12-poles motor, it would need a different sequence of winding's commutation. I have to say though that I've yet to find one DVD spindle motor that was not a 9-cog one but the shroud magnetization is not always easy to see. Was that a Nidec motor with 11-wire ribbon cable, BTW? I have one that looks almost exactly like that - I want to try and hook it up just to see what's happening. 
 

melonFury:
Thanks for the awesome reply :)

First of all, here's a closeup of the two motors I've been testing with, both have been taken from CD/DVD drives, and as far as I can tell they are both exactly the same.



You can see I've connected the motors via their three large connections, I've skipped the ribbon completely to avoid any shorts or dodgy connections.

As you suggested, I lowered the voltage to the motors to 2.4v (two re-chargeable AA's) but they seem to be showing the same behaviour as before, except with less force and speed. And it seems that even with no pot and a motorDelay value of 1, they still vibrate at a very high frequency, enough for the motor to emit a quiet hum. This wasn't happening before though, the vibrations were at a much lower frequency and were too sporadic to emit a steady tone.

I think what may of been happening before is that the higher voltages were pushing the motor so far that the code was switching too fast for the motor to keep up, resulting in the motor only physically turning for a small portion of the times it was told to.

Also, is the order of the connections important? e.g. Will it make a difference if I switch pin 9 with pin 10? And should I be doing anything with the Hall-Effect sensors? They seem to take up a major portion of the ribbon, which leads me to believe they might be there for more than just looks ;)

ElectroNick:
Nice photo! Yes, these are almost certainly regular 9-cog 12-poles BLDC motors just like the ones I used in my blog post. And I can see that you've soldered directly to the winding terminals, so disregard what I wrote about ribbon cable - not an issue.

The order of connection does not matter at this point - it "only" affects the direction of rotation. I assume you're trying to see them rotate in general at this point, so don't worry about the actual order of connections to pins 9, 10 and 11. 

The Hall effect sensors are very useful for determining the position of the rotor, although they aren't used in the circuit you are building. The BLDC controller you're building has no feedback whatsoever - it assumes the motor will dutifully follow the phases around and that only works for slight loads or no loads. 

The pot is actually needed because without it the delay is too small, the pot analog value read is multiplied by the standard delay, so it does play an important role. I am assuming you have one end of the pot on Gnd, the other on +5V and the wiper is connected to analog 0 input of Arduino, right?

I am actually experimenting right now with a circuit built on just 6 discrete transistors, trying to make use of back EMF to control the speed of rotation. It won't materialize tonight but I just made a video I'll post here in a moment, just to keep you posted.

So, yes, please check to pot, you do need it to be able to lower the expected RPMs to some reasonable value (approx 100RPM is where is starts working) and then rev it up to a faster spin until at some point it'll loose the synchronization again (you'll see it one the video)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version