Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |   Electronics Reference Design Library  |   AVR    |    PIC    |    8051    |    Electronic Projects

Speed Control Using PWM Modulation


Table of Contents:

  1. Speed Control Using PWM Modulation
  2. Block Diagram and Implementation
Harshad Ambulkar
Harshad Ambulkar

Today’s industries are increasingly demanding process automation in all sectors. Automation results into better quality, increased production an reduced costs. The variable speed drives, which can control the speed of A.C/D.C motors, are indispensable controlling elements in automation systems. Depending on the applications, some of them are fixed speed and some of the variable speed drives.

The variable speed drives, till a couple of decades back, had various limitations, such as poor efficiencies, larger space, lower speeds, etc., However, the advent power electronic devices such as power MOSFETs, IGBTs etc., and also with the introduction of micro -controllers with many features on the same silicon wafer, transformed the scene completely and today we have variable speed drive systems which are not only in the smaller in  size but also very efficient, highly reliable and meeting all the stringent demands of various industries of modern era.

Direct current (DC) motors have been used in variable speed drives for a long time. The versatile characteristics of dc motors can provide high starting torques which is required for traction drives. Control over a wide speed range, both below and above the rated speed can be very easily achieved. The methods of DC Motor speed control are simpler and less expensive than those of alternating current motors.

In this project, speed control is attained using PWM (Pulse Width Modulation) technique and PWM generation is done using microcontroller.


Pulse width modulation (PWM) is a method for binary signals generation, which has 2 signal periods (high and low). The width (W) of each pulse varies between 0 and the period (T). The main principle is control of power by varying the duty cycle. Here the conduction time to the load is controlled. Let for a time t1, the input voltage appears across the load i.e. ON state and for t2 time the voltage across the load is zero.

• The average voltage at output is given by

Va = Vmax. *    


TON      =Time period for Pulse ON,

TOFF     =Time period for Pulse OFF


• The average load current Ia= Va/R = kVs/R where, T is the total time period =t1+t2, k = t1/T is the duty cycle.

• The duty cycle can be varied from 0 to 1 by varying t1, T or f. Therefore, the output voltage V0 can be varied from 0 to Vs by controlling k, and the power flow can be controlled.

• As the time t1 changes the width of pulse is varied and this type of control is called pulse width modulation (PWM) control.

For better understanding of PWM these diagrammatic representations can be used. These figures represent the waveforms obtained as output at different voltage requirements.

High Speed Signal (90%):The green part of the signal represents the ON time and the white part of it represents time when it is not receiving any voltage

High speed Signal

Signal with half voltage (50%):

Half Speed Signal


Signal with low voltage (10%):

Signal with Low Speed

In this way the average value of resultant voltage is varied. When pwm technique is used to control the speed of dc motor, the average value of voltage given to motor is varied in similar manner, hence varying the speed of the motor.


Pulse width modulation is implemented using a microcontroller, dependent on an input value for generating variable pulse widths, for driving motor at variable speed.

Therefore, the input value used is given with the help of potentiometer.


The 2 terminals of potentiometer are connected to Vcc& GND, resulting in variable voltage in range of 0-5V, in the terminal W of potentiometer. This pin serves as the input for microcontroller.

The ATmega8L has inbuilt 10 bit ADC (Analog to Digital Converter), which means it can convert any analog value between 0-5V to digital value of 10 bit resolution.

The program for generating results for pulse width is written into microcontroller’s memory using ISP (In System Programmer).

The variable output (between 0-5V) goes to the A (Analog Input) pin of the ADC (Analog to Digital Converter) of the microcontroller and gets converted into 10 bit binary value. This 10 bit binary value gets converted into corresponding decimal value of range 0-1023 (as 210=1024), which is responsible for triggering the output pin of microcontroller, for particular time duration, which further triggers the MOSFET for same duration.

Circuit Diagram

Source Code

This Code is only visible to Registered users. Please Login/Register



Learn about the latest applications and industry trends with tutorials and white paper design resources on vertical markets.

Energy Harvesting
MEMS Technology
OpenSource Hardware
RF Wireless
Wireless Charging


You are here