BLDC motor does't spin

I am using GBM4108H motor with my L6234. I uploaded open_loop_velocity_example, but the motor doesn’t turn. But i can feel some resistance. I am using arduino with pins 3, 5,6 and pin 2 for enable.
Here is the PCB:

Is this your own self build board?
Do you suspect hardware or software issue? Have you tried the other motor driver?

Pins look ok, perhaps share your code and board schematic?

// Open loop motor control example
#include <SimpleFOC.h>

// BLDC motor & driver instance
// BLDCMotor motor = BLDCMotor(pole pair number);
BLDCMotor motor = BLDCMotor(7);
// BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, Enable(optional));
BLDCDriver3PWM driver = BLDCDriver3PWM(3, 5, 6, 2);

// Stepper motor & driver instance
//StepperMotor motor = StepperMotor(50);
//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6, 8);

void setup() {

// driver config
// power supply voltage [V]
driver.voltage_power_supply = 12;
// link the motor and the driver

// limiting motor movements
motor.voltage_limit = 3; // [V]
motor.velocity_limit = 3; // [rad/s]

// open loop control config
motor.controller = ControlType::velocity_openloop;

// init motor hardware

Serial.println(“Motor ready!”);

float target_velocity = 0; // [rad/s]

void loop() {
// open loop velocity movement
// using motor.voltage_limit and motor.velocity_limit

// receive the used commands from serial

// utility function enabling serial communication with the user to set the target values
// this function can be implemented in serialEvent function as well
void serialReceiveUserCommand() {

// a string to hold incoming data
static String received_chars;

while (Serial.available()) {
// get the new byte:
char inChar = (char);
// add it to the string buffer:
received_chars += inChar;
// end of user input
if (inChar == ‘\n’) {

  // change the motor target
  target_velocity = received_chars.toFloat();
  Serial.print("Target velocity ");

  // reset the command buffer
  received_chars = "";



Do is D1_EN = 9 as per hardware or 2 as per software?

I suspect this is’nt the issue as you said motor was resisting.

You could try changing
float target_velocity = 1;
Perhaps you are having problems with Serial RX

1 Like

hey @Skarrob,

Have you checked that the l6234 pins are well soldered. On the image it seems like there is a lot of pins that are not connected. This might explain the issue. :smiley:

1 Like

I went through such adventures with my own board - the way to troubleshoot these is as follows:

take a deadsimple blink arduino example - drive up the en pin and blink each of the phase drive pins of the bldc driver - make sure motor is disconnected and measure the voltage on each of the phase pins using multimeter - this way you will be 100pct sure there are no issues with hardware and your pin numbers are correct. Hope it helps and good luck!