Docsity

Pulse Width Modulator - Embedded System Design - Lecture Slides, Slides of Computer Science

Toggle sidebar
bg1
Pulse width modulator
•Generates pulses with specific
high/low times
•Duty cycle: % time high
–Square wave: 50% duty cycle
•Common use: control average voltage
to electric device
–Simpler than DC-DC converter or
digital-analog converter
–DC motor speed, dimmer lights
•Another use: encode commands,
receiver uses timer to decode
1
clk
pwm_o
25% duty cycle – average pwm_o is 1.25V
clk
pwm_o
50% duty cycle – average pwm_o is 2.5V.
clk
pwm_o
75% duty cycle – average pwm_o is 3.75V.
Docsity.com
pf3

Partial preview of the text

Download Pulse Width Modulator - Embedded System Design - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Pulse width modulator

  • Generates pulses with specific

high/low times

  • Duty cycle: % time high
    • Square wave: 50% duty cycle
  • Common use: control average voltage

to electric device

  • Simpler than DC-DC converter or

digital-analog converter

  • DC motor speed, dimmer lights
  • Another use: encode commands,

receiver uses timer to decode

clk

pwm_o

25% duty cycle – average pwm_o is 1.25V

clk

pwm_o

50% duty cycle – average pwm_o is 2.5V.

clk

pwm_o

75% duty cycle – average pwm_o is 3.75V.

Controlling a DC motor with a PWM

void main(void){
/* controls period */
PWMP = 0xff;
/* controls duty cycle */
PWM1 = 0x7f;
while(1){};
The PWM alone cannot drive
the DC motor, a possible way
to implement a driver is shown
below using an MJE3055T
NPN transistor.
5V
B
A

Internal Structure of PWM

clk_div

cycle_high

counter ( 0 – 254)

8-bit comparator

controls how fast the counter increments counter < cycle_high, pwm_o = 1 counter >= cycle_high, pwm_o = 0

pwm_o

clk Input Voltage^

% of Maximum Voltage Applied RPM of DC Motor

0 0 0

2.5 50 1840

3.75 75 6900

5.0 100 9200

Relationship between applied voltage and speed of the DC Motor

DC
MOTOR
5V
From
process
or