Maker Pro
Maker Pro

Stepper motor control duty cycle with Arduino

ShockingJohn

Aug 17, 2022
1
Joined
Aug 17, 2022
Messages
1
A hobby stepper and A4988 is controlled with an Arduino. The code samples on the web have step pulses typically around 1ms with a 50% duty cycle. Using a library the generated steps are about 18uS. In both cases the frequency is determined by speed and both work.

What is the right way to do this? Am I correct in guessing the A4988 builds a pulse of appropriate length based on the leading edge of the control pulse? If not the short pulses seem hardly long enough to drive anything. When I build my own code should I use 50% duty cycle or just a short pulse when a step is needed?

Thanks
 
Top