Return-Path: Received: (qmail 51020 invoked from network); 13 May 2004 20:43:07 -0000 Received: from unknown (HELO ptb-mxscan03.plus.net) (212.159.14.237) by ptb-mailstore04.plus.net with SMTP; 13 May 2004 20:43:07 -0000 Received: (qmail 25468 invoked from network); 13 May 2004 20:43:06 -0000 X-Filtered-by: Plusnet (hmail v1.01) X-Spam-detection-level: 11 Received: from ptb-mxcore03.plus.net (212.159.14.217) by ptb-mxscan03.plus.net with SMTP; 13 May 2004 20:43:05 -0000 Received: from post.thorcom.com ([193.82.116.20]) by ptb-mxcore03.plus.net with esmtp (Exim) id 1BON2n-0006UW-JL for dave@picks.force9.co.uk; Thu, 13 May 2004 21:43:05 +0100 X-Fake-Domain: majordom Received: from majordom by post.thorcom.com with local (Exim 4.14) id 1BON2J-0003qW-HV for rs_out_1@blacksheep.org; Thu, 13 May 2004 21:42:35 +0100 Received: from [213.232.95.59] (helo=relay.salmark.net) by post.thorcom.com with esmtp (Exim 4.14) id 1BON2J-0003qN-0v for rsgb_lf_group@blacksheep.org; Thu, 13 May 2004 21:42:35 +0100 Received: from mailfe04.swip.net ([212.247.154.97]) by relay.salmark.net with esmtp (Exim 4.24) id 1BOTah-0007P1-3G for rsgb_lf_group@blacksheep.org; Fri, 14 May 2004 04:42:31 +0100 X-T2-Posting-ID: 3bgU4LVfFOB/SKpu7D1OzA== Received: from [212.151.19.172] (HELO oemcomputer) by mailfe04.swip.net (CommuniGate Pro SMTP 4.2b4a) with SMTP id 40447035 for rsgb_lf_group@blacksheep.org; Thu, 13 May 2004 22:42:30 +0200 X-Bad-Message-ID: no DNS (oemcomputer) Message-ID: <003d01c4392a$d0b5c6c0$ac1397d4@oemcomputer> From: "Johan Bodin" To: rsgb_lf_group@blacksheep.org References: <40A2578C.2080600@usa.net> <003301c438f8$97eaaa40$511297d4@oemcomputer> <40A3913E.9000406@usa.net> Date: Thu, 13 May 2004 20:42:00 -0000 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Score: 0.1 (/) X-Spam-Report: autolearn=no,RCVD_IN_SORBS=0.1 Subject: LF: Re: Re: VDC source with microvolt resolution Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on post.thorcom.com X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-SA-Exim-Scanned: Yes Sender: owner-rsgb_lf_group@blacksheep.org Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group X-SA-Exim-Rcpt-To: rs_out_1@blacksheep.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-PN-SPAMFiltered: yes X-Spam-Rating: 2 Hi Alberto, > It rests to see if the AT90S8535 (you know that, do you ? :-) allows this > "change over the nose" of the PWM limits fast enough to be effective. I can't see that as a problem. Timer1 overflow flag works in PWM mode too so it is possible to write an interrupt routine that is synchronized to the PWM cycle. Every time the ISR is fired, it reads the 20-bit value from a global and updates the 10-bit PWM control register with either N or N+1, according to the "sub-PWM" algorithm. I like Stewart's idea of maximizing the dither frequency by spreading the N+1 corrections all over the main PWM cycles but I don't know enough math for optimizing it. What if the value of the 10 LSBits is 1 for example? It cannot be spread out and there will be some some Fpwm/1024 frequency component (although very small). > Given that a correction does not happen more often than once every 30 > seconds, also the lowpass filtering of the control voltage should not be a great > problem (maybe). Assuming 8MHz clock on the '8535 (Yes, I know it :-), main PWM frequency is 3910 Hz max in 10-bit mode. Adding a 10-bit sub-PWM brings the lowest frequency component down to 3910/1024 = 3.8 Hz. A 3:rd order LPF with 0.3 Hz cut-off, or so, should be about 60 dB down at 4 Hz and still have a reasonably fast response. With more filter poles you should be able to put the cutoff "knee" closer to 3.8 Hz and get faster response without sacrificing "sub-PWM" ripple rejection. Maybe a Bessel response is preferable to avoid overshoot although Bessel has a very "lazy" roll-off compared to Butterworth et. al. 73 Johan SM6LKM