Arduino - Motor

We are going to learn:

Motor Types

There are three types of motors widely-used with Arduino:

  • Servo motor
  • Stepper motor
  • DC motor
arduino motor

The servo motor includes two main types: 180° servo motor and 360° servo motor. In fact, most of the people understand implicitly "servo motor" to be "180° servo motor".

360° servo motor is similar to DC motor, except for no hardware driver is required.

180° Servo motor

Characteristics

  • Rotation is limited between 0° and 180°
  • Rotating direction: clockwise, counter-clockwise
  • Rotating position: can be controlled to rotate to a specific angle between 0° and 180°
  • Rotating speed: can be controlled, but not smoothly
  • Extra hardware driver: NOT required. Just control directly from an Arduino pin
  • Extra power supply: required
  • How to control: easy, just use PWM signal

Application

  • Any application that requires only to rotate a angle between 0° and 180°

Servo motor Tutorial

Stepper motor

Characteristics

  • Rotation is unlimited
  • Rotating direction: clockwise, counter-clockwise
  • Rotating position: can be controlled to precisely rotate to any angle position.
  • Rotating speed: can be controlled precisely. Furthermore, acceleration and deacceleration can be controlled precisely
  • Extra hardware driver: required
  • Extra power supply: required
  • How to control: complicated, beginners should use the library

Application

  • Automation and robotics
  • Printers, 3D printer, CNC, X-Y plotter,
  • Cocktail Machine

Stepper Motor Tutorial

DC motor

Characteristics

  • Rotation is unlimited
  • Rotating direction: clockwise, counter-clockwise
  • Rotating position: very difficult to precisely rotate to a specific angle
  • Rotating speed: easy to control how fast, but very difficult to precisely control to a specific speed value.
  • Extra hardware driver: required.
  • Extra power supply: required
  • How to control: easy, just use high-voltage PWM signal

※ NOTE THAT:

  • To control the position of DC motor, we need extra hardware, called encoder, and then use a closed-loop control method such as PID control method. This is very difficult for beginners.
  • For speed control, we can easily control how fast it is, such as slow, medium, fast, very fast, how many percent of full speed. However, To control how many rounds per second, we need extra hardware, called encoder, and then use a closed-loop control method such as PID control method. This is very difficult for beginners.
  • Some DC motors on the market has a built-in encoder

Application

  • Used to control something that needs to rotate continuously but the value of speed does not need to be specified. For example fan, pump, RC car, drill ...

※ NOTE THAT:

There are two main DC motor types: the brushed DC motors and brushless DC motors. The brushed DC motor is widely used in DIY projects

DC motor Tutorial

Arduino - DC Motor tutorial

Motor selection guide

Choosing a motor for a project depending on many factors, such as carried weight, power supply, application's characteristics...

  • If your project needs to rotate to angle position in between 0° and 180°, find a suitable 180° servo motor
  • If your project needs to precisely rotate to any position, find a suitable stepper motor
  • If your project needs to precisely rotate continuously without any position, find a suitable DC motor or 360° servo motor

Buy Motor

180° Servo motor SG90 Buy on Amazon
180° Servo motor MG996R Buy on Amazon
360° Servo motor FS90R Buy on Amazon
Stepper motor Buy on Amazon
DC motor Buy on Amazon
DC motor with encoder Buy on Amazon
Stepper & DC motor hardware driver Buy on Amazon
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.

The Best Arduino Starter Kit

※ OUR MESSAGES