Tag Archives: digital to analog convertor.

Introduction to PWM – Pulse Width Modulation.

A digital device like a microcontroller can easily work with inputs and outputs that has only two state, on and off. So you can easily use it to control a LED’s state i.e. on or off. In the same way you can use it to control any electrical device on/off by using proper drivers (transistor,triac, relays etc). But sometimes you need more than just "on" & "off " control over the device. Like if you wanna control the brightness of a LED (or any lamp) or the speed of DC motor then digital (on/off) signals simply can’t do it. This situation is very smartly handled by a technique called PWM or Pulse Width Modulation. PWM is the technique used to generate analogue signals from a digital device like a MCU. Almost all modern MCUs have dedicated hardware for PWM signal generation. In this tutorial we will learn the basics of PWM technique and later on we will see how to implement PWM generation with AVR microcontrollers. PWM : Pulse Width Modulation A digital device, like a microcontroller can only generate two levels on its output lines, HIGH=5v and LOW=0V. But what if we want to generate 2.5v or 3.1v or any voltage between 0-5 volt output ? For these kinds of requirement, instead of generating a constant DC voltage output […]