Driving a Stepper Motor at about 10rps

I am not experienced with stepper motor control. For a project I need to control a preferably small motor (small in size), not much holding torque is required and I would need it to operate at (at least) 10rps. To get started with this I ordered a Nema8 Stepper Motor and a DRV8825 Stepper Motor Driver (from a german distributor of Pololu). I succeeded in operating the Motor with the Driver and a RaspberryPI. When I wanted to increase the rotational speed I think I got to a point where the speed of sending the “step-signal” from the RaspberryPI to the driver was the limiting factor. Could this be correct?
From the DRV8825 datasheet from TI I have the information that the pulse frequence is 250kHz. Operating a motor with 200 steps and microstepping of 1/32 would mean that with that driver a maximum rotationals speed of the stepper of 250000/(32*200)=39rps should be possible. Is that right?
Do you have any suggestions with what means I can make use of the pulse frequency of the driver?
I would be great full for any advices and suggestions.
Thanks, Miriam

Hi Miriam,

Like you I am new to stepper motor drivers, so take that into consideration with my comments.

I ran into the limiting speed when driving a A4988 Pololu driver board from a Raspberry Pi 3 B. I was toggling the GPIO output pin under a software loop. Later I moved to a pin (Raspberry Pi to Pin 12 ) which connects to the Driver Board Step which is a hardware PWM pin and can create faster output pulses. You can write to the Raspberry Pi pin with a frequency which sets the output pulses per second and doesn’t require a software loop. This will toggle the Stepper Driver board Step input and create a motor step rate equal to the frequency specified above.

Unfortunately for my use I needed to know how many pulses the stepper motor had taken and evidently there’s no way to directly read how many pulses have been output by the Pi hardware PWM pin. So I’ve ordered (actually 3) a more complex stepper motor driver board the Tic500 which should allow this pulse counting requirement within the driver board.

Hope this helps,

Best,

Mike

Hello, Miriam.

Your calculation for the maximum step rate for the driver in 1/32 microstepping mode is correct, however the driver should be capable of handling higher step rates in coarser microstepping modes and it seems unlikely the driver will be the first thing to limit your speed. The generation of pulses can be an issue if you are not using a hardware PWM pin on the Raspberry Pi (which should be capable of generating pulses into the MHz range) like Mike mentions.

You should be aware that the torque available from a bipolar stepper motor decreases with rotation speed. This is caused by a limitation of the rate at which the direction of current through the coils in the motor (which are inductors) can be flipped. This forum post has more information about the maximum step rates of motors and increasing the maximum step rate of a system.

-Nathan

I am sorry for such a late reply.
By using the PWM mode on the raspberry I could let the motor spin fast enough for my purpose and also use the microstepping modes. So thanks a lot for that idea!
Now I am not using a Raspberry any more but a Wemos ESP8266, which works as well, but will probably change to a esp32 module to have more IO Pins available.
Regards, Miriam

1 Like