PWM Based DC Motor Speed Control using Microcontroller

In many applications, it is important to control the speed of DC motor where precision and protection are essence. Here we will use a technique called PWM (pulse width modulation) to control the speed of DC motor.
We can achieve speed control of DC motor using mechanical or electrical techniques but they require large size hardware to implement but Microcontroller based system provides easy way to control the speed of DC motor.

PWM Based DC Motor Speed Control using Microcontro

Earlier, we have already seen how to control the speed of DC motor using PWM without Microcontroller. Here we do the same experiment by using a microcontroller.
For that purpose, here we will use ATmega8 controller to produce PWM wave. By varying the width of this PWM wave, we can control the speed of DC motor. In ATmega8 controller, timer1 and timer2 have PWM mode. In this article we will see how to control the speed of DC motor using timer2 PWM mode.

PWM Based DC Motor Speed Control using Microcontroller Circuit Principle:

The heart of this project is ATmega8 controller. These controllers consist of 2 PWM modes. Now we will see   how to generate PWM wave using timer2 PWM mode.
Before writing the program to the PWM mode we need to know the register description of all the registers that are used for PWM mode.
PWM Based DC Motor Speed Control using Microcontroller
OCR2 register contains an 8 bit value that is continuously compared with counter value.
PWM Program:
For more detail:  PWM Based DC Motor Speed Control using Microcontroller


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top