ASK AN EDUCATOR – “How do I make things move with an Arduino?”

Dr. Ew asks:

Making things move with an Arduino – How do you choose the correct size motor to drive your project? And the correct batteries or power supply to drive that motor.

Ahh…I love hardware questions!

There are a ton of ways to get your Arduino to turn a motor, but choosing the right method can get a bit tricky. In order to get started there are a few things you first want to nail down that will ultimately dictate the approach you take. (BTW there is a awesome overview on motors here)

  1. What kind of motors do you have available?
    • DC motors (High speed)
      • Brushed
        • Probably the most common and widely available. It operates by spinning a coil of wire (armature) within a magnetic field. These can create a lot of electrical noise, and unless you use an encoder, cannot be positioned. They can be driven in a variety of ways including Transistor, Relay/SSR, Darlington Array, and H-Bridge. Depending on how much torque you require to move your project you can also find some with an attached gearbox.
      • Brushless
        • A little more complicated the the brushed version. The advantage though is that brushless DC motors do not produce the same amount of electrical noise as the brushed, as they spin a permanent magnet within a controlled electromagnetic field. They can be driven using a transistor array that sequentially cycles the coils. An advantage of this process is that the motors RPM can be easily calculated based on your pulse frequency.
    • Stepper motors (Low speed, positionable, high torque at low RPM)
      • Unipolar
        • Contains a series of coils that spin a permanent magnet. Each coil is attached to a common “tap” that is typically attached to the positive side of your power source. These typically have five or six wires and in the case of six-wire motors, the two “tap” wires can be both attached to the same power source. An advantage of the Unipolar motor is that they can be driven by a transistor array, unipolar stepper driver or bipolar stepper driver and have the ability to be driven to a specific angle, allowing for accurate positioning.
      • Bipolar
        • Very similar to Unipolar steppers although their coils do not have a common tap. This type needs to be driven by a stepper driver or H-bridge as the polarity within the coil switches.
    • Servo motors (Typically low speed, positionable, high torque, can be made for continuous rotation)
      • Analog
        • Works by referencing the position of the output to the position of an internal potentiometer. This allows for very accurate positioning via the control frequency. Arduino has a very easy to use library for this. If you want to use them as a continuously rotating geared motor, you can remove the plastic stop inside the gearbox and decouple the potentiometer. This allows for bi-directional rotation as well as speed control.
      • Digital
        • Essentially the same as the analog, but often have higher holding torque
  2. How do you want to drive the motor?
    • Transistor
      • Super simple and scalable. The attached is a good tutorial that uses the infamous TIP120, although I would recommend a current limiting transistor on the base.
    • Transistor Array
      • Essentially a prepackaged series of darlingtons as mentioned above. A common one is the ULN2803.
    • H-Bridge
      • Allows for CW and CCW rotation of a DC motor. A common one is the L293D. These can also be used to drive a stepper and is a cheap alternative to a stepper driver.
    • Relay/SSR
      • Allows for isolation between your Arduino and a large electrical load. If you need to move a really big motor, these might be the way to go. These can be used to drive a DC motor both CC and CCW if you use a DPDT relay.
    • MOTOR SHIELD!
      • Preconfigured for all your needs and might be your best answer. It includes 2 H-bridges (so you can drive steppers or DC motors) as well as servo headers.
  3. And as you asked above: What is your power source?
    • Each motor comes with its own sets of requirements. The maximum operating voltage and current requirements are usually listed on the motor. If they are not, you can easily determine the current draw of your motor by picking a low voltage on your power supply…say 5V…and put a multimeter configured for current sensing in series with the supply. Observe the current draw both with no load and while stalled (stopped). This will give you a good idea as to how you would want to drive it. You could also do your calculations using the motors internal resistance. I=V/R
    • Servos can typically sometimes handle up to 7.2V which makes battery configuration easy. 6 x NiMh AA’s or 2 x LiIon packs, etc.
    • Oh and make sure you measure the power coming out of a wall-wart as they are usually wrong. Use switching supplies as they tend to be much more accurate.
I hope I have answered your question and got you moving in the right direction!

Next up is Kris with a question about diodes!

Don’t forget, everyone is invited to ask a question!

Click here!

“Ask an Educator” questions are answered by Adam Kemp, a high school teacher who has been teaching courses in Energy Systems, Systems Engineering, Robotics and Prototyping since 2005.


Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: CircuitPython 9.2.1, What is DMA, PyConUS 2025 and More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — Halloween, WiLo, and more!

Maker Business – Adafruit Daily — Checking in on Intel

Electronics – Adafruit Daily — Probe Compensation

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



1 Comment

  1. Thanks for posting this, I’m almost embarrassed at how helpful having this page in this format is.

Sorry, the comment form is closed at this time.