Background: In my project I need to rotate a part slowly, 0-15 rpm, but with constant speed. I also want to know its position. Very little torque is required. My choices here seem to be a DC-motor or a stepper motor.
I decided to go for the stepper, because the DC-motor would require both a large gearing and an encoder. I will use an Arduino Mega for this project.
Now for the question: How do I make the stepper spin at constant speed no matter how long time the loop lasts?
I do not want the loop to pause while the stepper takes a couple of steps, but rather I want to tell it "run at this many steps/second untill I tell you otherwise." Much like you would PWM a DC-motor, and change it´s duty cycle only from time to time.
Do you have tips for motorshields/drivers that would enabel this? Or tips on what phrases to google to find answers?
Cheers
Isak