Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Question about using PWM to an RC

2006-01-07 by James Washer

Below is my (limited) understanding of PWM DAC.. I'm just looking for comments regarding (any) mistakes in my understanding.

Assume we are driving the DAC with an AVR and the DAC's load has infinite impedance (i.e. opamp voltage follower or some such circuit)

When using PWM to "charge" the capacitor in an RC to do DAC, one generally chooses a time constant much greater than the PWM frequency.  If I'm thinking about this correctly, the larger the RC, the lower the "ripple". 

However, the larger the time constant, the lower the response of the DAC.  i.e. since it takes ~5RC seconds to hit  ~99% charge on the cap, the larger the RC, the longer it will take for the DAC to settle on a given voltage.

Assuming these two points are  true, then the tradeoff becomes ripple vs responsiveness. Is this correct?

Finally, I would assume one needs to worry about the "ratio" of R to C.  If one chooses a LOW resistance and a large capacitance, we might still have a reasonable RC compared to the PWM frequency, however, we'll also have large currents on the AVR pin. Is this correct?

Further is one chooses a high resistance with small capacitance, the circuit becomes more sensitive to it's output load.

Thanks for reading this far.. Please correct any mistakes... I'm a beginner at all of this.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.