Searching \ for 'pwm?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/pwm/index.htm?key=pwm
Search entire site for: 'pwm?'.

Truncated match.
PICList Thread
'pwm?'
2005\04\26@155210 by rumpelteazer666

picon face
every pic tutorial has a lesson about using pwm to vary the intensity of a led, but i couldn't find something that explained how it works in theory. Recently someone has posted a message suggesting to use pwm to get an analog voltage. How does that work? Let's say i send a square wave to resistor-led, does the intensity of light depend on the duty cycle of the wave? And if yes, is it just for an optical effect, or there is some electrical law behind it? in the latter case, what would be a general method to obtain an analog voltage through it? i know they are very stupid questions, sorry for that and thank you in advance for any enlightening answer :)

2005\04\26@160700 by Harold Hallikainen

face picon face
There are no stupid questions! With the LED, your eye is interpreting a
quickly flashing light as continuous. Further, your eye interprets the
duty cycle as a variation in brightness of the LED.

A unipolar PWM signal (ie, 0V to 5V) has a DC component that is the duty
cycle times the peak voltage. A low pass filter attenuates the AC
component (above the cutoff frequency), leaving the DC component. By
choosing your PWM frequency and cutoff frequency (and sharpness of the
filter), you can adjust the PWM to generate a low frequency (relative to
the PWM frequency) analog voltage.

Harold


> analog voltage through it? i know they are very stupid questions, sorry
> for
> that and thank you in advance for any enlightening answer :)


--
FCC Rules Updated Daily at http://www.hallikainen.com

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...