> 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. Actually, if you took enough samples at different points in the wave you'd probably do okay regardless of where those points were. Of course, if you just sample periodically you run the risk that your period and the wave's might coincide. But if you use methods to randomize your sampling times you should get decent results (nb: you'll need more samples than if you know the waveform's period and subdivide it, but you'll avoid the really bad cases associated with "simple" periodic measurements).