setup leadshine DM860 bipolar driver motor on raspberry pi

微笑、不失礼 提交于 2020-01-06 05:29:10

问题


so, I want to use my leadshine DM860 bipolar driver on raspberry pi 3 and I use the guide from https://makezine.com/2014/03/19/driving-big-stepper-motors-with-arduino/ (I already try it on arduino and it's working, I use code 'Nema34_potensiometer.ino') but it didn't working. So this is the example of my code:

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

#GPIO.setup(26,GPIO.OUT)
GPIO.setup(21,GPIO.OUT)
GPIO.setup(20,GPIO.OUT)

#GPIO.output(26,True)        
GPIO.output(21,False)
#GPIO.output(21,GPIO.LOW)

microStep = 0

while True:
    GPIO.output(20,True)
    #time.sleep(1)
    GPIO.output(20,False)
    time.sleep(1)
    microStep = microStep + 1
    print(microStep)

GPIO.cleanup()

and the wiring between driver and raspberry look like this:

so, what configuration that should I do on raspberry pi? thank you

EDIT:

I change Control Signal Connector (P1) Interface, I choose Connection to PNP signal. It's seems that between arduino and raspberry pi has different way how they give a power and signal wave to every sensor/device that connect to their GPIO pin or I/O pin


回答1:


I change Control Signal Connector (P1) Interface, I choose Connection to PNP signal. It's seems that between arduino and raspberry pi has different way how they give a power and signal wave to every sensor/device that connect to their GPIO pin or I/O pin



来源:https://stackoverflow.com/questions/52496582/setup-leadshine-dm860-bipolar-driver-motor-on-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!