Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Himanshu on January 27, 2012, 09:43:42 AM

Title: implementing PWM
Post by: Himanshu on January 27, 2012, 09:43:42 AM
Hello,
           i want to know how to implement pulse width modulation(PWM) on a circuit, what additional components like resistance and capacitor are required.
also i want to know how to implement PWM on 8051 microcontroller.
Title: Re: implementing PWM
Post by: pterrus on January 27, 2012, 10:10:14 AM
I'm thinking about using an LM555 timer IC as a PWM generator.  Hook it up in astable mode like this (http://en.wikipedia.org/wiki/555_timer_ic#Astable).  Full disclosure: I haven't actually tried it yet.  But it should work!
Title: Re: implementing PWM
Post by: newInRobotics on January 27, 2012, 12:47:21 PM
Circuit below will generate PWM with variable duty cycle. Change Cap or Pot value to get different frequency.
Title: Re: implementing PWM
Post by: Soeren on January 27, 2012, 02:26:18 PM
Hi,

Change Cap or Pot value to get different frequency.
First it needs to be rearranged a bit ;)
As shown, it's possible (likely even) to short pin 7 to Vcc (Not Vdd, it's an analog device), which will kill the internal transistor driving this pin.


I have attached an example of a PWM circuit that works reliably and relates M/S ratio closely to pot-position.