Sparkfun Brushless Gimbal Motor Driver, Sparkfun Gimbal motor, and Teensy 4.1

There’s a pic of the driver for reference

That wiring seems correct to me.

In this case the following signals should have the same polarity: PWM_A[0], PWM_A[1] and PWM_A[7]
and these ones should have the same polarity: PWM_B[0], PWM_B[1], PWM_B[7].
And these two groups should have opposite polarity to each other.

The three pairs PWM_A[0], PWM_B[0] ; PWM_A[1], PWM_B[1] and PWM_A[7],PWM_B[7] these pairs should always share the same duty cycle. But the duty cycle can be different between the different pairs.

In your picture we see three signals that look in-phase. These are then presumably either PWM_A[0], PWM_A[1] and PWM_A[7] or PWM_B[0], PWM_B[1] and PWM_B[7] ?


The signals in the image are actually the outputs of the driver (U,V,W), seen on the right side of the board.

Experiment with 2 rads per second, not 200. Check everything at every stage to see it’s operating the way you are hoping and you will isolate the problem far faster than trying to get a quick solution through the forum, at last that usually works for me…

Ok, so at that level the picture looks ok to me. If you zoom out further we should be able to see if the pattern matches what we’d expect to get from a working commutation…

The problem if I understand correctly, is that the motor simply won’t move, and you’ve now tried 3 different MCUs?

The driver is outputting PWM, so this actually seems ok.

You don’t perchance have another motor to try out with?

And the code is still the one from above?

I’m a little confused why you wouldn’t see any motion at all… that’s quite weird.

Hey guys,

I’ve gone through the Teensy code and we have a bug in the code. It has been corrected in the dev branch

The issue has arised due to multiple changes in the low-level API as the 6pwm for teensy boards was added the last, the pwm writing function was did not comply with the new api and was never called. Making the driver stuck in the initial position (all the phases at half of the duty cycle).

So if you use the dev branch library this issue should be removed.