Arduino Motor Workshop

From OpenCircuits
Jump to navigation Jump to search

We have scheduled this workshop see: It is still under development so you can give us your input. To give your input, you can email User:Russ_hensel.


Got a project you would like to add some motion to? Then you probably need a motor and a way to control it. Enter the Arduino, which is a great little brain for a motor. In this workshop you will learn a bit both about motors and how the Arduino can be used as a controller. At the end you should know enough to be able to add motion to your project.

A tiny bit of information on Arduino/motors:

  • Motors are generally used for rotating some part, but can also be used for linear motion.
  • Motors often need a separate power supply from your digital components.
  • You normally need some additional components between the Arduino and the motor to drive the motor, sometimes fairly complicated components.

Preparation/What to Bring[edit]

The workshop will go better if you do as much preparation as you can. Some of this is in you head, but also in your computer, and perhaps gathering some stuff. That said if you just want to walk in and absorb what you can that is ok too.

Your Head[edit]

  • If you have already programmed the Arduino it would be good to send yourself through a little refresher course of your own.
  • Think about your project and what sort of motion you want to give it.

The Computer[edit]

  • Plan to bring a laptop if you can. Any operating system.
  • Install and test run the Arduino IDE Arduino - Software

Stuff to Bring[edit]

Bring as much of this stuff as you can: I have published a wish list at Amazon [Russ Wish List] which may have components to consider.

  • Your computer ( as above ).
  • Your Arduino and cable to connect to your computer.
  • Your motor, if you have it.
  • An electronics breadboard ( we plan to have some available, but nice if you have your own, which you can also take home. We will have wires for connecting components. For information on how to use a breadboard see:
  • If you have a special driver chip for your motor bring it, and if you can a print out of the data sheet for the driver.
  • If you motor requires its own power supply bring one if you have it. We will have some.
  • Part of your project complete, you may want to bring it too.
  • Anything else you think might be useful.

Workshop Content Overview[edit]

We will work our way throught the various types of motors and how to control them, then we will apply some of the ideas using breadboarded circuits. For more info on how to breadboard see: For various motors.... you might buy see: but do not buy much unless it is quite inexpensive as the workshop may change your opinion on what is worth buying.

Servo Motors[edit]

These are easy to come by, inexpensive, and easy to control, even control many of them with one Arduino. A principle limitation is that they only turn 1/2 a turn. This is fine for moving a hand, a few eyeball, a tongue.... but not so good for driving the wheels on a robot. There are way of converting the servo to a gear-head DC permanent magnet motor which can rotate continuously.

DC Permanent Magnet Motors[edit]

Almost all motors work using magnetic fields. Typically two fields interact and push around a rotor. In permanent magnet motors one of the fields is produced by permanent magnets. The other field comes form a current in some coils. The current needs to be switched so the moving field does not ever get a chance to catch up the the permanent magnet field. This used to be done just on the rotating part with "a commutator and brushes", now we often use electronics means. Modern magnets and electronic control circuits have lead to smaller more powerful motors although the old style is still useful. These motors are"

  • Often low voltage and low current, but can be high voltage and or current ( remember voltage * current = power watts, 745 watts = 1 horse power )
  • Easily reversible
  • May be inexpensive
  • May be quite small ( the vibrator motor in a cell phone )
  • Are easy to drive, a relay or low side switch will often do. Or perhaps a relay.
  • Multiple motors on one Arduino is easy.
  • For forward and reverse you need an H bridge or similar.
  • Typically fairly high speed, but gear head versions can be slow to very slow.
  • Hack a harbor freight drill for a cheap gear head.

Brushless Motors[edit]

Modern high power dc motors. Need an electronic control. Take a look at radio control and drone parts. With an esp can be easy to control.

Stepper Motors[edit]

  • Turn a precision amount, often 1/200 of a turn.
  • Need fairly complicated control circuits
  • Unless control circuit is smart will need quite a bit of processor control.

Motors with Rotary Encoders[edit]

  • For precise control of rotation.
  • Can be any kind of motor, but often DC permanent magnet.
  • Encoder reads exact amount of rotation.
  • Control system is closed loop and should be precise.
  • Are support chips but need a lot of processor control unless chip is quite smart.

Stuff Needed[edit]

We need the following to run the workshop, here is what and where to get it.

At SCIL We Have[edit]

  • General electrioncs
  • A high speed scope
  • Fair amount of salvage components, some for give away.

Russ Can Bring[edit]

  • Some power supplies.
  • Jumper wires.
  • Transistors for low side switches

Sam Can Bring[edit]


  • Bread Boards
  • Motors ( what kind )
  • Multimeters ( but we have )

Still Need[edit]

  • More drivers??