- Joined
- Nov 17, 2011
- Messages
- 13,743
Chris, low pas filtering PWM to obtain an analog value (DC) is the main purpose of filtering PWM at all. At all levels of duty cycle from 0% to 100%. When the RC time constant is long enough, the DC voltage at the output of the filter is DC*Vcc where DC is the duty cycle and Vcc is the operating voltage of the PWM signal.Well perhaps if the high time is 100%.
This method is widely used for generating analog signals. The raspberry pi uses PWM to generate audio. This is possible as the PWM frequency is much higher than the max. reproducible audio frequency of the raspi, thus the filter can have a comparatively high corner frequency. Admittedly the quality is not the best, but this demonstrates the viability of this approach.