Yahoo Groups archive

AVR-Chat

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

Thread

PWM

PWM

2006-01-08 by Anurag Chugh

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...
Anurag

Re: [AVR-Chat] PWM

2006-01-08 by Russell Shaw

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...

R2R is a high component count and uses more space (16 resistors) compared
to one RC filter DAC. The RC filter DAC also does DC output. R2R needs
high tolerance resistors to guarantee monotonicity, but that can be
undone if there are differences between the pin driver voltages.
R2R is better for high-speed things.

Re: [AVR-Chat] PWM

2006-01-09 by Jim Wagner

Each has its place.

R-2R networks take much less filtering. Response speed is
faster. Parts count is higher and it may take parts with
some precision.

PWM is (often) low parts count UNLESS you try to
reconstruct signals that are too close to the PWM
repetition frequency. Then, you can need multiple-pole
filters that require op-amps or more.

Jim



On Sun, 8 Jan 2006 23:18:34 +0530
 "Anurag Chugh" <lithiumhead@msn.com> 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... 
> 
> Anurag

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

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
---------------------------------------------------------------

Re: [AVR-Chat] PWM

2006-01-09 by Thomas Keller

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

Re: [AVR-Chat] PWM

2006-01-09 by Tom Becker

> ... assume that each of these resistance elements is an individual 1% 
tolerance resistor.  Total overall tolerance of the R2R ladder is now 16%...

How do you arrive at that?


Tom

Re: [AVR-Chat] PWM

2006-01-09 by Thomas Keller

Jim Wagner wrote:

>Each has its place.
>R-2R networks take much less filtering. Response speed is
>faster. Parts count is higher and it may take parts with
>some precision.
>PWM is (often) low parts count UNLESS you try to
>reconstruct signals that are too close to the PWM
>repetition frequency. Then, you can need multiple-pole
>filters that require op-amps or more.
>
>  
>
  Sure, but on the other hand, if you need to rresort to complex and 
expensive mutlipole filters, you're probably trying to reconstruct 
compelx signals with a processor that is poorly chosen for the task 
(e.g., isn't fast enough).  Moreover, if your signals are so compl;ex 
that multippole filters are needed, in all probabilty, you should be 
working a a greater resoltion than 8 bits to begin with.

  Of course, some of the AVRs, IIRC, can support up to 10 bit PWM (still 
pretty low resolution for fancy signal porocessing,though).

Tom

Re: [AVR-Chat] PWM

2006-01-09 by Thomas Keller

Tom Becker wrote:

> > ... assume that each of these resistance elements is an individual 1% 
>tolerance resistor.  Total overall tolerance of the R2R ladder is now 16%...
>How do you arrive at that?
>  
>
  Simple mathematics.  The reason tht tolerances are specified as plus 
and minuse is that with any individual ocmponent, you can never know 
which way the value will be off, or by what specific quantity.

  So, with 16 devices each specified to be within + or - 1%, the overall 
tolerance of the network is plus or minus 16%.

  Each comnponent contributes to the overalkl tolerance of  the system.,

Re: [AVR-Chat] PWM

2006-01-09 by gtbecker@rightime.com

> ... Each component contributes to the overall tolerance of  the system...
 
 I have no doubt, but the tolerances simply add?
 
 What happens if, in this case of 16 resistors, one uses 10%-tolerance resistors?  The sum exceeds 100%?  Does the error of either LSB resistance contribute to the system error as do the MSB resistances?
 
 
 Tom


 
Yahoo! Groups Links

Re: [AVR-Chat] PWM

2006-01-09 by Micah Stevens

If you have 10, 100 ohm resistors in series, and each is 1% tolarance, the 
tolarance of the total group is +- 10%.. That is indeed correct, and if each 
is +-10%, then the total tolerance is +-100%.. odd as it may sound. 

In this R2R circuit though, this is not a series circuit. However, without 
really taking the time to do the calculations, I would suspect a similar 
outcome. Each resistor's tolerance would contribute to the tolerance of the 
circuit as a whole in an additive or subtractive manner. 

I would agree with Thomas in this regard. 

-Micah 
Show quoted textHide quoted text
On Monday 09 January 2006 2:13 pm, gtbecker@rightime.com wrote:
>  > ... Each component contributes to the overall tolerance of  the
>  > system...
>
>  I have no doubt, but the tolerances simply add?
>
>  What happens if, in this case of 16 resistors, one uses 10%-tolerance
> resistors?  The sum exceeds 100%?  Does the error of either LSB resistance
> contribute to the system error as do the MSB resistances?
>
>
>  Tom
>
>
>
>  Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
>
> SPONSORED LINKS
> Atmel avr   Microcontrollers   Intel microprocessors
>   Pic microcontrollers
>
>
> YAHOO! GROUPS LINKS
>
>
>  Visit your group "AVR-Chat" on the web.
>  
>  To unsubscribe from this group, send an email to:
>  AVR-Chat-unsubscribe@yahoogroups.com
>  
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Re: [AVR-Chat] PWM

2006-01-09 by Micah Stevens

Why? This isn't a divider circuit. I think I see what you're getting at, but 
I'm not sure I'm buying it. 

-Micah 
Show quoted textHide quoted text
On Monday 09 January 2006 1:57 pm, Jim Wagner wrote:
>  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
>  ---------------------------------------------------------------
>
>
> YAHOO! GROUPS LINKS
>
>
>  Visit your group "AVR-Chat" on the web.
>  
>  To unsubscribe from this group, send an email to:
>  AVR-Chat-unsubscribe@yahoogroups.com
>  
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Re: [AVR-Chat] PWM

2006-01-09 by John Samperi

At 09:08 AM 10/01/2006, you wrote:
>you can never know
>which way the value will be off, or by what specific quantity.
>
>   So, with 16 devices each specified to be within + or - 1%, the overall
>tolerance of the network is plus or minus 16%.

Which could be 0%...in theory of course :-). I have used a Burns R2R resnet
for the past 12 years or so to generate sounds for pedestrian crossing
signals, it is not a HIFI system but never noticed any difference in sound
in the some 20,000 units made (shipped to a few countries too).

By the way the cost is nowhere near the >$2 mentioned  before, it takes very
little room, don't need a buffer as I use the audio amp for buffering.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] PWM

2006-01-09 by Dave Hylands

Hi Micah,

> If you have 10, 100 ohm resistors in series, and each is 1% tolarance, the
> tolarance of the total group is +- 10%.. That is indeed correct, and if each
> is +-10%, then the total tolerance is +-100%.. odd as it may sound.

I don't agree.

Let's take the example, of 10 x 100 ohm resistors with 1% tolerance.
Let's suppose that they're all 99 ohms (worst case low-side
resistance).

If you add up all 10, you get 990 ohms which is still within 1% of the
nominal 1000 ohms that you should have. I don't see where how you
could possibly get 10% of error.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

Re: [AVR-Chat] PWM

2006-01-09 by Micah Stevens

Hi Dave,

Hmm.. I might be a complete fool. I was working on a tube amplifier quite a 
while ago where this bit me in the arse because I was thinking percentages 
and was off by quite a bit of ohms, but your math is quite correct. Sorry 
about typing before thinking. 

-Micah 
Show quoted textHide quoted text
On Monday 09 January 2006 2:38 pm, Dave Hylands wrote:
>  Hi Micah,
>
>  > If you have 10, 100 ohm resistors in series, and each is 1% tolarance,
>  > the tolarance of the total group is +- 10%.. That is indeed correct, and
>  > if each is +-10%, then the total tolerance is +-100%.. odd as it may
>  > sound.
>
>  I don't agree.
>
>  Let's take the example, of 10 x 100 ohm resistors with 1% tolerance.
>  Let's suppose that they're all 99 ohms (worst case low-side
>  resistance).
>
>  If you add up all 10, you get 990 ohms which is still within 1% of the
>  nominal 1000 ohms that you should have. I don't see where how you
>  could possibly get 10% of error.
>
>  --
>  Dave Hylands
>  Vancouver, BC, Canada
>  http://www.DaveHylands.com/
>
>
> YAHOO! GROUPS LINKS
>
>
>  Visit your group "AVR-Chat" on the web.
>  
>  To unsubscribe from this group, send an email to:
>  AVR-Chat-unsubscribe@yahoogroups.com
>  
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Re: [AVR-Chat] PWM

2006-01-09 by Thomas Keller

Jim Wagner wrote:

>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. 
>
>  
>

  Quite right.  My bad.

>What may be more critical is monotonicity, especially the
>step going from 0x7f to 0x80 (in an 8-bit) DAC. 
>  
>
  True enough, I hadn't even thought ot address that issue


tom

Re: [AVR-Chat] PWM

2006-01-10 by Johnathan Corgan

Micah Stevens wrote:

> If you have 10, 100 ohm resistors in series, and each is 1% tolarance, the 
> tolarance of the total group is +- 10%.. That is indeed correct, and if each 
> is +-10%, then the total tolerance is +-100%.. odd as it may sound. 

Uh, no.

Ten, 100 ohm, 10% tolerance resistors in series add to 1000 ohms.

If they are all at the maximum of their range, 110 ohms, then their sum
is 1100 ohms, still +10% of 1000 ohms.

Likewise, at the minimum of their range, 90 ohms, then their sum is 900
ohms, or -10% of 1000 ohms.

Same for 1% resistors.  Same for parallel connection vs. series connection.

-Johnathan

Re: [AVR-Chat] PWM

2006-01-10 by kholt@sonic.net

For my scope testpoints, in my data paths, I always leave
6pin headers for a simple D-A, based on only 6 resistors:
1R,2R,4R,8R,16R,32R.  R's are 1% values, multiples  usually
of 2.048K or another standard value.  Standard 1% values are
not always spot-on the power-of-2 value, however, but I select them
easily with a DVM.  I tie the common sides of the resistors all together
and to the scope probe or audio amp.  It look pretty good, and sounds
reasonable, when the digital outputs are modern CMOS parts.
Sometimes the 6 resistors are permantly soldered onto the board,
standing up(to save space), for a permanent analog testpoint.
Ken
Show quoted textHide quoted text
> At 09:08 AM 10/01/2006, you wrote:
>>you can never know
>>which way the value will be off, or by what specific quantity.
>>
>>   So, with 16 devices each specified to be within + or - 1%, the overall
>>tolerance of the network is plus or minus 16%.
>
> Which could be 0%...in theory of course :-). I have used a Burns R2R
> resnet
> for the past 12 years or so to generate sounds for pedestrian crossing
> signals, it is not a HIFI system but never noticed any difference in sound
> in the some 20,000 units made (shipped to a few countries too).
>
> By the way the cost is nowhere near the >$2 mentioned  before, it takes
> very
> little room, don't need a buffer as I use the audio amp for buffering.
>
> Regards
>
> John Samperi
>
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495       Fax (02) 9674-8745
> Email: john@ampertronics.com.au
> Website  http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

RE: [AVR-Chat] PWM

2006-01-10 by Randy Ledyard

Hey Tom
No argument with your facts there, but have you looked at Futurlec (www.futurlec.com) ?
They list 1% metal film resistors for $0.20/10 - or 2cents each - the only problem with them is they take a long time to ship - from AUS or HongKong - not sure
Show quoted textHide quoted text
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com]On Behalf Of Thomas Keller
Sent: Monday, January 09, 2006 5:00 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] PWM



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).

Re: [AVR-Chat] PWM

2006-01-10 by Robert Adsett

At 11:18 PM 1/8/06 +0530, 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...

Not quite in the same line of thought but no one has mentioned the other 
reason to prefer PWM over R2R in some situations and that is power.  Feed 
the PWM into a power device rather than an RC filter and with a slowly 
responding load like a heater tank or a motor the load itself acts as the 
low pass filter and you avoid the losses that a linear solution would 
entail.  At the cost of ending up with high frequency current transients of 
course.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Re: [AVR-Chat] PWM

2006-01-10 by Roy E. Burrage

It actually is a divider, Micah. Each leg of the R2R ladder divides the output current by 2.


REB


Micah Stevens wrote:
Show quoted textHide quoted text
Why? This isn't a divider circuit. I think I see what you're getting at, but 
I'm not sure I'm buying it. 

-Micah 

On Monday 09 January 2006 1:57 pm, Jim Wagner wrote:
  
 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
    
  

Re: [AVR-Chat] PWM

2006-01-10 by Micah Stevens

Alright, I think me and my big mouth got schooled on this one. Thanks for the 
insight. 
-Micah 
Show quoted textHide quoted text
On Monday 09 January 2006 10:50 pm, Roy E. Burrage wrote:
> It actually is a divider, Micah.  Each leg of the R2R ladder divides the
> output current by 2.
>
>
> REB
>
> Micah Stevens wrote:
> >Why? This isn't a divider circuit. I think I see what you're getting at,
> > but I'm not sure I'm buying it.
> >
> >-Micah
> >
> >On Monday 09 January 2006 1:57 pm, Jim Wagner wrote:
> >> 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

Re: [AVR-Chat] PWM

2006-01-10 by gouy yann

hi all,

if I correctly remember, to known the global error from the individual errors
is somehow like computing the derivative of a function.

where A and B are transfert functions with dA and dB their respective error.

d(A+B) = dA + dB
d(A-B) = dA + dB (always the worst case)
d(A.B) = B.dA + A.dB
d(A/B) = (B.dA + A.dB) / (A.B)

these are the basic relations, just fancy how it quickly becomes quite heavy!!!

regards
   Yann

--- Johnathan Corgan <jcorgan@aeinet.com> a écrit :

> Micah Stevens wrote:
> 
> > If you have 10, 100 ohm resistors in series, and each is 1% tolarance, the 
> > tolarance of the total group is +- 10%.. That is indeed correct, and if
> each 
> > is +-10%, then the total tolerance is +-100%.. odd as it may sound. 
> 
> Uh, no.
> 
> Ten, 100 ohm, 10% tolerance resistors in series add to 1000 ohms.
> 
> If they are all at the maximum of their range, 110 ohms, then their sum
> is 1100 ohms, still +10% of 1000 ohms.
> 
> Likewise, at the minimum of their range, 90 ohms, then their sum is 900
> ohms, or -10% of 1000 ohms.
> 
> Same for 1% resistors.  Same for parallel connection vs. series connection.
> 
> -Johnathan
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 



	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

Re: [AVR-Chat] PWM

2006-01-10 by Thomas Keller

Randy Ledyard wrote:

> No argument with your facts there, but have you looked at Futurlec 
> (www.futurlec.com <http://www.futurlec.com>) ?
> They list 1% metal film resistors for $0.20/10 - or 2cents each - the 
> only problem with them is they take a long time to ship - from AUS or 
> HongKong - not sure


Randy,

  Thanks for the tip.  Being in the US, I don't generally consider 
overseas suppliers, because of the shipping times, and thr shipping 
costs invovled.

  And yes, I have seen similar pricing from US vendors, as well.  I was 
thinking in term sof the average hobbyist, who often purchases things 
like resistors one at a time from a shop such as Radio Shack ()or some 
equivalent).

  As it turns out, price may be the only issue on which I *am* correct.  
Ah, well, I am iused to having my foot in my mouth (I have even learned 
to pass on condiments).

tom

Re: [AVR-Chat] PWM

2006-01-10 by Thomas Keller

Robert Adsett wrote:

>At 11:18 PM 1/8/06 +0530, 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...
>>   Not quite in the same line of thought but no one has mentioned the other 
>>reason to prefer PWM over R2R in some situations and that is power.  Feed 
>>the PWM into a power device rather than an RC filter and with a slowly 
>>responding load like a heater tank or a motor the load itself acts as the 
>>low pass filter and you avoid the losses that a linear solution would 
>>entail.  At the cost of ending up with high frequency current transients of 
>>course.
>>    
>>
  Quite so.  In the  case of the purely resistive load (e.g., a heater 
element),, a complete win.  In the case of rreactive loads such as 
motoros or speakers, the high frewquency transients *CAN* generate a lot 
of heat.  One reason, among many, why it is best when choosing induction 
motors for PWM speed control to seelct motors rated for "inverter service.."

   They have internal insulation that is specoificed to handle both more 
heat, and higher voltages (the high frequency currents can also result 
in high voltage spiking withint the motor windings).

   When worlkgin with PWM for audipo (e.g., Class "D" a,ploifiers) one 
must either use specially designed class D driver chips which use 
techniques permitting filkterless output, or provide appropriate output 
low-pass filtering.  Low pass filtering for a 10 Amp AC circuit can get 
expensive, which is why filterless driver chips are all the rage with 
designers and chip vendors.

   Withoiut the lowpass filter, or a filterless driver chip, you run a 
sigificant risk of cooking the voicecoils in your speaker drivers.  
Particularly in the tweeters.  That can get expensive pretty doggoned fast!

tom

Re: [AVR-Chat] PWM

2006-01-10 by Jim Wagner

This is absolutely true and is a point worth making.

Some loads work well directly driven by PWM. Heaters and
motors are good examples. Typically, these are devices with
a long mechanical time-constant compared to the PWM period.

When you can do this, it it typically more efficient
(power-wise). Fewer or no heat-sinks. Switching devices are
used instead of analog things where linearity may be an
issue. All of these create a cost benefit for PWM. 

All of that said, the cases where you can use PWM in this
way are limited. But, where you can, it really helps.

Jim

On Mon, 09 Jan 2006 23:59:34 -0500
 Robert Adsett <subscriptions@aeolusdevelopment.com> wrote:
> At 11:18 PM 1/8/06 +0530, 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...
> 
> Not quite in the same line of thought but no one has
> mentioned the other 
> reason to prefer PWM over R2R in some situations and that
> is power.  Feed 
> the PWM into a power device rather than an RC filter and
> with a slowly 
> responding load like a heater tank or a motor the load
> itself acts as the 
> low pass filter and you avoid the losses that a linear
> solution would 
> entail.  At the cost of ending up with high frequency
> current transients of 
> course.
> 
> Robert
> 
> " 'Freedom' has no meaning of itself.  There are always
> restrictions,   be 
> they legal, genetic, or physical.  If you don't believe
> me, try to chew a 
> radio signal. "  -- Kelvin Throop, III
> http://www.aeolusdevelopment.com/
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 

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

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.