In the previous entry, we saw the criteria to consider when choosing a drive or motor to use in our Arduino projects.
Continuing with the selection guide, in this entry we will analyze the main rotary motors that we have available, with their operation, characteristics, advantages, and disadvantages.
The explanation of the operation of each type of motor will be quantitative and without equations, as going into detail on each of them would require a chapter of an electronics book. The objective is to expose in a simple way how they work and their advantages and disadvantages.
In the next entry, we will finish this series on drive selection, and we will see other types of non-rotary drives to incorporate into our assemblies.
DC Motors
DC motors are among the most common actuators. Their operation is based on the alignment of two magnetic fields.
The stator, the fixed part of the motor, has a permanent magnet that generates a magnetic field inside the motor.
Inside, we introduce a coil and circulate an electric current, which generates a magnetic field. The angular phase difference between both magnetic fields generates a torque that causes the rotor to rotate until the two magnetic fields align.
When both magnetic fields are aligned, the motor will stop. To make the motor rotate continuously, we will invert one of the magnetic fields, which requires inverting the direction of the current flowing through the coil.
For this, DC motors have contacts that feed the coil made up of a split ring that slides over electrical contacts that rub against it, transmitting electricity. The split ring connected to the shaft is called a commutator, while the sliding contacts are called brushes.
After a certain angle, the brushes will switch from one segment to the next. This causes the current in the coil to reverse. In this way, the brush-commutator assembly acts as a mechanical inverter and allows the motor to rotate continuously.
The advantage of this system is that the synchronization is always perfect regardless of the speed and torque exerted, as it is the angle of rotation of the motor that determines the current inversion. The downside is that friction results in a loss of efficiency and reduces the motor’s lifespan.
There are other configurations of DC motors. Sometimes the magnetic field of the stator is generated by a coil instead of a permanent magnet. Other times, the positions of the elements are interchanged between the rotor and the stator. It is also possible that the stator is the motor’s shaft, and the rotor is its casing.
In any of these variations, the operation of the motor is the same: to have two misaligned magnetic fields so that they rotate to align, and to use a commutator and brushes system to invert the magnetic field of one of them when they align.
In a real motor, of course, there is not just one coil, but coils made up of multiple turns. Additionally, there are often more than one coil, which increases the power of the motor without increasing its size.
On the other hand, the coils are wound around ferromagnetic cores, called armatures, which increases the power of the motor and reduces losses due to magnetic dispersion. The armatures are composed of laminated sheets insulated from each other to reduce losses due to induced eddy currents.
DC motors are available in different nominal voltages, with common values being 6V, 12V, and 24V. In terms of power, we find motors of all sizes, from just a few millimeters in length to
The motors have high rotation speeds and low torque. We can use the PWM outputs of Arduino to control speed, but this will maintain the maximum torque available. Another option is to use an external or integrated reducer (see below “geared down motors”) that reduces speed while increasing torque and precision.
To control a DC motor, we will need an amplification stage, such as a BJT transistor or a MOSFET transistor. If we also want to be able to reverse the direction of rotation, we will need a controller with a H-bridge. Although it is most convenient to use a controller like the L298N or the improved version TB6612FNG, which handles the high currents needed and includes protections against induced voltages.
DC motors have poor position control and poor speed control. Their behavior is strongly nonlinear and depends heavily on the load they bear. For this reason, they are often used with an encoder that allows knowing the position of the shaft. Some models of DC motors even integrate an encoder internally.
More information on controlling DC motors in
Geared Down Motors
A geared down motor is a DC motor that incorporates an internal reducer. This increases the motor’s torque and reduces its speed. Common rotation speeds are 60, 120, 240, and 480 rpm, among others.
It is common that some geared down motors incorporate an internal encoder. This encoder is usually applied on the high-speed side, so the precision is superior to adding an encoder coupled to the shaft.
Geared down motors are common for driving robot wheels and vehicles.
Brushless Motors
Brushless motors are another variation of DC motors that dispense with brushes as a system for rectifying current. Instead, they use electronics to perform the switching of the magnetic field.
Without brushes, brushless motors have higher speeds, lower weight, and greater durability than traditional DC motors.
Some small brushless motors incorporate the necessary electronics for their operation internally. However, larger motors require an external controller, called an ESC (Electronic Speed Controller). Some ESCs also have a BEC (Battery Elimination Circuit) function, which consists of a regulated voltage output of 5V, usually 1-3A, to power other electronics.
Brushless motors are widely used in quadcopters and other aerial vehicles. They are also used in boat propellers, fans, and, in general, in applications that require high rotation speeds.
Servo Motors
Servos are another very common actuator in robotics projects. A servo receives a pulsed signal generated by a processor, which conveys the position we want, and the servo autonomously positions itself at that position.
A servo cannot make a full rotation, with a typical range of 180º. Instead, they provide total control over position and rotation with high precision, and are very easy to use.
Internally, a servo consists of a DC motor coupled to a reducer, along with a controller that is responsible for positioning the shaft at the indicated angle. Being coupled to a reducer, the speed of a servo is relatively low and provides high torque.
Servos are widely used in robotics projects, such as robotic arms, hexapods, or bipedal robots. They can also be used in turrets or to position a sensor or a laser, for example.
More information on using servos with Arduino at
Continuous Rotation Servo Motors
A continuous rotation servo is a variant of a conventional servo, in which the electronics are modified so that the signal controls speed instead of position.
As its name indicates, continuous rotation servos are capable of making a full rotation, behaving similarly to a DC motor, with integrated speed control. In return, we lose position control, so if we want to control it, we will need to add an encoder.
However, continuous rotation servos do not offer precise control over rotation speed as they generally do not present a linear response to the received signal. To have good control, we will need to calibrate the servo and adjust the sent signal, or again add an encoder.
More information on using continuous rotation servos with Arduino at Controlling a continuous rotation servo with Arduino
Stepper Motors
Stepper motors (also called stepper) are another type of motor widely used in robotics. In these motors, the shaft rotates a fixed angle called “step” when indicated by a processor. The step varies by motor model, with common values being 1.8º (200 steps per revolution) and 3.75º (96 steps per revolution).
In general, a stepper motor consists of a stator with two coils phased at 90º and a rotor made of a permanent magnet installed solidly to the shaft.
By applying a suitable sequencing of the coils we can progressively orient the magnet until a complete turn is achieved. If the sequence is incorrect, the motor will not move.
For this reason, a stepper motor requires a processor to function, making it impossible to activate them by simply connecting them to power.
In the real world, a motor that can only step 90º would not be very useful. To achieve a smaller step, we could think of adding multiple coils, but we would add weight without increasing power.
To achieve the effect of having “multiple coils,” the variation of magnetic reluctance is employed. A toothed wheel is coupled to the shaft, with a number of teeth such that the next tooth is offset from the remaining coils.
When activating a coil, the toothed wheel is attracted by the generated magnetic field so that the rotor rotates to minimize the distance of the magnetic circuit.
In the upper image, it may seem that there are “8 coils,” but there are actually only 2 coils A and B, each with 4 poles. When activating a coil, all poles operate together.
There are unipolar or bipolar motors. The difference is that unipolar motors have both coils divided into two, which means they have an additional terminal for each phase.
Bipolar motors have four conductors, while unipolar motors have five or six (depending on whether the common terminal is shared between both coils).
Unipolar motors can be easier to operate, as using only half a coil allows us to avoid having to reverse the direction of current flow in the coil. Conversely, if we operate in unipolar mode, we will have less power, as we are only using half a coil to operate the motor.
With current electronics and existing controllers, reversing the direction of current is not a difficulty, so in general, we will prefer bipolar motors. However, any unipolar motor can be operated as a bipolar one, simply by leaving the common terminal disconnected.
Stepper motors have total position and speed control. The precision depends on the motor’s step and the control mode used. Thus, we can control the stepper motor with activation in four steps or in eight. Activating in eight steps will achieve half of the nominal step. On the other hand, some controllers have microstepping, a technique that varies the intensity supplied to each coil. This way, step precision of 1/16 to 1/32 of the motor’s nominal step can be achieved. The maximum torque generated by a stepper motor is intermediate, generally higher than that of a DC motor and brushless, but lower than a DC motor with reducer or a servo.
The maximum speed is also intermediate, although it is difficult to determine as it depends on the motor’s internal parameters and operating conditions. For example, the typical maximum speed of a NEMA 17 motor is around 600 rpm, reaching up to 4800 rpm in some models.
In the past, we could recycle stepper motors from machines such as scanners and printers, but they have progressively been replaced by DC motors.
Stepper motors are widely used in electronics projects, such as 3D printers and CNC machines. They are also suitable for heavy vehicles or those requiring great synchronization between wheels, such as vehicles with omni wheels or mecanum wheels.
More information on controlling bipolar stepper motors with Arduino at Stepper motors with Arduino and A4988 or DRV8825 driver
28BYJ-48 Stepper Motor
The 28BYJ-48 motor is a small and low-cost stepper motor. Electrically, it is a low-power motor, powered at 5V, with a step of 5.624 (64 steps). But it has the peculiarity of incorporating an internal reducer of 1/64.
This means that the overall precision is less than 0.087º (4096 steps) and a torque of 0.3kg/cm. It can operate at a maximum frequency of 100Hz, so the maximum speed is one turn every 40 seconds.
Don’t let its low price and modest characteristics make you dismiss this motor. Its high precision and low cost make it interesting for precision applications, such as rotating a platform for 3D scanning or directing a sensor or laser.
It can even be a viable substitute for servos in some articulated robots that require high precision and low speed, such as articulated drawing robots.
More information at 28BYJ-48 stepper motor with Arduino and ULN2003 driver
Summary Table
The above information is summarized in the following table. Of course, this will depend on the particular model of each chosen motor, but broadly speaking and as a summary,
Characteristics | Control (*) | |||
---|---|---|---|---|
Speed | Force/Torque | Position | Speed | |
DC Motor | ▲High | ▼Low | ▼Poor | ▼Poor |
Geared Down DC Motor | – Medium | ▲High | ▼Poor | ▼Poor |
Brushless Motor | ▲▲Very High | ▼Low | ▼Poor | – Medium |
Servo | ▼Low | ▲High | ▲▲Absolute | ▲▲Absolute |
Continuous Rotation Servo | ▼Low | ▲High | ▼Poor | – Medium |
Stepper Motor | - Medium | - Medium | ▲▲Absolute | ▲▲Absolute |
28BYJ-48 Stepper Motor | ▼▼Very Low | Low | ▲▲Absolute | ▲▲Absolute |
Conclusions
DC motors are a winning option for vehicles with wheels or tracks. To have adequate speed control, we will need to add encoders.
An alternative is to use continuous rotation servos, which provide simple speed control. They are also a suitable option for robots with more than two motors, such as robots with omniwheels or mecanum wheels.
Conventional servos are the standout option for jointed robots such as robotic arms, hexapods, and bipeds.
Brushless motors are more suitable for projects that require high speeds with low weight, such as quadcopters and other aerial or maritime vehicles.
Finally, stepper motors are suitable for applications with high precision in speed and position, such as 3D printers, CNC machines, and advanced vehicles.