I'm following this tutorial to build a 3-axis gimbal using Arduino. In 'Step 6', the author describes how to rotate a Brushless Motor using an Arduino Uno and the following code:
// Driving 3-phase Brushless DC Motor with Square-wave
// This sketch is based on the code for the stroboscope project by eLABZ.
// (http://elabz.com/bldc-motor-with-arduino-circuit-and-software/)
// Copyright (C) 2015 ArduinoDeXXX All Rights Reserved.
const int motorDelayActual = 150;
const int motorPin1 = 9;
const int motorPin2 = 10;
const int motorPin3 = 11;
const int motorPinState[] = {1, 1, 1, 0, 0, 0};
int currentStepA = 0;
int currentStepB = 2;
int currentStepC = 4;
long lastMotorDelayTime = 0;
void setup () {
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
pinMode(motorPin3, OUTPUT);
}
void loop () {
if ((millis() - lastMotorDelayTime) > motorDelayActual) {
currentStepA = currentStepA ++;
if (currentStepA > 5) currentStepA = 0;
if (currentStepA < 0) currentStepA = 5;
currentStepB = currentStepB ++;
if (currentStepB > 5) currentStepB = 0;
if (currentStepB < 0) currentStepB = 5;
currentStepC = currentStepC ++;
if (currentStepC > 5) currentStepC = 0;
if (currentStepC < 0) currentStepC = 5;
lastMotorDelayTime = millis();
analogWrite(motorPin1, 254 * motorPinState[currentStepA]);
analogWrite(motorPin2, 254 * motorPinState[currentStepB]);
analogWrite(motorPin3, 254 * motorPinState[currentStepC]);
}
}
// Copyright (C) 2015 ArduinoDeXXX All Rights Reserved.
The wires from the motor connect directly to pins 9, 10 and 11.
In '[Documentary (5)]', the author tests a circuit using a motor that has 12 coils and 14 poles (model GBM3506-130T).
When I recreate the circuit using a different motor that has 24 coils and 22 poles (model BGM4108-130), no rotation is observed. A slight vibration can be heard but there is no discernible movement in either direction.
When I add an additional power source (9V battery) the same result is observed, except the vibration is louder.
Is there anything else I need to consider when using this particular model of motor?