Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

PWM and DC Motor Control

DC MOTOR INTERFACING AND PWM


• DC motors have only + and – leads:
– Connecting them to a DC voltage source
→ rotates the motor in one direction
– Reversing the polarity, the DC motor will move
in the opposite direction

DC Motor Rotation (Permanent Magnet Field)

MSE 450/750 RT and embedded control systems 2


DC MOTOR INTERFACING AND PWM
• H-Bridge using simple switches:

Bidirectional control

H-Bridge Motor Configuration

MSE 450/750 RT and embedded control systems 3


... DC MOTOR INTERFACING AND PWM

H-Bridge Motor Clockwise Configuration

MSE 450/750 RT and embedded control systems 4


... DC MOTOR INTERFACING AND PWM
• H-Bridge controls can be created using relays, transistors, or a
single IC such as the TA7267BP.
– must ensure that invalid configurations do not occur, as shown below.

– Current flows directly to ground,


creating a short circuit
– same effect as when switches 1 and 3
or switches 2 and 4 are
closed

H-Bridge in an Invalid Configuration

MSE 450/750 RT and embedded control systems 5


TA7267BP

MSE 450/750 RT and embedded control systems 6


DC MOTOR CONTROL USING PWM
• Speed of a motor depends on three factors:
– load, voltage, current

• For a given fixed load we can maintain a steady speed using


pulse width modulation (PWM).

• Changing (modulating) the width of the pulse applied to the


motor can increase/decrease the amount of power provided
increasing/decreasing the motor speed.

• PWM is widely used: Many microcontrollers come with the


PWM circuitry embedded in the chip.
MSE 450/750 RT and embedded control systems 7
PULSE-WIDTH MODULATION
• Ability to control speed using PWM

Pulse Width Modulation

MSE 450/750 RT and embedded control systems 8


DC MOTOR CONTROL WITH AN OPTO-ISOLATOR
• Connection of a bipolar transistor to a motor:
– control circuit protected by the opto-isolator
– motor & chip use separate power supplies
– capacitor across the motor used to reduce EMI created
by the motor

MCU

Outx

MSE 450/750 RT and embedded control systems 9


… DC MOTOR CONTROL WITH AN OPTO-ISOLATOR
• Using a MOSFET
– The opto-isolator protects the MCU from EMI
– The zener diode clamps gate voltage (< rated maximum value)

MCU

Outx

MSE 450/750 RT and embedded control systems 10


PWM IN TM4C123
PWM module

Tiva™ TM4C123GH6PM Microcontroller

MSE 450/750 RT and embedded control systems 11


PWM IN TM4C123

Tiva™ TM4C123GH6PM Microcontroller

MSE 450/750 RT and embedded control systems 12


ANOTHER APPLICATION OF PWM
• D/A conversion:
– The low pass filter removes high frequency PWM switching
components
– Output amplitude proportional to duty cycle of the PWM waveform

MSE 450/750 RT and embedded control systems 13


PWM SPECTRUM

• Fourier analysis of a typical PWM


signal:
• Strong peak at frequency f =
1/T.
• Other harmonics at f = k/T,
where k is an integer.

• The LPF must remove PWM


harmonics

• Example: PWM modulated speech


signal (BW=4 kHz):
• PWM frequency= 20 kHz.

MSE 450/750 RT and embedded control systems 14

You might also like