Trying to get gimball motor with encoder to spin

Example - Basic - Hookup Guide - TMC6300 BLDC Motor Driver

Hi! I am Emily, and I am following this guide to get my 12V gimball motor with encoder to spin. Currently, I started using the code as is, and it didn’t work. I am trying to figure out where I am going wrong. Voltage supply is currently at 12V. When I upload the code Tx turns grren adn Rx turns orange, and the TMC6300 is lit up half blue and half red, but the gimball motor won’t spin. I am using the qwiic connector for the motor, which I believe is the right course of action. I just don’t know what to do.

Share some photos of the setup/wiring

I cut off the connector on the gimbal motor and soldered it to holes U, V, and W. I did white to U, red to V, and black to W. I used to hook-up guide for the redboard plus connections.

It’s a bit confusing, as the guide has the power/wiring instructions separated, but you’ll want to supply 2-11v to the VIN/GND on the top right Hardware Overview - Hookup Guide - TMC6300 BLDC Motor Driver in addition and re-test

I made the change, and it is still not working. There is no current draw.

Are your hookup wires soldered to the board or just passing through the holes and into the breadboard? If just passing through the holes, this is a big part of the problem.

You really should solder some male header pins to the board so it plugs into the breadboard then connect the hookup wires to the breadboard.

I have officially soldered every possible connection to the TMC6300. It still isn’t working. I am using the following code, which is the suggested example code. Maybe its the wrong code for the gimbal motor w/ encoder (ROB-27478). I am genuinely at a loss at this point. And at a loss for how to troubleshoot. I started testing the board pins and they were working great. Then I tried to connect LEDs to the U,V, and W ports with LEDs in both direction and a resistor between each port, and that gave me really weird results where sometime 3 LEDs lit, sometimes 1, and sometimes none. I think this is because of the PWN connections no sending the traditional signal that an on/off LED diode expects, so I’m not too worried there. I’m just really confused on what to do next. The motor should be running without me having to input any commands right? AI is telling me to switch to a 3PWN controller.

CODE I AM USING - it’s the example code.

"// 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));

BLDCDriver6PWM driver = BLDCDriver6PWM(5, 6, 9,10, 3, 11);

// Stepper motor & driver instance

//StepperMotor motor = StepperMotor(50);

//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6, 8);

//target variable

float target_velocity = 2;

// // instantiate the commander

Commander command = Commander(Serial);

// void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }

// void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }

void setup() {

// driver config

// power supply voltage [V]

driver.voltage_power_supply = 6;

// limit the maximal dc voltage the driver can set

// as a protection measure for the low-resistance motors

// this value is fixed on startup

driver.voltage_limit = 2;

// pwm frequency to be used [Hz]

// for atmega328 fixed to 32kHz

// esp32/stm32/teensy configurable

driver.pwm_frequency = 32000;

driver.init();

// link the motor and the driver

motor.linkDriver(&driver);

// limiting motor movements

// limit the voltage to be set to the motor

// start very low for high resistance motors

// current = voltage / resistance, so try to be well under 1Amp

motor.voltage_limit = 2; // [V]

// open loop control config

motor.controller = MotionControlType::velocity_openloop;

// init motor hardware

motor.init();

// add target command T

// command.add(‘T’, doTarget, “target velocity”);

// command.add(‘L’, doLimit, “voltage limit”);

Serial.begin(115200);

Serial.println(“start”);

Serial.println(“Set target velocity [rad/s]”);

_delay(1000);

}

void loop() {

// open loop velocity movement

// using motor.voltage_limit and motor.velocity_limit

motor.move(target_velocity);

// user communication

command.run();

}"

Share some close-up photos of the soldering/wiring please, that’s the most likely culprit

It does not work to poke jumper pins through PCB solder pads, as this picture suggests you did.

Redo the wiring after soldering male header pins to the PCB and either insert those pins into the breadboard or use female jumper connectors to make the connection between the Arduino and motor driver board.

Also redo the motor wiring to the PCB, it is a disaster waiting to happen. If those bare wires come loose or short together while the board is powered, the motor output drivers will be destroyed. (It is possible that they have already been destroyed by an accident.)