简体   繁体   English

迷你直流电机不能与Arduino Uno一起使用吗?

[英]Mini DC motor will not function with Arduino Uno?

I have tried setting my motor up using this example: http://www.dummies.com/how-to/content/how-to-spin-a-dc-motor-with-the-arduino.html 我尝试使用以下示例设置电动机: http : //www.dummies.com/how-to/content/how-to-spin-a-dc-motor-with-the-arduino.html

But the motor will not work – it is not broken, it works if I attach it directly to a battery. 但是电动机无法工作-它没有损坏,如果我将其直接连接到电池上就可以工作。 I do however hear a extremely vague clicking sound from the motor. 但是,我确实听到电机发出非常模糊的咔嗒声。

Any suggestions on what is wrong, and how to fix it? 关于出什么问题以及如何解决的任何建议? Am I missing something obvious? 我是否缺少明显的东西?

The motor name is: H30480 MOT4, Mini DC motor - 7,2Vdc / 500mA 16200rpm 电机名称为:H30480 MOT4,微型直流电机-7,2Vdc / 500mA 16200rpm

This is the code: 这是代码:

int motorPin = 9;
void setup() {

 pinMode(motorPin, OUTPUT);
}
void loop() {
 digitalWrite(motorPin, HIGH);
 delay(1000); 
 digitalWrite(motorPin, LOW);
 delay(1000);

}

And here is my setup: 这是我的设置:

设置arduino和马达

电线的特写

Im quite new to Arduino, so suggestions are much appreciated. 我对Arduino来说还很陌生,因此建议不胜感激。

Code seems ok. 代码似乎还可以。 Although i see that you power your arduino via USB. 虽然我看到您通过USB为arduino供电。 The computer limits the current to 500mA but about 50 - 80mA goes to the Arduino itself. 电脑将电流限制为500mA,但Arduino本身的电流约为50-80mA。 So you get about 450 - 420 mA for your DC motor that is not enough. 因此,对于直流电动机,您可以获得大约450-420 mA的电流,这还不够。 If you use external power for your Arduino you will probably be able to properly power the motor via the Arduino but 500mA is still a lot of current. 如果您为Arduino使用外部电源,则可能可以通过Arduino正确地为电动机供电,但是500mA仍然是很大的电流。

The best solution is to externally power the DC motor. 最好的解决方案是从外部为直流电动机供电。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM