> I'm planning on sampling/reading the input voltage some ... 100? times / > second, and perform a ... FFT or something simpler upon it. > > Can you suggest the simplest way to achieve that result? A FFT is overkill unless you actually want to measure the harmonics. 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. Taking the average of the magnitude and scaling it would probablly be a reasonable option. True RMS is also pretty easy to calculate (square the individual values, average them and take the square root at the end) Ideally for stable values you should detect the zero crossings and do your averaging (whether true RMS or average of the magnitude) over a whole number of half-cycles. Also 100Hz is about the worst choice of sampling rate you could pick. Combine that with a 50Hz waveform and you may miss all the peaks! If you want good results from simple algorithms within a single cycle i'd suggest at least 1KHz. If you are averaging over many cycles and can't afford to sample quickly make sure you select a sample rate that is NOT a multiple or subdivision of the supply frequency! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist