Yahoo Groups archive

AVR-Chat

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

Thread

Question about using PWM to an RC

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.

Re: [AVR-Chat] Question about using PWM to an RC

2006-01-07 by Tom Becker

> ... I'm a beginner at all of this.

One would never know; you have a good grasp.

PWM DACs are based on averaging pulses to a corresponding equivilent 
voltage or current.  The average is usually generated by using an RC, a 
simple filter that reduces high-frequency components, and it's values 
depend on your need.

If you are generating a stable DC offset voltage, for example, you need 
a long time constant - perhaps limited by the load resistance.  If 
you're generating an AC signal, the filter needs to be faster - perhaps 
limited by the source impedance.  In both cases the instantaneous error 
is caused by the filter characteristics and, in both cases, an opamp can 
help.


Tom

Re: [AVR-Chat] Question about using PWM to an RC

2006-01-08 by Thomas Keller

James Washer wrote:

>Below is my (limited) understanding of PWM DAC.. I'm just looking for comments regarding (any) mistakes in my understanding.
>  
>
  I am confused.  Why wouldyou drive a DAC with PWM?  If you're using a 
DAC, just output the digital value to the DSAC, either in parallel or 
serial format (depending onthe DAC).  Or, use PWM to accomplish Digital 
to Aanlog conversion.  Why would you combine the techniques?  Using PWM 
makes the DAC superfluous and redundant.

tom

P.S.  someone do correct me if I am mistaken in this

Re: [AVR-Chat] Question about using PWM to an RC

2006-01-08 by Thomas Keller

Thomas Keller wrote:

>>Below is my (limited) understanding of PWM DAC.. I'm just looking for comments regarding (any) mistakes in my understanding.
>>   I am confused.  Why wouldyou drive a DAC with PWM?  If you're using a 
>>DAC, just output the digital value to the DSAC, either in parallel or 
>>serial format (depending onthe DAC).  Or, use PWM to accomplish Digital 
>>to Aanlog conversion.  Why would you combine the techniques?  Using PWM 
>>makes the DAC superfluous and redundant.
>>tom
>>P.S.  someone do correct me if I am mistaken in this
>>    
>>
  sheesh*here I am replying to myself.  In reading the many responses to 
this message, I realize that I was, indeed, confused about what was 
being asked.  *heh*  Open Mouth,

tom Insert Foot

Re: [AVR-Chat] Question about using PWM to an RC

2006-01-08 by James Washer

No problem.. I likely stated my questions poorly... i.e... I'm using PWM and a L.P filter to creat a DAC

On Sat, 07 Jan 2006 21:39:58 -0600
Thomas Keller <tkeller1@neb.rr.com> wrote:
Show quoted textHide quoted text
> Thomas Keller wrote:
> 
> >>Below is my (limited) understanding of PWM DAC.. I'm just looking for comments regarding (any) mistakes in my understanding.
> >>   I am confused.  Why wouldyou drive a DAC with PWM?  If you're using a 
> >>DAC, just output the digital value to the DSAC, either in parallel or 
> >>serial format (depending onthe DAC).  Or, use PWM to accomplish Digital 
> >>to Aanlog conversion.  Why would you combine the techniques?  Using PWM 
> >>makes the DAC superfluous and redundant.
> >>tom
> >>P.S.  someone do correct me if I am mistaken in this
> >>    
> >>
>   sheesh*here I am replying to myself.  In reading the many responses to 
> this message, I realize that I was, indeed, confused about what was 
> being asked.  *heh*  Open Mouth,
> 
> tom Insert Foot
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
>

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.