piclist 1998\10\01\193623a >
Thread: Possibility of using the PWM output as a proportional DC output??
www.piclist.com/techref/io/pwm/index.htm?key=pwm
picon face BY : Peter Strong email (remove spam text)



Presumably you have a series resistor in front of the cap :-)

A better cct can be made from a simple active filter based on a single
opamp. PWM from PIC to R1 to inverting input of op-amp, non inverting input
to 0v. Output of op-amp to inverting input via R2. Put C1 in parallel with
R2. If R1=R2 then gain is 1. If you need gain then Gain=R2/R1. For 3KHz core
PWM try R1=100K, R2=100K, C1=470nF. You should get very little ripple but
response time will be slowish. For faster response at the expense of a
little ripple, reduce C1.
When PIC VDD=5v. 50/50 PWM=0v. 1/99 PWM = plus 2.49v. 99/1 PWM = minus
2.49v.
If you want the output to swing 0v to 5v proportional rather than plus and
minus about 0v then bias the non-inverting input with 2.5v. Then 50/50 PWM =
2.5v etc. You'll need to power the opamp from a split rail to get positive
and negative swings about 0v. If you've only got 5v then you should use a
rail to rail input, rail to rail output opamp and bias the non-inverting
input with 2.5v. Two 100K's in series between 5v and 0v, connect centre tap
to non inverting input. I hate ASII art for circuits cos they nearly always
get scrambled by the email reader. If you're desperate and can't understand
the text, mail me off list at .....peter_strongKILLspamspamspam_OUTmsn.com and I'll attach a
schematic to my reply.


{Original Message removed}
<007401bded92$4dfbd600$0600a8c0@Daewoo> 7bit

See also: www.piclist.com/techref/io/pwm/index.htm?key=pwm
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Possibility of using the PWM output as a proportional DC output??

month overview.

new search...