Driving a Gimbal Motor with Arduino

I recently purchased three M05A 2208 80KV Brushless Gimbal Motors off of Ebay. Unfortunately there was no documentation included therefore it isn't clear on how the motors should be wired, however I believe the configuration is that the power connects into the first left pin (hole), the ground in the second, and signal in the third. (See attached image for details). I have been trying several different methods at driving the motor, last attempt is trying to drive the gimbal motors like a servo. So far, the only feedback I get from any of the motors is a quick jittery motion (spasm) that lasts a split second before it ends. Nothing happens other then that, other then perhaps a constant vibration or even a high pitch sound coming from the motor. Any idea as to how to resolve this issue would be most appreciated.

#include <Servo.h> 
int servoPin = 11; 
Servo Servo1; 
void setup() { 
   Serial.begin(9600);
   Servo1.attach(servoPin); 
}
void loop(){ 
   Servo1.write(0); 
   delay(1000); 
   Servo1.write(90); 
   delay(1000); 
   Servo1.write(180); 
   delay(1000); 
}

OP's image

Gimbal motors require a 3-phase bridge to drive them, and typically rely on an encoder or IMU to provide feedback to a PID loop driving the phase/amplitude of the output to the bridge. This is advanced motor
control, not a beginner project really. They are basically a form of AC servo motor.

Alright, is there a site that I can be addressed to that can provide some details pertaining as to how to do this exactly, or specific details on the encoder needed to do this? I definitely haven't had any experience in controlling motors in that fashion in the past.

The specific details aren't very important, the principles need to be understood. Gimbal motors are a form of multipole synchronous AC motor for low voltage. If you drive them open-loop the position is not well-controlled,
but they will turn, same as any 3-phase motor, with a 3 phase sinusoidal or trapezoidal drive.

The position feedback allows the torque to be a sharp function of angle, and thus behave like a servo motor
and hold position actively.

For feedback you need some way to measure the actual position, compare that with the desired position
(alternatively a way to directly measure the error is fine). This can then be fed into a PID loop and used to
program the 3-phase PWM to the bridge. You can control phase or both phase and amplitude.

Its best to thing in terms of vectors or phasors for this, and understand the notion of electrical angle v. physical angle.

Are you actually building a gimbal? Or did you buy those motors because they seemed cheap?

Every motor is optimised to work best at one specific speed. For a gimbal motor, that speed is zero (0). If your target speed is faster or slower than this, you might select a different motor.

If its slower than zero, that's interesting!

I would say most electric motors are not optimized for a particular speed. Size of motor is the main
constraint - larger motors tend to run slower to avoid having over-long startup times and so the bearings
last, the maximum efficiency depends on the torque load more than the speed. Gearing is used to match
speed to purpose (size and thus power of a motor is strongly correlated with torque).

I think motors tend to be optimized for efficiency, and for particular purposes, and many purposes involve
a range of speeds, but the motor efficiency isn't strongly dependent on speed.

Gimbal motors are like any other RC BLDC except the winding turns count is much higher. You could run
them stupidly fast, but it would take hundreds of volts. They are made this way to make them easy to drive at low power levels and speeds (so forecd air cooling isn't needed).

Strictly speaking a motor that holds stationary is 0% efficient as it cannot be performing work, but if all you need is holding stationary you should be buying a brake, not a motor!

Some brushed motors cannot be run backwards because the brushes are only held on one side. You are most likely to see this in fan motors. Reversible fans are quite rare.

The ones which can be reversed are obviously rated for speeds less than zero. 8)

In standard physics parlance speed does go below zero, as its a scalar quantity defined as the magnitude
of velocity (which is a vector (2D or 3D) or signed quantity (in 1 dimension)). Hence speed of light is a
(positive) constant.