>> 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. Be aware that RMS computation, especially over shortish periods (seconds rather than minutes) really wants integral cycles. The same real world things that may cause problems with peak detect MIGHT cause some problems with whole cycle detect. Also, once you add in SCR/Triac control then the RMS sampling needs to be fast enough to not alias the introduced harmonics. Voltage rate of rise time from zero crossing was suggested. This may have problems if zero crossing is uncertain. BUT "maximum rate of voltage change" will occur symmetrically around zero crossing and may be a quite productive system. eg maintain N sample memories in FIFO. Determine rate of voltage change between adjacent samples and store N samples. Push new value and calculate slope of FIFO. Could be delta V between 1st and last or use all samples in FIFO by weighting samples in some way. Whatever. Store maximum value. When delta V goes negative that half cycle is ended. Average N maxima - maybe with the filter mentioned previously* or whatever. (*Vo(n+1) = Vo(n) x (k-1)/k + Vin(n+1)/k). Vsine = k.delta.V. May even work :-). Russell -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist