We don’t always talk a lot about electromechanics around here, but driving and control of small motors are important topics. One type of motor found in many consumer and industrial products is a servo motor. Although this type of motor requires a closed feedback loop, integrated encoder, and control algorithm, the position and speed control they provide makes them highly adaptable in a number of applications.
The question of how to drive a servo motor requires looking at how sensing is implemented and the type of motor being driven. Unless you’re working with a high power servo, you don’t need to use discrete semiconductors to build your driver circuit. Instead, you can find servo controllers on the market with the right electronics search engine. Let’s look at the components you’ll need for driving and controlling servo motors, as well as some component options on the market for your next electromechanical system.
How to Drive a Servo Motor
Before getting into how to drive a servo motor, those who are new to working with servo motors should know that a servo motor is not a specific type of motor. Rather, the term “servo” refers to the way in which a motor is driven and its position, velocity, and acceleration are controlled. In a servo motor, control is applied through a feedback loop between the motor and the controller, and the position/speed of the motor is sensed with integrated encoders in the motor. Some sensors that provide this feature are integrated potentiometers, Hall effect sensors, or LED with a photogate and photodiode.
Driving a servo motor consists of two critical elements as part of driving and control circuitry:
- Adjustable drive signal. A PWM signal is used in servo motors to force the rotor to turn to a specific position. By adjusting the duty cycle, the rotation rate can be adjusted.
- Sensing and control circuit. The control and sensing circuit determines the location and speed of the rotor as the motor operates. Highly accurate speed can be maintained through feedback control.
- Feedback loop and drive adjustment. This can be done with a specialty drive controller or an MCU. Note that not all servo motors have an encoder.
- Braking. We always like to talk about driving motors, but rarely do you hear anyone talking about braking motors. Servos need braking circuitry and logic to slow down the rotor and hold its position after braking.
Servo motors are driven by sending a PWM signal through the control wire while power is given to the motor. Depending on the pulse width, the rotor in the servo motor can turn a certain angle, i.e., the duty cycle determines the final position of the shaft. Servo motors can be powered with DC or AC voltage, and the encoder signal (if present) closes the feedback loop with the processor or driver. The basic architecture of a servo motor and its controller/driver is shown below.
Holding Position with a Servo
The great thing about a servo is it can be configured to hold its position between actuation steps. The holding torque provided by a servo motor is comparable to that from a stepper motor. If an external force pushes the rotor away from its stationary position, the encoder can sense this deviation and cause the controller to drive against the external force, holding the rotor position. A servo will hold any force within its specified torque.
Anatomy of a Servo Driver
There are several options available for servo drive controllers, or you can build a suitable driver and control circuit from common components. Some simple methods for driving and controlling a servo include:
- Dual MOSFET drivers. This method is best used for low-voltage servos and MOSFETs that can be switched at logic levels.
- DAC driving. The driving waveform can be generated directly rather than relying on a PWM driver.
- PWM-controlled H-bridge. This method can provide high synchronous current to a servo motor.
In the first two options, the control loop, driving, and sensing can all be implemented on an MCU. In this case, use MOSFETs that can be switched on at logic levels and that have voltage rating higher than the servo motor’s rating to ensure the MOSFET can withstand any transients. The last option depends on the amount of current required to drive the servo. Thankfully, there are controller ICs that can be used with a standard motor driver circuit to provide a single driver/controller solution.
One example of a low-cost SMD (24-pin SOIC) precision motor controller is the LM628/LM629 from Texas Instruments. This component integrates a digital PID control loop with DAC-based driving or 8-bit PWM output for driving an external H-bridge. In the LM268 version, an external 8-bit to 12-bit DAC is recommended for generating the driver signal. The LM629-based controller provides an 8-bit PWM output for directly driving an external H-bridge. Both are available in 28-pin DIP packages for use in harsher environments.
Released date: September 22, 2021