Professional Documents
Culture Documents
DC Motor Control Using Pulse Width Modulation (PWM)
DC Motor Control Using Pulse Width Modulation (PWM)
Introduction
PWM Generation in AVR
e-Yantra Team
IIT Bombay
March 9, 2020
1 Introduction
Pulse Width Modulation
Duty Cycle
Duty Cycle
Duty Cycle
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
X Toff = Time the output remains Low.
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
X Toff = Time the output remains Low.
X When output is high the voltage is 5v
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
X Toff = Time the output remains Low.
X When output is high the voltage is 5v
X When output is low the voltage is 0v
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
X Toff = Time the output remains Low.
X When output is high the voltage is 5v
X When output is low the voltage is 0v
X Time Period(T) = Ton + Toff
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
X Toff = Time the output remains Low.
X When output is high the voltage is 5v
X When output is low the voltage is 0v
X Time Period(T) = Ton + Toff
X Duty Cycle = Ton*100/(Ton + Toff)
Duty Cycle
X The signal remains ”ON” for some time and ”OFF” for some time.
X Ton = Time the output remains high.
X Toff = Time the output remains Low.
X When output is high the voltage is 5v
X When output is low the voltage is 0v
X Time Period(T) = Ton + Toff
X Duty Cycle = Ton*100/(Ton + Toff)
X Duty Cycle = 50%
www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 4/19
Outline
Pulse Width Modulation
Introduction
Duty Cycle
PWM Generation in AVR
Timers in AVR
Timers in AVR
Timers in AVR
Timers in AVR
Timers in AVR
Timer/Counter 5 (TCNT5)
Timer/Counter 5 (TCNT5)
1 The Timer/Counter is a register that increments its value after every
clock cycle.
Timer/Counter 5 (TCNT5)
1 The Timer/Counter is a register that increments its value after every
clock cycle.
2 The maximum value depends upon the resolution of Counter.
Timer/Counter 5 (TCNT5)
1 The Timer/Counter is a register that increments its value after every
clock cycle.
2 The maximum value depends upon the resolution of Counter.
3 For example, a 3 bit counter will have 8 values (i.e. 0-7). Its
waveform will be seen as follows:
Timer/Counter 5 (TCNT5)
1 The Timer/Counter is a register that increments its value after every
clock cycle.
2 The maximum value depends upon the resolution of Counter.
3 For example, a 3 bit counter will have 8 values (i.e. 0-7). Its
waveform will be seen as follows:
Timer/Counter 5 (TCNT5)
1 The Timer/Counter is a register that increments its value after every
clock cycle.
2 The maximum value depends upon the resolution of Counter.
3 For example, a 3 bit counter will have 8 values (i.e. 0-7). Its
waveform will be seen as follows:
Timer/Counter 5 (TCNT5)
1 The Timer/Counter is a register that increments its value after every
clock cycle.
2 The maximum value depends upon the resolution of Counter.
3 For example, a 3 bit counter will have 8 values (i.e. 0-7). Its
waveform will be seen as follows:
Cont..
Cont..
Cont..
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Summary
Thank You!