Using a PWM Servo Motor Driver

Using a PWM Servo Motor Driver

Whether you’re building a robot arm, hexapod walker or just controlling a bunch of LEDs, chances are you’ll need to control servo motors. This handy breakout makes this a breeze.

The servo motor shaft position depends on the length of a control signal sent over its control wire. The longer the pulse, the more the motor turns.

Pulse Width Modulation

When controlling a servo, the key is the width or duration of the pulse that is sent to the motor. This is known as the Pulse Width Modulation (PWM) and it determines how far a servo will move when given a position signal.

For example, a 1.5 ms pulse will place the servo’s output shaft in its center position, while anything shorter or longer will cause it to turn toward one direction or another. The maximum available range varies from servo to servo, so check the manufacturer’s specifications.

There are several ways to generate PWM signals, including using a microcontroller or dedicated servo driver. The microcontroller or servo driver will take the input from the user and generate the necessary PWM signal to control the servo.

The servo motor driver itself can vary as well, but it is important to choose the correct one based on the motor’s specifications and the application. Some drivers will even have adjustable gain settings to allow the user to fine-tune the speed.

The frequency of the PWM signal can also affect how fast the servo moves, but it should never be too high or it will damage the motor. The frequency is the number of times the signal completes a full cycle in a second, and it is measured in Hertz. The duty cycle is the proportion of the total time the signal is “On” versus its “Off” time and is usually expressed as a percentage.

Pulse Frequency

Servo motors are ubiquitous in industrial automation. Most facilities rely on them for their precision and capacity to handle time-critical tasks. Servo drives convert AC mains power into pulsed signals driving the motors. They also add feedback position control to make sure the motors get into a precise and stable positions when instructed by drive commands.

The most important factor to keep in mind when designing the control circuit for a servo motor is the frequency at which the digital signal is being pwm servo motor driver pulsed. This will determine how much EMI is generated by the drive. It will also determine the amount of current ripple and its effect on eddy current losses.

In a typical PWM control circuit, the drive output is sent through the gate of a transistor to the motor. The gate of the transistor is open most of the time to connect the motor windings to the bus voltage, resulting in a pulsed drive signal. The frequency of this pulsed drive signal is determined by the controller clock.

When the controller is operating at a lower frequency, the transistor is open for less of the time. This causes the pulses to be wider and generate more EMI. The maximum pulse width for which a servo can be commanded to turn to a position is determined by the constraints of that specific servo. It is typically 1.5 ms wide. Servos with a larger shaft rotation range will require longer pulse widths to command them to a position.

Duty Cycle

The frequency and period of a PWM signal are important, but it’s the duty cycle that dictates whether a servo motor will move to a certain angle. Most hobby servos expect a 20 ms interval with a 1 ms to 2 ms pulse – that’s a duty cycle of 5 to 10% of the total waveform time of 50 Hz. The servo will hold its position until it receives another control pulse.

A higher duty cycle means a longer “on” portion of the signal, whereas a lower duty cycle means shorter “on” portion. It’s the ratio of the total switching time to the interval period that determines the pulse width, which in turn determines how much current is delivered.

Servo motors can only handle a limited amount of torque, and exceeding this limit will cause permanent magnet demagnetization, rendering the motor unusable. The servo drive’s role is to translate low power command signals from the controller into high speed, high torque control outputs for the motor.

The higher the PWM frequency, the greater the amount of angular velocity a servo can reach. However, the servo driver must be able to handle this increased speed without overheating, as excessive heat can damage components and shorten their lifespan. For that reason, it’s important to choose a driver that’s built to meet your particular application’s needs, including the number of outputs and range of speeds.

Feedback

Despite the fact that most servo motors are designed to convert your PWM command into a motor speed that is proportional to the duty cycle, there are many things that can affect the BLDC motor actual speed that your motor will run at. These can include frictional loads, power supply sagging and transient effects caused by the motor shaft rotational inertia.

To address these issues, the servo controller often includes feedback from shaft torque, shaft speed and shaft position. All of these inputs feed into a feedback system which then compares the command input to the relevant feedback signal(s). In this way the feedback controller output is modified to achieve the desired motor control response.

In order to provide direct access to the internal feedback control system it is common for the servo controller to have a current sense input that connects directly to the servo motor. This input is then fed back to the inner loop current control through a PI feedback loop with the integral and proportional gains set as specified by you.

The resulting control input is then compared to the desired motor position by the motor controller and the appropriate drive action is taken. A microcontroller often monitors this output through an analog to digital converter to get a dynamic, real-time reading of the motor position. This provides a level of precision that goes beyond the position control circuitry within the servo motor and can help to prevent errors such as motor stalling or stopping at a different position than intended.