At 04:05 PM 8/2/97 EDT, you wrote: > Then... there's the DSP approach! I don't know if the PIC is >fast enough to get enough samples (especially sampling four lines). If >you're not in a hurry, maybe you could use some sort of sub-sampling >where you move a little further into the cycle to sample on each >successive cycle, reducing sample rate to 60 (or 50) times per second, >but it would take a bunch of cycles to get a result (hoping that the >waveform is relatively stable during that time). However you get the >samples, square each one, add them up, divide by the number of samples, >then take the square root. RMS voltage! Moving complexity from hardware >to software at its best! > Sounds like something fun to play with. Lemme know your >thoughts! Hi Harold, Now I find the software approach very interesting. Given the incoming AC is full wave rectified at 20v and divided down to a voltage between 0 and 5v (I suppose we can neglect the symmetrical diode drops), then I take it that all I need to do is:- 1. Determine efficient number of samples to acquire over the period of the waveform, for improved precision I suppose this could be 16 periods etc. At a sample time of say 50us for a 50Hz waveform gives 400 samples and do this over 16 periods gives 6400 samples. 2. Perform the algorithm you describe above in the most efficient manner taking into account the execution time and its relationship to the system time constant - is it that simple ? Rgds mike Perth, Western Australia