Pulse width modulation and motor speed control – Digilent 410-069P User Manual

Page 2

Advertising
background image

PmodHB3 Reference Manual

Digilent, Inc.

www.digilentinc.com

www.digilentinc.com

page 2 of 3

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

controlled by pulse width modulating the
Enable pin. See below for a description of
pulse width modulation. The Direction of the
motor should not be reversed while the Enable
pin is active. If the direction is reversed while
the bridge is enabled it is possible to create
brief short circuits across the bridge as one leg
will be turning on while the other leg is turning
off. This could lead to damage to the
transistors making up the bridge.

Two Schmitt trigger buffered inputs are
provided on connector J5 to facilitate bringing
motor speed feedback signals to the controlling
system board. These can be connected to
various kinds of sensors, such as optical or
Hall Effect sensors, to detect motor rotation.
These buffers have 5V tolerant inputs when
operated at 3.3V.

Pulse Width Modulation and Motor
Speed Control


In an analog circuit, motor speed is controlled
by varying the input voltage to a circuit. In a
digital circuit, however, only a logic high or
logic low signal can be applied to the motor.
Therefore, there are only two ways to control a
motor digitally: use a variable resistance circuit
to control the motor voltage, or, pulse the
power to the motor. Since variable resistance
circuitry is expensive, complicated, and wastes
much energy in the form of heat, the better
solution is pulse width modulation (PWM).

Pulse width modulation is a digital method of
transmitting an analog signal, and while it is
not a clean source of DC output voltage, PWM
suits motors relatively well.

The figures below illustrate a PWM system
with an input frequency of 2KHz. The motor
speed is controlled by adjusting the time each
wave is at peak output power. Figure 1 shows
a 10% “duty cycle” where the signal is logic
high for only 1/10 of a wavelength. This 10%
positive peak is equal to 10% of the total 3.3V

input, or 0.33V (shown in Figure 2). Figures 2
and 3 show duty cycles of 50% and 75%,
respectively.



An H-bridge is a voltage amplification and
direction control circuit that is used to format
the signal to the appropriate motor voltage and
polarity to spin the motor.

While voltage is being applied, the motor is
driven by the changing magnetic forces. When
voltage is stopped, momentum causes the
motor to continue spinning a while. At a high
enough frequency, this process of powering
and coasting enables the motor to achieve a
smooth rotation that can easily be controlled
through digital logic.

PWM has two important effects on DC motors.
Inertial resistance is overcome more easily at
startup because short bursts of maximum
voltage achieve a greater degree of torque
than the equivalent DC voltage. Another effect
is a higher level of heat generation inside the
motor. If a pulsed motor is used for an
extended time, heat dissipation systems may
be needed to prevent damage to the motor.
Because of these effects, PWM is best used in
high-torque infrequent-use applications such
as airplane flap servos and robotics.

PWM circuits can also create radio frequency
interference (RFI) that can be minimized by
locating motors near the controller and by
using short wires. Line noise created by
continually powering up the motor may also

Advertising