I am using closed loop stepper motor with motor driver. Here is my driver CS-D808. I am using this with microcontroller.
I want to stop this motor always certain location after 5 to 10 turns. I wrote a code, I am using (circuitpython).
for z in range (y):
for x in range (1600):
print(x)
enaPin.value = False
pulPin.value=False
time.sleep(0.0007)
pulPin.value=True
time.sleep(0.0007)
This code is working. It is doing what I want. I don't understand two things. My stepper motor rotate 1 turn at 200 step (I calculated, My stepper motors step angle is 1.8⁰ ). If I wrote 200 instead of 1600, it goes like 45 degree (1 turn 360 degrees.)
How can I sure 1600 is reliable and precision (so far so good, when I wrote 1600 stepper motor rotate 1 turn.) Is there another way ?
I connected motor drivers encoder pins to motors. Do I need a microcontroller to get information about the step losses or precision of the motor? or motor and driver will handle by themself ?
Motor and driver connection :