Outputting angle of NEMA 17 motor shaft and attached arm

Hi there,

I'm completing a final year project using a NEMA 17 motor that controls an arm that swings 180 degrees. I need to be able to display the angle the arm is at to ensure it stays within this 180 degrees. I've looked at using an encoder but was hoping there is a much simpler way to approach this? Thanks in advance.


If a stepper motor is correctly configured and not overloaded, it does not skip steps. Once you have determined the starting position, just count steps to determine the shaft angle.

At startup, most people drive the stepper to an end stop or "home switch" to set the zero position. It does not damage a stepper to drive the shaft against an end stop and stall the motor.

Thanks for your help. Would you have any recommendation for a home switch for the arm?

Sorry this is my first time on this, I think i replied to myself there. Is there any end stop or home switch you would recommend for the arm? Thanks

Try to use what ever you have to hand! or a 'microswitch' (Google that word for sources near you)

Perfect thanks very much

An opto interruptor will work. You can use the arm to break the beam.

You don't need a switch if you can arrange to drive the arm into a sturdy end stop. Just send enough steps to guarantee that the arm stalls on it.

Or you could just put in physical stops that are strong enough to stop the motor when it hits the stop at full speed. :slight_smile:

All steppers have their specific data telling how many steps they need to turn 180 degrees. Usually steppers like this use 200 steps per rev. Just send 100 pulses then.

Perfect, thanks for your help.

Thanks for your help

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.