Home » Mechatronics, Industrial Control & Instrumentation » Pulse Width Modulation (PWM) Speed Control of a DC motor

Pulse Width Modulation (PWM) Speed Control of a DC motor

We can control the speed of a motor using an open loop control or closed loop control strategy. The open loop control is the simplest form of motor control; here we simply set the drive voltage value and the motor characteristics and the load determines the operating speed & torque. But you will find that most motor applications require automatic control, where the voltage is varied automatically to produce the desired motion. This is where closed loop or feedback control comes in play. This requires a torque sensor to feed back the output values to continuously compare the actual output to the desired value normally called the set point. The controller then actively changes the motor output to move closer to the set point.

We have 2 types of electronic speed controllers:

  • Linear amplifiers
  • Pulse width modulators

Pulse width modulators are preferred over linear amplifiers because of lower power dissipation. PWM controllers can drive bipolar power transistors rapidly between cut off and saturation or turn FETs on and off with little power/heat dissipation.

Principle of Operation of a Pulse Width Modulator (PWM) Amplifier

Let’s consider the figure below:

Pulse width modulation of a DC motor
Pulse width modulation of a DC motor

A DC power supply voltage is rapidly switched at a fixed frequency f between two values i.e. ON and OFF. This frequency is often in excess of 1 kHz. The high value is held during a variable pulse width t within the fixed period T where

PWM operation

The resulting asymmetric waveform has a duty cycle that is defined as the ratio between the ON time and the period of the waveform, which is usually specified as a percentage:

Duty cycly in PWM operation

PWM operation pulse waveforms:

Pulse width operation
Fig (a)

PWM pulse
Fig (b)

As the duty cycle is changed by the controller, the average current through the motor changes causing the changes in speed and torque at the output. Please note that, it is primarily the duty cycle, and not the value of the power supply voltage, that is used to control the speed of the motor.

Example of a drive circuit:

PWM drive circuit
PWM drive circuit

PWM Speed Feedback Control System for a DC motor

Let’s consider the block diagram below:

PWM speed feedback control
PWM speed feedback control

The voltage tachometer produces an output linearly related to the motor speed. This is compared to the desired speed set point. The error and the motor current are sensed by a pulse-width modulation regulator that produces a width-modulated square wave as an output. This signal is amplified to a level that is appropriate to drive the motor.

In a PWM motor controller, the armature voltage switches rapidly, and the current through the motor is affected by the motor inductance and resistance. Since the switching speed is high, the resulting current through the motor has a small fluctuation around an average value as shown in the waveform below:

PWM low duty cycle
High duty cycle in PWM operation

As the duty cycle grows larger, the average current grows larger and the motor speed increases.

Don’t miss out on key updates, join our newsletter  List

H-bridge Drive for a DC motor

To control the speed of a DC motor, we must be able to change the current supplied to the motor. To control the direction of rotation, the direction of current supplied to the motor must be reversible. This requires a current amplifier and some means to switch the current direction. The concept of H-bridge meets these requirements. It uses four switches (Relays or Transistors) arranged in an H configuration around a DC motor as shown in the figure below:

H-bridge
H-bridge

These switches are turned on one pair at a time for the desired direction of motion. If switches Q1 and Q2 are ON and Q4 and Q4 are OFF, current flows through the motor in the direction shown and the motor rotates in one direction. On the other hand, if switches Q2 and Q4 are ON and Q1 and Q3 are OFF, the motor rotates in the other direction.

You can easily build an H-bridge with relays (4 SPSTs or 2 DPDTs); but relays cannot be switched very fast, so this limits our PWM options. Furthermore, since relays are mechanical devices, they can wear out, and fail after many switching cycles. However, for applications where you need only reversibility and not PWM speed control, relays can be a good option.

For applications where our goal is to control PWM speed, transistors or solid state relays are better choices. You can build a discrete H-bridge with power BJTs and MOSFETs but it may be difficult to properly select and bias transistors. Hence, we utilize a monolithic solution using National Semiconductors line of information control ICs, which can be easily adapted for driving DC motors. For example, consider the LMD15200, 3 A, 55 V H-bridge specifically designed to drive DC motors and Stepper motors. It allows for current direction control, and also offers features for overcurrent and over temperature detection, pulse width modulation and dynamic braking.

Functional Diagram for a LMD15200, 3 A, 55 V H-bridge

functional diagram for LMD15200 H-bridge
Functional diagram for a LMD15200, 3 A, 55 V H-bridge

This design uses power MOSFET with fly back protection diodes that suppress large transients across the transistors. The motor poles are connected between output 1 and output 2. The voltage supply can be up to 55 V. External digital signals control direction, braking and pulse width modulation. A thermal sensor shuts down the outputs when the device temperature exceeds 170°C

A complete block diagram utilizing a H-bridge IC LMD15200, 3 A, 55 V and a pulse width modulation IC LM3524D to drive the H-bridge motor controller input is shown below:

Motor speed control using a H-bridge
Motor speed control using a H-bridge

The speed set point is controlled with a potentiometer or input voltage value. A tachometer is attached to the motor (M) to sense the motor speed.

Please follow us & share:

Comments

3 responses to “Pulse Width Modulation (PWM) Speed Control of a DC motor”

  1. […] the difference signal is sent as a digital signal to the controller, where it is converted into a pulse width modulated (PWM) signal or a Digital analog converter (DAC) is used to control the […]

  2. […] have more memory and additional software-configurable functionality like on-board comparators and pulse-width modulation […]

  3. […] Pulse Width Modulation (PWM) Speed Control of a DC motor […]

Currently trending: