4

I am trying to connect a Dagu DG01D motor to my Arduino Uno. First I tried connecting the black wire to GND and the red wire to digital pin 7. My code:

void setup() {
  pinMode(7, OUTPUT);
  digitalWrite(7, HIGH);
}

void loop() {
}

When I connected the motor, it wouldn't turn, but would rotate a little when turned in one direction. However, when I connected the red wire to 3.3V or 5V, the motor turned quickly as expected. Why didn't writing HIGH to pin 7 work?

I already verified that I can connect and run code on the Arduino by turning on the LED by replacing pin 7 with 13. I also tried running the same code on a SparkFun RedBoard, with similar results.

  • 1
    An Arduino pin can only supply an absolute maximum of 40mA of current (20mA is recommended). As Ignacio said, your motor requires around 190mA. Use a transistor, to increase the current capability. – Gerben Sep 17 '16 at 18:38
2

No Load Current: 190mA (250mA MAX)

You're not getting that out of a ATmega328P GPIO. Use a driver instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.