>>> Trying to detect the peak value and scale that is IMO a >>> bad idea because a single brief spike could throw the >>> reading way off. > > True, but you can filter first and then detect the peaks. > Each peak is then the result of a bunch of input samples, > and therefore random noise is attenuated. Random noise probably would be attenuated indeed, but what if, for instance, some power SCR/TRIAC-regulated load were present on the line? Tops of the sine would be heavily suppressed, the filter won't restore the shape. > True RMS requires much more computation. Looks like the statement is not true. RMS approach being a "statistic" approach does not require that many measurements per sine period as the peak-detect polling does to achieve the same precision. Considering the fact that PIC24FJxxx got high-speed 17-bit x 17-bit hardware multiplier, we may conclude that the total of required operations per second would be much less. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist