Pulse Width Modulation (PWM) tutorial: free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Pulse Width Modulation (PWM): Introduction


►Introduction

Pulse width Modulation or PWM is one of the powerful techniques used in control systems today. They are not only employed in wide range of control application which includes: speed control, power control, measurement and communication. This tutorial will take you through the PWM basics and implementation of PWM on 8051 and AVR microcontrollers.


►Basic Principal of PWM

Pulse-width Modulation is achived with the help of a square wave whose duty cycle is changed to get a varying voltage output as a result of average value of waveform. A mathematical explaination of this is given below.

square wave

Consider a square wave shown in the figure above.

Ton is the time for which the output is high and Toff is time for which output is low. Let Ttotal be time period of the wave such that,

PWM equation


Duty cycle of a square wave is defined as
Duty cycle PWM equation

The output voltage varies with duty cycle as...
PWM equation

PWM equation

So you can see from the final equation the output voltage can be directly varied by varying the Ton value.

If Ton is 0, Vout is also 0.

if Ton is Ttotal then Vout is Vin or say maximum.

This was all about theory behind PWM. Now lets take a look at the practical implementation of PWM on microcontrollers.



◄ Introduction to PWM  |  8051 PWM Example Code  |  AVR PWM Example Code ►

Back to index


Facebook Fans


Google Search for Microcontrollers!

Google
 

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems