Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] PWM

2006-01-09 by Jim Wagner

Sorry, but wrong about the tolerance! 

Each successive leg has half the tolerance contribution of
the leg just above it in the ladder. With 1% resistors, the
over-all tolerance will be in the 3-4% range. 

What may be more critical is monotonicity, especially the
step going from 0x7f to 0x80 (in an 8-bit) DAC. 

An R-2R DAC also relies on the on-resistance of the FETs in
the logic output circuit. 

Jim


On Mon, 09 Jan 2006 15:59:30 -0600
 Thomas Keller <tkeller1@neb.rr.com> wrote:
> Anurag Chugh wrote:
> 
> > why only PWM?.. why not use an R2R ladder instead with
> precision 
> > resistors...
> > i know they would hog a whole PORT but arent they
> easier to implement ??
> > and they can do DC output values too... a simple opam
> in front 
> > (voltage follower) will boost current output too... 
> > i am sure most people dont use R2R... but please tell
> me why?? i know 
> > there must be a reason...
> 
> Anarag:
> 
>   I can speak only for myself.   Consider an R-2R ladder
> for 8 bit DAC:  
> it contains 16 resistance elements.  Now, let us assume
> that each of these resistance elements is an indiivdual
> 1% tolerance resistor.  Total overall tolerance of the
> R2R ladder is now 16% (not very good, is it?)   1%
> resistors cost between $0.15 and $0.25, depending on
> where you purchase them and how many you purchase 9unless
> you're puschasing thousands, of course).  Somewhere
> between $2.40 and $4.00 for A +/- 16% dac?  *HORRIBLE*
> Assuming you can obtain (at any price) +/- .1% resistors
> (at any price), you still have only +/- 1.6% tolerance,
> at a trmendously higher price.
> 
>   Now, consider 8 bit PWM as implemented using an AVR.
>  Tolerance is 
> going to be +/- 1/255 of Vcc.  Assuming a +/- 5%
> tolerance on your Vcc (which you *REALLY* ought to have,
> for correct AVR operation), this yields an "absolute"
> tolerance of  +/- 1.9%, at ZERO additional hardware cost
> (unless you need post filtering, in which case, a .25W,
> 5% resistor and a small cap cost what, maybe $0.25 in
> combination?).  Of course, there is the question of
> software devlopment costs, but 1) those are one time
> engineering costs, not repeating BOM (bill of materials)
> costs, and 2) let's face it, PWMing ADC is pretty
> straight forward, and takes very little time and effort
> to program, thanks to the foresight and engineering
> skills of the engineers at Atmel.
> 
>   Granted, 8 bit PWWM isn;t going to yield great results
> for, say audio 
> purposes, but then, neither is an 8 bit R2R ladder (in
> fact, pretty much exactly the same results, in terms of
> signal fidelity/distortion).
> 
>   If I have gone on too long, my apologies.
> 
> Tom

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

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.