Stepper motor: how to control?

Hello. I am looking to find the best way to control a stepper motor with a pixhawk autopilot. The pixhwak uses pulse width control outputs and I would like to know the best way to connect a stepper motor to one would be.

Hello,

We do not have any ready-made solution for controlling a stepper motor from pulse width signals. You might be able to make something like that using a microcontroller like an Arduino and one of our stepper motor drivers, but we do not have any examples I can point you to showing how to go about doing that.

If you post a link to the specifications of the stepper motor you want to use, I might be able to help you find a more specific stepper motor driver.

-Derrill

I was thinking of using this motor https://www.pololu.com/product/1475

None of our stepper motor drivers are rated for the 2A per phase that motor requires for it’s full torque. However, our #1477 stepper motor has the same holding torque and only draws 1A per phase, so it will work with most of our stepper motor drivers. Our DRV8825 stepper motor driver carrier is one of our more popular drivers, but you can find other compatible stepper motor drivers in the “Related Products” column on the right-hand side of the #1477 stepper motor’s product page.

-Derrill

So if I were to use the #1477 stepper motor and the DRV8825 stepper motor driver carrier, how would go about connecting that to work using pwm input

As I said previously, we do not have any examples for controlling a stepper motor with RC hobby signals. You can see how to connect the DRV8825 to a microcontroller in the “Minimal wiring diagram for connecting a microcontroller to a DRV8824/DRV8825 stepper motor driver carrier” which is on the DRV8825 product page.

You can see some Arduino example code for stepping the DRV8825 in the this blog post.

If you are using an Arduino-compatible microcontroller, you might consider looking at the Arduino’sPulse In function to see how you might get started processing your RC hobby signals. You will then need to write your own program for converting those signals into step signals that are appropriate for the driver.

-Derrill