## What is pulse width modulation(pwm) and how it works

Share

#### Article background

In this article you will learn about pulse width modulation(PWM) theory of operation and practical applications. Subscribe to enable complete access to all technical articles, online tests and projects.

This article will help you to gain required knowledge to successfully complete , , subsequently complete and earn course completion certificate for software jobs.

For practical applications of pulse width application(PWM), go to project .

#### Pulse width modulation

Pulse Width Modulation(PWM) is a modulation technique by which the width of a pulse is changed while keeping the frequency constant. PWM is one of the powerful techniques used in control systems today. It is used in wide range of application which includes: speed control, power control, measurement and communication.

The speed of a DC motor is dependent on the load given to it, voltage and current supplied to its input. For a fixed load we can control the power supplied to the DC motor by changing the width of the pulse applied to the DC motor. When power changes the speed of the motor also changes accordingly.

As shown in the above figure a pulse has on-time and off-time. On-Time is the duration of time signal is high. Off-Time is the duration of time signal is low. The longer the on-time of the pulse the more the voltage provided by the pulse. Period is represented as the sum of on-time and off-time of PWM signal. Duty cycle is represented as percentage of time signal remains on during the period of the PWM signal. As shown in the figure, Ton denotes the on-time and Toff denotes the off time of signal. Period is the sum of both on and off times and is calculated as shown in the equation below:
Ttotal = Ton + Toff

Duty Cycle is calculated as on-time percentage of the time period. Using the period calculated above, duty cycle is calculated as:
D = Ton/(Ton + Toff)
PWM signal when used at different duty cycles gives a varying voltage at the output.

#### Software PWM vs Hardware PWM

You need to subscribe & logged in

Share

#### C Programming

 Embedded c programming novice to professional in 24 hours Storage classes in C C standard library function fgets with example C programming compiler errors warnings debugging strcpy strncpy in c example illustration C programming debugging exercises assignments solutions Data types in C with examples State machine implementation in C example Functions in C examples How to write makefile in linux for c Strings in C examples Pointers in C examples Memory layout of C program in linux Structure in C Union in C Bit fields in C Arrays in C strcat, strncat, strcmp, strncmp, strchr, strrchr library functions

#### Search Code Snippets

 Search more C examples Search more C MCQs

#### Online certificate courses

 Linux software development C programming & applications Embedded systems development