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):
        enaPin.value = False

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 :

enter image description here

  • 1
    \$\begingroup\$ or motor and driver will handle by themselves I would hope so if the driver accepts encoder inputs. It would be a [poor] driver if it accepted feedback signals and not use them for anything. [Edited by a moderator.] \$\endgroup\$
    – DKNguyen
    Commented Feb 23, 2022 at 14:34
  • 1
    \$\begingroup\$ What is the DIP-switches configuration? \$\endgroup\$
    – Antonio51
    Commented Feb 23, 2022 at 19:02
  • 1
    \$\begingroup\$ @Antonio I am using first 5 switch on (default mode 1600 steps ). Thanks to you. I tried my code with 800 steps, It went 2 turn. Thank you i solved my code problem thanks to you. \$\endgroup\$ Commented Feb 24, 2022 at 5:07
  • 1
    \$\begingroup\$ tlfong01 , I read this. It says No loss of step , No torque reservation etc. So is this motor and driver do it without need anything ? If they do themself, should I use auto tuning switch on ? One more question , pend+ pend- pins 5-24 V output signal. So can I use them for information with my microcontroller ? \$\endgroup\$ Commented Feb 24, 2022 at 5:10
  • 1
    \$\begingroup\$ Yes, I'm wondering about this. And also I want to ask can Pend+ Pend- (5-24V might damage mcu ) pins supply feedback to mcu ? \$\endgroup\$ Commented Feb 24, 2022 at 6:03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.