Language: EN

tipos-motores-rotativos-proyectos-arduino

Types of Rotary Motors for Arduino Projects

In the previous post, 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 post 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, since entering into details of each one 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 post, we will finish this series on the selection of drives, and we will see other types of non-rotating drives to incorporate into our assemblies.

Direct Current Motors

Direct current motors (DC motors) are one of 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.

arduino-motores-corriente-continua-funcionamiento

Inside it, we introduce a coil and circulate an electric current, so that a magnetic field is generated. The angular misalignment between both magnetic fields generates a torque, which makes the rotor rotate until the two magnetic fields align.

When both magnetic fields are aligned, the motor stops. To make the motor rotate continuously, we are going to invert one of the magnetic fields, so we need to reverse the direction of the current passing through the coil.

For this, the contacts that feed the coil in DC motors are made up of a split ring that slides over electrical contacts that rub against it, transmitting electricity. The split ring attached to the shaft is called a commutator, while the sliding contacts are called brushes.

After a certain angle, the brushes will pass from one split to the next. This causes the reversal of the current in the coil. This way, the set of brushes - commutator acts as a mechanical inverter and allows the motor to rotate continuously.

The advantage of this system is that synchronization is always perfect regardless of the speed and torque exerted, as it is the motor’s own angle of rotation that marks the reversal of the current. The downside is that friction represents a loss of efficiency and reduces the life of the motor.

There are other arrangements of direct current motors. Sometimes the stator’s magnetic field is generated by a coil instead of a permanent magnet. Other times, the positions of the elements are exchanged between rotor and stator. It is also possible for the stator to be the motor’s shaft, and the rotor is its housing.

In any of these variations, the motor’s operation is the same, having two misaligned magnetic fields so that they rotate to align, and using a system of commutator and brushes to reverse the magnetic field of one of them when they align.

In a real motor, of course, there is not a single coil, but coils formed by multiple coils. In addition, frequently there is more than one coil, which increases the motor’s power without increasing its size.

arduino-motores-corriente-continua-interior

On the other hand, the coils are wound on ferromagnetic cores, called armatures, which increases the motor’s power and reduces losses due to magnetic scattering. The armatures are composed of insulated plates to reduce losses due to induced Foucault currents.

Direct current motors are available in different nominal voltages, with 6V, 12V, and 24V being common. In terms of power, we find motors of all sizes, from just a few millimeters long to

arduino-motores-corriente-continua

The motors have high rotational speeds and low torque. We can use the PWM outputs of Arduino to control the speed, but this will maintain the maximum available torque. Another option is to use an external or integrated gearbox (see below “geared down motors”) that reduces the speed while increasing the torque and precision.

To control a direct current 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 an H-bridge. Although the most convenient thing is to use a controller like the L298N or the improved version TB6612FNG, which handles the high currents required and incorporates protections against induced voltages.

Direct current motors have poor position control and poor speed control. Their behavior is strongly nonlinear and depends heavily on the load they support. For this reason, they are usually used with an encoder that allows knowing the position of the shaft. Even some models of direct current motors integrate an encoder internally.

Geared Down Motors

A geared down motor is a direct current motor that incorporates an internal gearbox. This increases the motor’s torque and reduces its speed. Common rotation speeds are 60, 120, 240, and 480 rpm, among others.

arduino-motores-geared-interior

It is common for some geared down motors to 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.

arduino-motores-geared

Brushless Motors

Brushless motors are another variation of direct current motors that dispense with brushes as a current rectification system. Instead, they rely on electronics to switch the magnetic field.

arduino-motores-brushless-funcionamiento

By not having brushes, brushless motors have higher speeds, lower weight, and greater durability than traditional DC motors.

arduino-motores-paso-a-paso-interior

Some small brushless motors incorporate the necessary electronics for their operation internally. However, larger motors need an external controller, called ESC (Electronic Speed Controller). Some ESCs also have a BEC (Battery Elimination Circuit) function, which consists of a regulated 5V output, usually 1-3A, to power other electronics.

arduino-motores-esc

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 rotational speeds.

arduino-motores-brushless

Servomotors

Servos are another very common actuator in robotics projects. A servo receives a pulsed signal generated by a processor, which transmits the desired position, and the servo independently positions itself at that position.

arduino-motores-servos

A servo cannot complete a full turn, with its usual range being 180º. In return, they provide total control over position and rotation and high precision, and are very easy to use.

Internally, a servo consists of a DC motor coupled to a gearbox, along with a controller that is responsible for positioning the shaft at the indicated angle. Being coupled to a gearbox, a servo’s speed is relatively low and provides high torque.

arduino-servo-interior

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.

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 the speed instead of the position.

arduino-motores-servo-rotacion-continua

As its name suggests, continuous rotation servos are capable of completing a full turn, behaving similarly to a DC motor, with integrated speed control. In return, we lose position control, so if we want to control it, we must add an encoder.

However, continuous rotation servos do not offer precise control over the rotational speed since, in general, they do not have a linear response to the received signal. To have good control, we will have to calibrate the servo and adjust the sent signal, or again add an encoder.

Stepper Motors

Stepper motors (also called stepper) are another type of motor widely used in robotics. In this type of motor, the shaft rotates a fixed angle called a “step” when indicated by a processor. The step varies by motor model, with common values being 1.8º (200 steps per turn) and 3.75º (96 steps per turn).

arduino-motores-paso-paso

In general, a stepper motor consists of a stator with two coils shifted by 90º and a rotor consisting of a permanent magnet installed solidly on the shaft.

By applying a suitable switching sequence to the coils, we can gradually orient the magnet until it completes a full turn. If the sequence is incorrect, the motor will not move.

arduino-motores-paso-a-paso-secuencia

For this reason, a stepper motor necessarily needs a processor to function and cannot be simply activated by connecting them to power.

In the real world, a motor that is only capable of steps of 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 used. There is a toothed wheel coupled to the shaft, with a number of teeth such that the next tooth is out of phase with the remaining coils.

arduino-paso-paso-funcionamiento

By 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 image above, it may seem like there are “8 coils” but there are actually only 2 coils A and B, each with 4 poles. When activating a coil, all poles work together.

There are unipolar or bipolar motors. The difference is that unipolar motors have both coils split in two, for which they have an additional terminal in each phase.

arduino-motores-unipolar-bipolar

Bipolar motors have four conductors, and unipolar motors have five or six (depending on whether the intermediate terminal is common to both coils).

Unipolar motors can be easier to operate, as if we only use half a coil, we can avoid having to reverse the coil’s direction of circulation. On the contrary, if we operate in unipolar mode, we will have less power, since we are only using half a coil to operate the motor.

With current electronics and existing controllers, reversing the direction of the current is not difficult, so in general, we will prefer bipolar motors. However, any unipolar motor can be operated as bipolar by simply leaving the intermediate terminal unconnected.

arduino-paso-a-paso-interior

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 stages, or in eight. By activating in eight stages, we get half the nominal step.

On the other hand, some controllers have microstepping, a technique that consists of varying the intensity supplied to each of the coils. This way, we achieve step precisions from 1/16 to 1/32 of the motor’s nominal step. The maximum torque generated by a stepper motor is intermediate, generally higher than that of a DC and brushless motor, but lower than a DC motor with a gearbox or a servo.

The maximum speed is also intermediate, although it is difficult to determine because it depends on the motor’s internal parameters and working conditions. By way of 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 that require great synchronization between wheels, such as vehicles with omni wheels or mecanum wheels.

28BYJ-48 Stepper Motor

The 28BYJ-48 motor is a small-sized and low-priced stepper motor. Electrically, it is a low-power motor, powered at 5V, and a step of 5.624 (64 steps). But it has the peculiarity of incorporating an internal reducer of 1/64.

arduino-motores-byj48

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 1 turn every 40 seconds.

Don’t let its small price and modest features make you discard this motor. Its high precision and low price make it interesting for precision applications, such as rotating the 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 robots that draw.

Summary Table

The above information is summarized in the following table. Of course, it will depend on the particular model of each chosen motor, but in broad strokes and as a summary,

CaracterísticasControl (*)
VelocidadFuerza/ParPosiciónVelocidad
Motor DC▲Alto▼Bajo▼Malo▼Malo
Motor DC Geared Down– Medio▲Alto▼Malo▼Malo
Motor brushless▲▲Muy alto▼Bajo▼Malo– Medio
Servo▼Bajo▲Alto▲▲Absoluto▲▲Absoluto
Servo rotación continua▼Bajo▲Alto▼Malo– Medio
Motor paso a paso- Medio- Medio▲▲Absoluto▲▲Absoluto
Motor paso a paso BYJ48▼▼Muy bajoBajo▲▲Absoluto▲▲Absoluto

(*) With encoder, all transition to absolute control of position and speed

Conclusions

DC motors are a winning option for vehicles with wheels or tracks. To have adequate speed control, encoders need to be added.

An alternative is to use continuous servo motors, providing simple speed control. It’s also a suitable option for robots with more than two motors, such as omniwheels or mecanum wheel robots.

Conventional servos are the standout choice for robots with joints like robotic arms, hexapods, and bipeds.

Brushless motors are more suitable for projects that require high speeds with little 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.

Download the Code

All the code from this post is available for download on GitHub. github-full