Electromechanical Devices

Electromechanical devices are a group of actuators that use electromagnetic effects to cause a mechanism to move. Electromechanical actuators covers a very broad group of devices, though broadly speaking, nearly all moving actuators are electromechanical devices. Coils are the basic building block of electromechanical devices, and the electrical properties of coils are reflected in the characteristics of nearly all electromechanical devices. In general, electromechanical devices are characterized by relatively high power usage, which is important to consider when designing battery-powered devices.

Coils generate a magnetic field proportional to the current that passes through it. This magnetic field can be used to physically move magnets and ferromagnetic objects, and this effect forms the basis for many actuators. However, coils are high-energy devices and cannot be driven directly from a microcontroller. Additionally, coils have the property that they will resist any change in current, and this translates into noise and high voltage spikes when a coil is switched off. The figure above shows a simple schematic for driving a solenoid coil. Here, a transistor (Q1) is used to control the current through the coil. A flyback diode, D1, is placed in parallel over the coil in order to snub the voltage spikes that occur when the coil is switched off. In normal operation, this diode will not conduct electricity. However, when the coil is switched off and the magnetic field collapses, the field’s energy is dissipated through the diode. This type of schematic is found in nearly all electromagnetic devices, though usually a more specialized circuit in the form of a driver IC is used.

Solenoids

Solenoids are the simplest electromechanical devices, and consist of only a single coil. The coil is used to actuate an armature, which is in turn connects to a mechanism. Solenoids react quickly, but can only move over a very limited range. For instance, car door locks are usually driven by solenoids. Another big application of solenoids is in solenoid valves, where the armature of the solenoid is used to actuate a valve. This way, hydraulic and pneumatic systems can be driven by electronics. Usually, solenoids move in one direction when they are turned on, and use a spring to return the armature to the original position when they are switched off. Solenoids are usually either fully on or fully off. Proportional solenoids exist, but are more expensive. The circuit shown above can be used to drive a solenoid. The figures below show a push-pull solenoid (left) and a pneumatic solenoid valve (right).

Relays

Relays are a specialized type of solenoid actuator. Here, the armature of the solenoid is used to actuate an electrical contact. In shot, a relay is an electrically controlled switch. There are many reasons to use relays. To begin, relays can amplify a current: a small current can be used to control a much larger current. Secondly, relays offer galvanic isolation, meaning that there is no electrical contact between driving side and the driven side. This is an important safety consideration, as it forms a physical barrier between users and potentially lethal voltages.

The figure to the left shows the schematic representation of a relay, with the driving coil on the bottom and the switch contacts on the top. The figure to the right shows the physical construction of a relay, with the switch contacts (left-hand side) and the driving coil (right-hand side). Driving a relay from a microcontroller is straightforward, and can be done using the schematic shown at the start of this article.

Relays can be either fully on or fully off, it is not possible to control a load gradually. Relays are also not suitable for rapidly switching a load on and off, so pulse-width modulation control schemes are not possible. Finally, relays are mechanical devices thus they are susceptible to wear. The lifecycle of relays is somewhere in the order of 10,000 cycles, so the more frequently a load is switched, the less long a relay lasts.

In recent years, solid-state relays (SSRs) have become a popular alternative for regular relays. As the name implies, SSRs contain no moving parts, but instead relies on semiconductor technology to provide the switching action. As a consequence, SSRs are not susceptible to wear and they can switch switch much faster than traditional relays. However, solid-state relays are more expensive than traditional relays and they have their own set of peculiarities.

Motors

Electrical motors are a more complex group of electromechanical actuators. Motors use electrical energy to produce a rotational force. This motion is created through the interaction between the motor’s magnetic field and the current through its windings. Many different variations exist upon this principle, each with their own specific advantages. The list below is aimed at providing a non-exhaustive overview, focused on DC-powered applications. In general, all electric motors contain the following elements:

  1. Stator — The part of motor that does not move
  2. Rotor — The rotating part of the motor
  3. Winding — A coil inside the motor. The windings are usually made from enameled copper wire.

DC motors

DC motors are simple to use and inexpensive. Generally, they rotate at high RPM but low torque, so usually a gearbox is used. This type of motor has permanent magnets in the stator, which are responsible for generating the motor’s magnetic field. Brushes are used to transfer current into the windings of the rotor. The rotor contains multiple windings, which are sequentially turned on and off through a commutation ring.

Because the windings are switched mechanically through the commutator ring, no special electronics are needed to spin the motor. The motor will turn when a voltage is applied to the motor’s terminals, and reversing the voltage will cause the motor to spin in reverse.
Pulse-width modulation (PWM) can be used to regulate the motor speed.

A H-bridge driver (often in the form of an integrated circuit) can be used to control a DC motor from a microcontroller. A H-bridge contains 4 transistor switches, and allows the voltage to the motor to be reversed. Consequently, the motor can be spun in both directions. The L293D is commonly used to control small DC motors. Pololu also offers a wide variety of DC motor drivers for prototyping.

Brushless DC motors

Brushless DC (BLDC) motors are characterized by a very efficiency and are used high power density applications. For this reason, BLDC motors are commonly found in quadcopters, eBikes, and hoverboards. As the name implies, BLDC motors do not use brushes to transfer power to the motor windings. Instead of using a commutator ring, the windings are switched electronically, leading to higher efficiency and better performance. However, BLDC motors are more difficult to construct, and they require a controller that can cost as much as the motor itself.

Brushless motors have three or more windings in the stator, which are sequentially powered by the motor controller. The rotor contains an array of permanent magnets. For the motor to function properly, the windings need to be powered at precisely the right time. Some drivers use a hall-effect sensor to measure the position of the rotor. Other motor drivers use a “sensorless” technique where they measure the back-EMF of the windings to determine the rotor position.

BLDC motors can be found in two different configurations. In the conventional (inrunner) configuration, the permanent magnets of the rotor are positioned at the center of the motor. In the outrunner configuration, the windings are positioned at the center, and the rotor has a bell-shape that surrounds the stator windings. The motors in the figures above are outrunner motors.

Stepper motors

Stepper motors are conceptually similar to BLDC motors, though they are optimized for different goals. Whereas brushless DC motors favor high speeds, stepper motors are optimized for slow, precise motion. As the name implies, stepper motors move in small, discrete steps. Typically, stepper motors have two windings, and take 200 (or even 400) steps to complete a full rotation.

When dimensioned correctly, stepper motors allow for sensorless, open-loop position control. That is to say, by counting steps and direction in software, the microcontroller can determine the theoretical position of the motor. This type of control scheme is found in many motion control applications, such as in low-end 3D printers. This control scheme is simple, but excessive force will cause the motor to skip steps, meaning that the motor was commanded to move, but could not. Because there is no feedback loop, missed steps cause a discrepancy between the theoretical position in software and the actual position of the mechanism. The only way to recover from this situation is to move the actuator back to its home position. Another downside of stepper motors is that they tend to be heavy and energy-inefficient. For this reason, they are less suitable for battery-powered applications.

Like brushless DC motors, stepper motors need a specialized driver in order to function. It is common for stepper motor drivers to have a simple step/direction interface. In this control scheme, a single pulse to the step pin will cause the motor to advance one step. The direction pin is used to determine the direction of rotation. Most modern stepper drivers offer microstepping, which is a technique to divide full steps of the motor in to smaller microsteps. This is done by gradually increasing and decreasing the current in the motor windings, instead of simple on/off control. This leads to smoother motion and has a dramatic impact on the noise of the motor.

Servos


A servos is a closed-loop system that consists of three parts: an actuator, a sensor, and a controller. These three parts work in unison to move the actuator output to a desired position. Servos form an alternative for stepper motors in motion control applications. The biggest difference with steppers is that servos use a feedback mechanism, allowing the actuator to detect and recover from failures. Because servos do not require the same safety margins as steppers, they can operate much closer to the edge of the actuator’s operating envelope, resulting in higher performance in a more compact package.

Servos are a very broad group of devices, ranging from inexpensive hobby servos (pictured above) to high-end industrial actuators. Different combinations of actuators and sensors can result in wildly different properties, suited for different applications. The actuator in a servo can be any type of electrical motor, such as an AC motor, a brushed DC motor, a brushless motor, or even a stepper. Similarly, different types of position feedback sensors can be used. Feedback sensors can be divided into two main groups: absolute encoders and incremental encoders.

Absolute encoders (shown to the right) have a unique value for each step. Incremental encoders (shown to the left), on the other hand, have repeating values. In practice, this means absolute encoders provide accurate position information from the moment they’re turned on, whereas incremental encoders need to be homed to a reference point first. On the other hand, absolute encoders are larger and more expensive than incremental encoders. Many different measurement principles can be used, such as magnetic, optical, or resistance (potentiometer).

The final piece of the puzzle is the control loop, which determines the relationship between sensor position and motor current. PID loops are commonly used as a building block for the control scheme. In the most basic form, a single PID loop can be used for position control. More advanced schemes can also offer speed and torque control modes.