Consider PWM signal

When using microcontroller and want to drive motor control or control led intensity you can use DAC to generate analog output voltage. But there is an easier way of doing this. You can use digital output to reach same results. This technique is known as PWM – Pulse Width Modulation.

image001.png

In this picture you can see 50% duty cycle square wave form. The width of “1” is equal to “0” level, this means if signal amplitude is 5V, then average voltage over one cycle is 2.5V. It is as though  of hawing constant 2.5V voltage.

If you have 10% duty cycle, then your average voltage would be 0.5V.

You should use low pass filter to convert pulses to analog voltage:

image003.png

This is like digital to analog converter without DAC.

You can use PWM to drive LED to change light intensities. Also it can be used to generate audio by changing frequency of duty cycle. DC motors can also be controlled effectively by PWM.

Blogsphere: TechnoratiFeedsterBloglines
Bookmark: Del.icio.usSpurlFurlSimpyBlinkDigg
RSS feed for comments on this post
 |  TrackBack URI for this post

New on WinAVR Tutorial
Running TX433 and RX433 RF modules with AVR microcontrollers,
Sometimes in embedded design you may want to go wireless. Might be you will want to log various readi …
Programming AVR ADC module with WinAVR,
Most of AVR microcontrollers have Analog to Digital Converter (ADC) integrated in to chip. Such solut …
New on WinARM Tutorial
What are differences between WinARM and WinAVR,
Everyone who is working with AVR microcontrollers knows this powerful tool – WinAVR (http://win …
LPC2000 watchdog timer,
As in all microcontrollers watchdog timers purpose isto reset microcontroller after reasonable amount …

3 Responses to “Consider PWM signal”

  1. Mark Says:

    I am hoping to use this idea for a project. I want to send a PWM signal from a microprocessor, and, through the duty cycle, create a corresponding analog voltage. This is straight out of the article. The problem is, this analog voltage has to be a constant voltage, it cannot be varying (ie from your example of a 50% duty cycle and a 5V amplitude we would see an average 2.5V analog voltage, but i need this 2.5V to be effectively constant instead of just averaged). I dont know if the low pass filters can effectively achieve this or what. Any help would be greatly appreciated!

  2. scienceprog Says:

    You may try to look at so called
    Buck-Converter
    And of course Wikipedia

    I hope this gives some idea…

  3. Avinash Says:

    Hi,
    if i want to generate analogue waveform (sin of frequency f) then what is the value of C and R required to get undistorted output.

Leave a Reply