How to use Arduino to control a brushless motor for camera gimbal

Hello everyone, i'm trying to create a camera brushless gimbal using brushless motor.

I did searching for a way to drive my BLDC but every document i founded are mentioned about how to control BLDC speed. I want to learn how to control BLDC direction: forward, backward; How to drive BLDC to different positions like a servo, for ex: 90 degree, 70 degree, 220 degree,...
Can anyone help me? Thanks

To reverse a brushless motor, just reverse the current at each part of the driving process.

I don't know why you would want to drive a brushless motor to fixed fractions of a rotation. For typical motors, this can't be done except very coarsely and there is so little torque available that it would appear useless. In a servo, the output of a motor is geared down tremendously so moving a fraction of a rotation at the output of the servo corresponds to many full rotations of the internal motor. Precise positioning is handled using feedback from a position sensor, usually a potentiometer. If you want this kind of functionality, it's far easier to buy an appropriate servo rather than trying to design something similar yourself (unless you want to tinker of course). You could also buy a stepper motor. Those are designed to be turned in small steps.

You can't really use a brushless motor to do the function of a servo or a stepper motor.

Brushless motors are good at running 10,000RPM or more.

Most brushless motors these days are sensorless so the ESC (Electronic Speed Controller) uses back-EMF to detect what phase needs to be energized when. At slow RPM, there is little to no back-EMF so the ESC has to "guess" and use a "canned routine" until the motor gets up to speed (several hundred RPM).

Turning a stopped brushless motor a few degrees and then stopping again might be possible if you added a quadrature encoder to the shaft, but it would be very difficult to get any accuracy (it will tend to "cog" as the magnets and coils line up) and the motor will tend to freewheel so you'll actively have to power the motor to maintain position.

To make a BLDC motor act like a servo, use an actual servo and remove the brushed DC motor and install a BLDC in it's place. Then you can use the existing gear reduction and potentiometer feedback system. Of course you'll also need to delete the servo controller IC since you will be implementing your own ESC to replace it.

tylernt:
To make a BLDC motor act like a servo, use an actual servo and remove the brushed DC motor and install a BLDC in it's place. Then you can use the existing gear reduction and potentiometer feedback system. Of course you'll also need to delete the servo controller IC since you will be implementing your own ESC to replace it.

Can you explain clearly please, how do you remove the brushed DC motor and install a BLDC inside it?

This video shows the construction of a servo:

There are some very tiny BLDCs available, less than 20mm in diameter. It should be possible to find one that fits inside a servo.

above is the link to an example of Camera Brushless Gimbal using BLDC like a servo, i think this proj has to use BLDC because a servo doesn't fast enough to react with movement of the camera

above is the link to an example of Camera Brushless Gimbal using BLDC like a servo, i think this proj has to use BLDC because a servo doesn't fast enough to react with movement of the camera

If you view the video at the youtube site, there appear to be info links under the video box.

tylernt:
This video shows the construction of a servo:

- YouTube

There are some very tiny BLDCs available, less than 20mm in diameter. It should be possible to find one that fits inside a servo.

Is it possible to replace a brushed motor by BLDC? I tried to find some information about these two and i found that we can't use a same technique to control them.

That design looks very far from optimal. Just use servos. They can certainly react fast enough. You can buy servos with all different kinds of specifications. You can even find ones that use brushless motors, but they're quite expensive and overkill for your application.

takeshi3491:
Is it possible to replace a brushed motor by BLDC? I tried to find some information about these two and i found that we can't use a same technique to control them.

Correct, you will need to use a commercial ESC (Electronic Speed Controller) controlled by an Arduino, or make your own ESC with your Arduino. Either way, you can still use the potentiometer for position feedback.

Those brushless gimbals usually come with a dedicated Controller that works on it's own. It has it's own IMU and all the arduino does is to send a tilt angle that the gimbal Controller has to keep steady.

The question how a BLDC Motor works as a servo, kept me awake for a while, some time ago.
I came to the conclusion, that all three phases must get different positive or negative PWM signals to make them tow against each other. The winding resistance must be very high to keep the current low.
With a 8 bit pwm signal on each phase the Motor can do very small and smooth steps. Much better than a servo with their inbuild deadband.

o_lampe:
I came to the conclusion, that all three phases must get different positive or negative PWM signals to make them tow against each other. The winding resistance must be very high to keep the current low.
With a 8 bit pwm signal on each phase the Motor can do very small and smooth steps. Much better than a servo with their inbuild deadband.

Ah, that's a good idea. Unfortunately most BLDCs I see have very low winding resistance (milliOhms in some cases) so this would likely require a purpose-built BLDC. But I can see how that might work very well without gear reduction (though a quadrature encoder or pot would probably still be needed for feedback).

I tried to take a look on brushless servo, wow it's very simple to solve my problem with brushless servo, but the new problem appear, brushless servo is too expensive. So anyone who has any idea about how to create a brushless servo from brushed servo or drive a BLDC like a servo by Arduino can help me?

i think this proj has to use BLDC because a servo doesn't fast enough to react with movement of the camera

Is that stated in the project? What is the rotational speed you require? There are a lot of types of servos available now that might need your specifications.

Are they "ordinary" brushless motors ? I find it hard to see how they can be driven in that way. Maybe it is actually some obscure kind of brushless stepper motor.

A stepper motor is always brushless :wink:
Think of it as a 3 phase stepper instead of 2 or 4 phase steppers.

@tylernt
If you'd like to tinker a bit with the idea, just slaughter some PC cooling fans ( eg. from old PSU )
They usually have a high winding resistance. A 12V fan would probably work directly with the 5V arduino pins, but don't take my word for it!

I don't think you'd need an encoder or anything. Just let the IMU do all the work.

Just found out which driver circuit the open-source BLDC gimbal "AlexMOS" guys are using:

Includes freewheeling diodes and current sensing.
Available in 20 pin DIP :smiley: hint

o_lampe:
Just found out which driver circuit the open-source BLDC gimbal "AlexMOS" guys are using:
L6234 Datasheet(PDF) - STMicroelectronics
Includes freewheeling diodes and current sensing.
Available in 20 pin DIP :smiley: hint

So you knew how to solve the problem with BLDC? :slight_smile: Can you take a tutorial for me?

takeshi3491:

o_lampe:
Just found out which driver circuit the open-source BLDC gimbal "AlexMOS" guys are using:
L6234 Datasheet(PDF) - STMicroelectronics
Includes freewheeling diodes and current sensing.
Available in 20 pin DIP :smiley: hint

So you knew how to solve the problem with BLDC? :slight_smile: Can you take a tutorial for me?

Sorry my friend,
I have no hands on experience with that stuff. I just gave my 2 Cents. Try out a small fan Motor from a CPU cooler, their winding resistance might be high enough to drive them directly with a arduino. Start with two phases at first. See what happens when you change PWM ratio for one phase. Use a potmeter on an analog Input to change pwm ratio on the fly.

A full test setup would have three potmeters for three phases. Find out a pattern to rotate the fan slowly.

Good luck
O_Lampe
PS: It might be necessary to switch polarity for the phases too. Then ofcourse you'have to recalculate your pwm, since the duty cycle would change too.