0
\$\begingroup\$

Can I connect a DC motor directly to an Arduino?

\$\endgroup\$
  • \$\begingroup\$ If it's a very very small motor, yes. \$\endgroup\$ – Connor Wolf Nov 28 '10 at 13:19
2
\$\begingroup\$

No. The pins of the Arduino only can only provide a few tens of milliamps, not enough for a typical DC motor.

Pololu's line of Simple Motor Controllers lets you control motors by sending serial commands from the Arduino (you can use the NewSoftSerial library). The advantage of this method is that you can control multiple motors using a single pin on the Arduino. The user's guide for these controllers comes with example Arduino code.

You could also get a simpler product such as a motor driver, but then you would have to generate your own PWM signals and it would take more of your Arduino's I/O lines.

You're also going to need a battery or other power source; driving motors from USB power usually doesn't work because USB ports can only provide 500 mA.

\$\endgroup\$
3
\$\begingroup\$

The easiest way to interface motors to the Arduino is to use an appropriate shield, like this one.

\$\endgroup\$
2
\$\begingroup\$

You will need some extra components:

http://www.tigoe.net/pcomp/labs/lab-motors.shtml

http://www.flickr.com/photos/irisphotos/5090745217/

\$\endgroup\$
0
\$\begingroup\$

You'll need an extra chip.

For $2.35 + shipping, I was able to control two motors using the SN754410 using this instructable to wire it up. It's really easy.

\$\endgroup\$
0
\$\begingroup\$

Not really, but maybe not because it's not powerful enough. A DC motor, in general, is built such as when the commutator changes the polarity of the two halves of the coil, a short but very heavy current/voltage impulse is inducated (self-induction) that will basically burn the CMOS chips in the AVR.

If this is really a very small motor, you can avoid this current by adding an antiparallel diode between the AVR output and the ground (a so called runback diode) to short-circuit those inducated pulses, protecting the output of the chip.

\$\endgroup\$

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.