完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我刚刚购买了SparkFun步进电机1568-1105-ND和BigEasy驱动器1568-1066-ND,并将它们连接起来(见附图)一个Arduino Uno,带有24v 5A电源,用于电机和USB电源供UNO跟随
Big Easy Driver用户手册v1.2(电路板是v1.6a)说明。 我将trimpot Vref设置为.29v(电机规格为每个线圈0.33A)并运行手册中提供的脚本。 所有LED指示电源但没有移动。 然后,我尝试使用BigEasy Hookup Guide的方法,通过从OFF开始调节微调电位器并慢慢将其调高,直到从电机移开。 没有动静。 电机加热至约49℃,BigEasy板温和升温。 我在这里想念的是什么? 以上来自于谷歌翻译 以下为原文 I just bought the SparkFun stepper motor 1568-1105-ND and the BigEasy driver 1568-1066-ND and hooked them up (see attached photos) to an Arduino Uno with a 24v 5A power supply for the motor and USB power for the UNO following the Big Easy Driver User Manual v1.2 (the board is v1.6a) instructions. I set the trimpot Vref to .29v (motor spec is .33A per coil) and ran the script supplied in the manual . All LEDs indicated power but no movement. I then attempted to use the BigEasy Hookup Guide’s method of adjusting the trimpot by starting at OFF and slowly turning it up until you get movement from the motor. No movement. The motor heated up to approx 49C and the BigEasy board heated up mildly. What am I missing here? |
|
相关推荐
19个回答
|
|
大多数带步进器和Arduinos的原理图使用共享接地。
这可能会导致一些沟通问题。 以上来自于谷歌翻译 以下为原文 Most schematics with steppers and Arduinos use a shared ground. This could be causing some issues with communication. |
|
|
|
@MavenScout
您可能想要尝试的一件事是切换电机的一个线圈的电线。 有时一个线圈的相位将与另一个线圈的相位对抗(特别是在微步进时,就像BigEasyDriver那样)。 因此,尝试更换电机的红色和绿色线,或蓝色和黄色。 以上来自于谷歌翻译 以下为原文 @MavenScout One thing you may want to try is to switch the wires of one coil of the motor. Sometimes the phase of one coil will fight with the phase of the other coil (especially when microstepping, like the BigEasyDriver does). So try swapping the red and green wires of the motor, or the blue and yellow. |
|
|
|
今天早上最有趣的发展。
首先我将trimpot重置为.24v。 (尽可能接近.29v) 断开Arduino的白色地面。 连接电机的24v电源,然后将USB电源连接到Arduino。 一旦电源线接触到Arduino插座,电机就会开始缓慢,抖动,任意转动。 跑完测试脚本。 在代码控制期间,电机会停止并且什么也不做。 一旦代码完成,电机就会恢复缓慢,抖动的运动。 扭转了grn / yel线索。 没有不同。 将白色地线更换为Arduino(grn / yel引线仍然反转)。 电机不会抖动或移动。 但是,我注意到,只要代码发出新的DIRection命令,电机就会向前冲一步。 而已。 怎么办? 以上来自于谷歌翻译 以下为原文 Most interesting developments this morning. First I reset the trimpot to .24v. (close as I could get to .29v) Disconnected the white ground from the Arduino. Connected the 24v power for the motor and then connected the USB power to the Arduino. As soon as the power cable touched the Arduino socket the motor started a slow, jittery, arbitrary turning. Ran the test script. The motor would stop and do nothing DURING the code control. As soon as the code had finished, the motor would revert to the slow, jittery movement. Reversed the grn/yel leads. No difference. Replaced the white ground wire to the Arduino (with grn/yel leads still reversed). Motor doesn’t jitter or move. However, I noticed that whenever the code issued a new DIRection command, the motor would bump one step. That’s it. Now what? |
|
|
|
你有没有倒转一套线圈引线?
或两者? 只应翻转一套。 以上来自于谷歌翻译 以下为原文 Did you reverse one set of coil lead? Or both? Only one set should be reversed. |
|
|
|
|
|
|
|
好。
看看上面的第二张图片,交换黄色和蓝色,并将绿色放回原处。 订单为黄蓝绿红(从上到下)。 以上来自于谷歌翻译 以下为原文 Ok. Looking at the second picture above, swap yellow and blue, and put green back where it was. The order would be yellow-blue-green-red (from top to bottom). |
|
|
|
这变得疯狂了。
相同的抖动电机,但脚本的选项2和4(2 = ReverseStepDefault,4 = ForwardBackwardStep)导致电机完全停止,直到子程序完成,然后抖动重新开始。 以上来自于谷歌翻译 以下为原文 This is getting crazy. Same jittery motor, but option 2 and 4 of the script (2 = ReverseStepDefault, 4 = ForwardBackwardStep) cause the motor to stop completely until the subroutine is done and then the jitter resumes. |
|
|
|
一张图片胜过千言万语…
https://youtu.be/WXD3c5G8gmI 以上来自于谷歌翻译 以下为原文 A picture is worth a thousand words… https://youtu.be/WXD3c5G8gmI |
|
|
|
|
|
|
|
|
|
|
|
@MavenScout
谢谢你的视频。 这有帮助。 第一:确保你在Uno和Big Easy Driver之间有一个共同点。 来自Uno的信号可能被Big Easy Driver上的A4988芯片误解,没有接地参考。 第二:尝试切换黄色和蓝色线。 根据连接指南,接线如下: A +→红线 A-→绿线 B +→蓝线 B-→黄线 电路板上的插头连接如下: 第三:尝试改变指南中的代码,以便在步进引脚的数字写入之间存在稍长的延迟,至少在您知道可以使其工作之前。 有时步进信号太快,电机无法赶上变化的电场。 所以任何地方都有延迟(1); 你可能想把它改成延迟(10); 以上来自于谷歌翻译 以下为原文 @MavenScout Thanks for the video. That helps. First: make sure that you have a common ground between the Uno and the Big Easy Driver. The signals coming from the Uno can be mis-interpreted by the A4988 chip on the Big Easy Driver without a ground reference. Second: Try switching the yellow and blue wires. According to the hookup guide the wiring is as follows:
|
|
|
|
如果您查看我的OP中的第二张图片,它就是它所在的顺序。您在第一个回复中建议尝试连接当前连接的图片。
正如我所报告的那样,每个都没有任何区别。 更不用说Digikey和其他人的文档说明线圈没有极性,并且它与它的连接方式无关紧要。 新手非常困惑。 此外,由于逻辑上的原因,以及Digikey自己的指南建议,我最初有一个共同点,因为许多来源状态是最佳做法。 但是,Robert_Fey上面提出这可能是问题所在。 并且,一旦断开,电动机开始起作用,尽管不规律。 再次,非常混乱。 所以现在我将尝试调整代码中的时间并揭示发生的情况。 祝我好运。 以上来自于谷歌翻译 以下为原文 If you look at the second pic in my OP that is the order it was in. You suggested in your first reply to try wiring it as it is currently connected. Each of which made no difference, as I reported. Not to mention that the documentation here on Digikey, and others, state that there is no polarity for the coils and that it doesn’t matter how it’s hooked up. Very confusing for a novice. Also, I originally had a common ground connected as many sources state is best practice, for logical reasons, as well as Digikey’s own guide recommends. However, Robert_Fey suggested above that this may be the problem. And lo and behold as soon as it was disconnected the motor began to function, albeit erratically. Again, very confusing. So now I’ll try adjusting the timing in the code and reveal what happens. Wish me luck I guess. |
|
|
|
改变代码中的DELAY()时序什么都不做。
现在我考虑一下这是有道理的。 一旦Arduino上电,就会开始飘忽不定的移动。 在用户从菜单中选择一个选项之前,脚本不会尝试控制电机。 一旦进入1,2,3或4,电机就会停止! 然后在子程序完成后立即恢复它的不稳定运动。 为什么电机在脚本加载之前试图运动,更不用说没有试图引导电机做任何事情。 只有在将电源应用于Arduino时,电机才会在向驱动器供电时尝试移动。 更不用说,只要你让司机和Arduino接地,一切都行不通! 步进电机本身就有这种困难吗? 有数百个网站和视频显示它只是即插即用。 但到目前为止,我的经历(这不是第一次)只不过是头痛。 我做了一些根本错误的事情,还是这只是野兽的本性? 以上来自于谷歌翻译 以下为原文 Altering the DELAY() timing in the code does nothing. Which makes sense now that I think about it. The erratic movement starts as soon as the Arduino is powered up. The script does not attempt to control the motor until the user selects an option from the menu. As soon as one enters 1, 2, 3 or 4 the motor stops! And then resumes it’s erratic movement as soon as the subroutine finishes. Why is the motor trying to motate before the script even loads, let alone has not attempted to direct the motor to do anything. The motor does not attempt to move when the power is applied to the driver, only when it is applied to the Arduino. Not to mention, as soon as you ground the driver and the Arduino, nothing works! Is this kind of difficulty indigenous to stepper motors? There are hundreds of web sites and videos showing it as simply plug-n-play. But my experience so far (this isn’t the first) has been nothing but headaches. Am I doing something fundamentally wrong or is this just the nature of the beast? |
|
|
|
一个新的启示......
如果我将电源插入电机并只需将USB插头(从笔记本电脑)触摸到Arduino上USB插座的外部,电机就会开始移动。 (?) 将跳线从BED底部的GND端子连接到Arduino上的GND,可以使一切停止。 然而,这一切都需要一个共同点。 那么将24v电源的GND与电机连接到Arduino上的某个地方会更合适/有所作为吗? 以上来自于谷歌翻译 以下为原文 A new revelation… If I plug the power into the motor and simply touch the USB plug (from a laptop) to the outside of the USB socket on the Arduino, the motor starts moving. (?) Connecting a jumper from the GND terminal on the bottom of the BED to the GND on the Arduino brings everything to a stop. Yet it all needs a common ground. So would connecting the GND of the 24v power to the motor to somewhere on the Arduino be more appropriate / make a difference? |
|
|
|
对我来说这听起来像是一个噪音问题。
你愿意将Arduino草图复制到帖子中吗? 我想验证是否所有引脚都被驱动。 以上来自于谷歌翻译 以下为原文 To me this sounds like a noise problem. Would you be willing to copy the Arduino sketch into a post? I would like to verify that all of the pins are being driven. |
|
|
|
//在Arduino上声明引脚功能
#define stp 2 #define dir 3 #define MS1 4 #define MS2 5 #define MS3 6 #define EN 7 //声明函数的变量 char user_input; int x; int y; 国家; // ================================================ ============= void setup(){ pinMode(stp,OUTPUT); pinMode(dir,OUTPUT); pinMode(MS1,OUTPUT); pinMode(MS2,OUTPUT); pinMode(MS3,OUTPUT); pinMode(EN,OUTPUT); resetBEDPins(); //设置步进,方向,微步并使引脚处于默认状态 Serial.begin(9600); //打开串口连接进行调试 Serial.println(“开始电机控制”); Serial.println(); //用于用户选择的打印功能列表 Serial.println(“输入控制选项的编号:”); Serial.println(“1。默认微步模式。”); Serial.println(“2.默认微步模式下的反向”。); Serial.println(“3。转动1/16微步模式。”); Serial.println(“4。前进和后退方向。”); Serial.println(); } // ================================================ ============= void loop(){ 而(Serial.available()){ user_input = Serial.read(); //读取用户输入并触发相应的功能 digitalWrite(EN,LOW); //将使能引脚拉低以将FET设置为有效并允许电机控制 if(user_input =='1'){ StepForwardDefault(); } else if(user_input =='2'){ ReverseStepDefault(); } else if(user_input =='3'){ SmallStepMode(); } else if(user_input =='4'){ ForwardBackwardStep(); } else { Serial.println(“输入无效选项。”); } resetBEDPins(); } } // ================================================ ============= //默认的微步模式功能 void StepForwardDefault(){ Serial.println(“在默认步骤模式下前进。”); digitalWrite(dir,LOW); //将方向引脚拉低以“向前”移动 for(x = 1; x 以上来自于谷歌翻译 以下为原文 //Declare pin functions on Arduino #define stp 2 #define dir 3 #define MS1 4 #define MS2 5 #define MS3 6 #define EN 7//Declare variables for functions char user_input; int x; int y; int state;//=============================================================void setup() { pinMode(stp, OUTPUT); pinMode(dir, OUTPUT); pinMode(MS1, OUTPUT); pinMode(MS2, OUTPUT); pinMode(MS3, OUTPUT); pinMode(EN, OUTPUT); resetBEDPins(); //Set step, direction, microstep and enable pins to default states Serial.begin(9600); //Open Serial connection for debugging Serial.println("Begin motor control"); Serial.println();//Print function list for user selection Serial.println("Enter number for control option:"); Serial.println("1. Turn at default microstep mode."); Serial.println("2. Reverse direction at default microstep mode."); Serial.println("3. Turn at 1/16th microstep mode."); Serial.println("4. Step forward and reverse directions."); Serial.println();}//=============================================================void loop() { while(Serial.available()){ user_input = Serial.read(); //Read user input and trigger appropriate function digitalWrite(EN, LOW); //Pull enable pin low to set FETs active and allow motor control if (user_input =='1') { StepForwardDefault(); } else if(user_input =='2') { ReverseStepDefault(); } else if(user_input =='3') { SmallStepMode(); } else if(user_input =='4') { ForwardBackwardStep(); } else { Serial.println("Invalid option entered."); } resetBEDPins(); }}//=============================================================//Default microstep mode functionvoid StepForwardDefault() { Serial.println("Moving forward at default step mode."); digitalWrite(dir, LOW); //Pull direction pin low to move "forward" for(x= 1; x<1000; x++){ //Loop the forward stepping enough times for motion to be visible digitalWrite(stp,HIGH); //Trigger one step forward delay(1); digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again delay(1); } Serial.println("Enter new option"); Serial.println();}//=============================================================//Reverse default microstep mode functionvoid ReverseStepDefault(){ Serial.println("Moving in reverse at default step mode."); digitalWrite(dir, HIGH); //Pull direction pin high to move in "reverse" for(x= 1; x<1000; x++){ //Loop the stepping enough times for motion to be visible digitalWrite(stp,HIGH); //Trigger one step delay(1); digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again delay(1); } Serial.println("Enter new option"); Serial.println();}//=============================================================// 1/16th microstep foward mode functionvoid SmallStepMode(){ Serial.println("Stepping at 1/16th microstep mode."); digitalWrite(dir, LOW); //Pull direction pin low to move "forward" digitalWrite(MS1, HIGH); //Pull MS1,MS2, and MS3 high to set logic to 1/16th microstep resolution digitalWrite(MS2, HIGH); digitalWrite(MS3, HIGH); for(x= 1; x<1000; x++){ //Loop the forward stepping enough times for motion to be visible digitalWrite(stp,HIGH); //Trigger one step forward delay(1); digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again delay(1); } Serial.println("Enter new option"); Serial.println();}//=============================================================//Forward/reverse stepping functionvoid ForwardBackwardStep(){ Serial.println("Alternate between stepping forward and reverse."); for(x= 1; x<5; x++){ //Loop the forward stepping enough times for motion to be visible//Read direction pin state and change it state=digitalRead(dir); if(state == HIGH){ digitalWrite(dir, LOW); } else if(state ==LOW){ digitalWrite(dir,HIGH); } for(y=1; y<1000; y++){ digitalWrite(stp,HIGH); //Trigger one step delay(1); digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again delay(1); } } Serial.println("Enter new option"); Serial.println();}//=============================================================//Reset Big Easy Driver pins to default statesvoid resetBEDPins(){ digitalWrite(stp, LOW); digitalWrite(dir, LOW); digitalWrite(MS1, LOW); digitalWrite(MS2, LOW); digitalWrite(MS3, LOW); digitalWrite(EN, HIGH);} |
|
|
|
顺便说一句,Big Easy Driver Hookup Guide中缺少resetBEDPins()。
我能够谷歌并找到一份副本。 以上来自于谷歌翻译 以下为原文 BTW the resetBEDPins() is missing from the Big Easy Driver Hookup Guide. I was able to Google it and find a copy. |
|
|
|
关于硬件设置的一些注意事项:
MavenScout: 如果你看看我的OP中的第二张图片就是它的订单。 这不准确。 您的原始图片显示(从上到下)B-Y-G-R。 建议将其连接为B-Y-R-G。 看起来你现在已经纠正它与连接指南中显示的相同,即R-G-B-Y。 MavenScout: 更不用说Digikey和其他人的文档说明线圈没有极性,并且它与它的连接方式无关紧要。 新手非常困惑。 单个线圈没有极性。 但是,您应该在两个线圈之间保持一致,以便通过激励线圈产生的场将在正确的方向上。 MavenScout: 更不用说,只要你让司机和Arduino接地,一切都行不通! 缺乏动议并不意味着地面不应该存在。 正如@ReidLandsrud指出的那样,如果没有共同点,驱动程序不知道如何解释来自Arduino的电压电平。 电机移动是因为驱动器在其输入端看到未知信号,可能会随机触发输出。 没有针对此案例定义的行为。 你需要有一个共同点,才能正常工作。 如您所述,在用户选择选项之前,Arduino不会尝试控制电机。 所以在启动时,电机应该是静止的。 MavenScout: 那么将24v电源的GND与电机连接到Arduino上的某个地方会更合适/有所作为吗? 如果您有从Arduino到驱动板的接地连接,它也连接到电源的接地端。 以上来自于谷歌翻译 以下为原文 A few notes about the hardware setup: MavenScout: If you look at the second pic in my OP that is the order it was in.This is not accurate. Your original picture shows (top to bottom) B-Y-G-R. The suggestion was to connect it as B-Y-R-G. It looks like you’ve corrected it now to be the same as shown in the hookup guide which is R-G-B-Y. MavenScout: Not to mention that the documentation here on Digikey, and others, state that there is no polarity for the coils and that it doesn’t matter how it’s hooked up. Very confusing for a novice.Individual coils have no polarity. However, you should remain consistent across both coils so that the fields created by energizing the coils will be in the correct direction. MavenScout: Not to mention, as soon as you ground the driver and the Arduino, nothing works!Lack of motion does not imply that the ground shouldn’t be there. As @ReidLandsrud pointed out, if there is no common ground, the driver doesn’t know how to interpret the voltage levels coming from the Arduino. The motor moves because the driver is seeing unknown signals on its inputs that may randomly trigger the outputs. There is no behavior defined for this case. You need to have a common ground for this to work properly. As you mentioned, the Arduino does not try to control the motor until the user selects an option. So at start up, the motor should be still. MavenScout: So would connecting the GND of the 24v power to the motor to somewhere on the Arduino be more appropriate / make a difference?If you have a ground connection from the Arduino to the driver board, it is also connected to the ground of the power supply. |
|
|
|
谢谢你的帮助。
我在很短的时间内学到了很多东西。 继续。 用PID测试直流电机。 祝我好运。 以上来自于谷歌翻译 以下为原文 Thanks for the help guys. I learned a lot in a short time. Moving on. Gonna try my hand at DC motor using PID. Wish me luck. |
|
|
|
只有小组成员才能发言,加入小组>>
3475 浏览 3 评论
515浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 10:06 , Processed in 1.041010 second(s), Total 112, Slave 96 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号