In Reply to: Conversion of PWM to an average DC level posted by John on 04/10/01 at 9:15 AM:
It looks like you are trying to make a low-pass filter to derive a square pulse train's variable duty cycle as a DC level equal to the average value of that pulse train. Your 10K and 10 µF combination sound like a single-pole low-pass filter with a time constant of 0.1 second. This would correspond to a radian cut-off frequency of 10 radians per second, or 1.59 Hz.
Appropos of "smooth", the output of whatever filter you devise will always have at least some ripple at the frequency of the input waveform no matter what the transfer function of that filter may be. However, with such a low cut-off frequency, the presence of "a lot of noise" cannot be readily explained except perhaps in some details of construction which are somehow not satisfactory.
I cannot be specific in a suggestion of how to proceed, but I think the key is that your filter should be constructed in a physically small fashion with leads made a short as is practical. If noise is a persistent problem, consider assembling the filter inside of a metal chassis and also consider the use of shielded cables for both the input and the output.
Another thought: If your filter is inside of a feedback loop, check for feedback loop stability. The "noise" miight actually be a loop oscillation getting ready to happen.
John Dunn - President