Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

STSPIN220 and microstepping inconsistencies

Hello Pololu forums. Looking for a little bit of support and feedback for a STSPIN220 Stepper Motor Driver.

My motor: Trinamic QSH2818-32-07-006

Driver: STSPIN220

Controller: esp32 running micropython

Motor Power Supply: 12V stepped down to 3.8V with a buck converter module.

Vref: .134V (spec sheet on my motor says rated Phase Current is.67A, so far I have only had about .45A in a given coil at once according to my current clamp)

I am currently trying to get a stepper motor driver to microstep correctly, but I am finding it very inconsistent and am wondering if there are any tips or tricks, I can use to help me in the process. My application tries to get to a very specific step, and then hold that step for long periods of time. Speed is pretty much a non-issue.

To test the motors and driver I am using a laser pointer attached to the shaft in a 3d printed block. Using Micro Python REPL, I just send the stepper motor driver individual step commands in either direction, then notate how far the motor is shifting from the previous position.

I am hoping to get down to 1/64th microsteps per step, but as I have incrementally tested the apparatus, I am noticing some strange behavior I am trying to understand. While I am in 1/8 stepping mode, the microsteps can vary in distance quite a bit. They always add up to the proper amount and seem to follow a pattern, but sometimes I get a lot of movement, and sometimes just a little.

Eigth Step Mode
start 0 pretty much exactly 0, bouncy and noisy.
1r 0.6
1r 1.5
1r 2.8
1r 4.2
1r 5.1
1r 5.8 bouncy, noisy
1r 5.9
1r 6.1 bouncy, noisy
8f 0 bouncy, noisy
start 0 Moved the point down a bit under 1, this stopped the bouncy and noisy at this threshold

The left column shows the command I gave the stepper motor, with the digit being the number of steps, and r or f indicates the direction. The right column shows the distance from 0 on the tape measure. The bouncy and noisy notation seems to be when it reaches some sort of resonance point? I did not notice it on ¼ or ½ step modes.

So sometimes I get a much as 1.3mm in a microstep, and sometimes as little as .1.

Am I putting in too much current, too little, or are these just the limitations of this motor driver?

Thanks for the help.

Think I figured it out. I was not understanding that because I could set the current limit on the driver board, that meant I could use a higher voltage for my motor supply. Certainly seems alot better now, although still get the whining at certain steps, the beam is far more stable now.

Hello, Gus.

I am glad to hear it sounds like you mostly resolved the issue. As explained in the first FAQ on the product page under the FAQs tab using a higher voltage along with active current limiting causes the current to be able to ramp up faster. Mainly that will help with achieving higher step rates or being able to handle higher loads, but I am not surprised that it is also helping your microsteps be more consistent.

However, please keep in mind that while microstepping is a good way to smooth out your motor’s motion, how far each microstep moves the motor is generally not as accurate or precise as people first think. Achieving very precise position control with a stepper motor usually requires using an integrated high-resolution encoder or a high reduction gearbox that has no backlash, or both.

As for the stepper motor whining on certain steps, there are a few ways you might consider trying to address that. This thread discusses several of them, so I suggest checking that out.

- Patrick