STSPIN220 Low-Voltage Stepper Motor Driver Carrier - Setup and usage

Hi Pololu team.
I am trying to use STSPIN220 Low-Voltage Stepper Motor Driver Carrier to control my PHBL28 NEMA 14 stepper motor.

I have a question, do I have to connect STBY pin to arduino to setup the microstepping mode?
I read the datasheet, it mentioned " When the STBY pin is driven low, the driver enters a low-power mode, disables the motor outputs, and resets the translation table. We call this pin STBY on our board based on the logic of how it works, but it is a direct connection to the STBY pin on the driver. The board pulls this pin high by default."

I also use the library created by @pranav083 from GitHub - pranav083/Stepper_STSPIN220-library: Arduino based library for the low power stepper motor driver STSPIN220.
but sometime the Motor does not run precisely as the code.

If there is anyone have sample code for STSPIN220, that will be so helpful.

Hello.

You do not necessarily need to connect the STBY pin to set up the microstepping mode. As described under the “Step (and microstep) size” header on the STSPIN220 product page, the values of the MODE input pins are latched at power-up or when standby mode is released. So, instead of using the STBY pin, you could configure the microstepping mode on power up by having the MODE pins be high or low when the driver is powered. Ensuring the timing works out for that might be tricky if you just connect each MODE pin to an I/O on your Arduino, but another way to do that might be to add pull-up or pull-down resistors to each of the pins since the MODE pins are floating by default.

However, if you want to be able to change the driver’s microstepping mode of the without power cycling the driver, you will need to use the STBY pin.

Unfortunately, we do not have example code specifically for the STSPIN220, and I am not familiar with the library you linked to. In case it helps though, this blog post has a basic stepping example program that can be useful for quickly confirming that the driver works, but it does not do anything other than drive the STEP and DIR pins. So, it is probably not that useful if you are trying to work with the driver’s other features.

- Patrick

1 Like

Thanks Partrick,
You helped me a lot. I understand why my stepping motor act weird sometime now.
Problem solved.

1 Like

@Khanh how did you solve the problem. I am facing the same problem now I can not set the mode I want. On full step mode it works fine but I am not able to set 1/4 and 1/32 modes.
Could you help.
Thanks.

Hello.

Are you able to configure your driver in anything other than full-step mode?

Can you post some pictures of your setup that show the board and all of your connections? Posting a simple test program that shows your procedure for driving the MODE pins to configure the microstepping mode might be useful too.

- Patrick

Thank you for your reply.
I figured it out. It was due to confusion between the board enable pin and the chip enable pin. I thought they were the same pin until I looked at the schematic. I had tried to change the mode by pulling the enable and standby pins low, but I was actually manipulating the board enable pin, not the chip enable pin. Once I connected the chip enable pin using the jumper, I successfully changed the mode.

1 Like

I am glad to hear that you figured out and resolved the problem! Thanks for letting us know.

- Patrick

1 Like