• 已解决 73482 个问题
  • 已帮助 5993 位优秀工程师

arduino和tb6600驱动器控制步进电机,想实现正反转

10a逝 2018-03-21 浏览量:5304
有arduino和tb6600驱动器,目前自己的接线方法及程序无法实现正反转功能,出现电机锁死的情况,求程序及接线方法。
0 0 收起

我来回答

上传资料:
选择文件 文件大小不超过15M(格式支持:doc、ppt、xls、pdf、zip、rar、txt)
最佳答案
  • 接线图和程序如下:





    #include <AccelStepper.h>
    
    
    // Define a stepper motor 1 for arduino 
    // direction Digital 9 (CW), pulses Digital 8 (CLK)
    AccelStepper stepper(1, 8, 9);
    void setup()
    {  
      // Change these to suit your stepper if you want
      stepper.setMaxSpeed(1000);//1100
      stepper.setAcceleration(1100);
      stepper.moveTo(2000);
    }
    
    void loop()
    {
        // If at the end of travel go to the other end
        if (stepper.distanceToGo() == 0){
          stepper.moveTo( -stepper.currentPosition() );
        }
        
        stepper.run();
    }
    • 发布于 2018-03-21
    • 举报
    • 评论 2
    • 0
    • 0
10a逝 回复了 hayden:电机通电是震一下,但是不转动,什么原因 回复
电子老工程师 回复了 :封装: SOT-523 品牌: DIODES(美台) 型号: DMN601TK-7 回复

其他答案 数量:4
  • Direction端为低电平时,电机正转,Direction为高电平时电机反转​
    • 发布于2018-03-21
    • 举报
    • 评论 0
    • 0
    • 0

  • 接线:
    12V电源适配器正负极分别接驱动器VCC和GND
    步进电机黑绿红蓝线分别接驱动器的A+、A-、B+、B-
    Arduino的D5接驱动器PUL+
    Arduino的GND接驱动器PUL-

    参考程序
    http://blog.csdn.net/jim_cheng_0_0/article/details/78507029
    • 发布于2018-03-21
    • 举报
    • 评论 1
    • 0
    • 0
电子老工程师 回复了  :16位MCU 没有替代型号。 回复

  • T6600也是获取主机的PWM波进行调速,只要开启Arduino的PWM引脚就可以用了。电机锁死应该是频率过高或者电压不够。

    • 发布于2018-03-30
    • 举报
    • 评论 1
    • 0
    • 0
电子老工程师 回复了  :封装不一样,STPS2L40U:SMB,STPS2L40UF:SMBflat,见附件 回复

  • 控制direction高低电平,就可以控制正反两个方向了
    • 发布于2018-06-21
    • 举报
    • 评论 0
    • 0
    • 0

相关问题

问题达人换一批

arduino和tb6600驱动器控制步进电机,想实现正反转