
Originally Posted by
Charles Linquis
If you are going to measure true RMS, and you need cycle-by-cycle measurements, then you need to take about 17 samples per half cycle for really good accuracy.
But I doubt you need answers that fast. You can probably just sample at your heart's content (fairly slowly), as long as you sampling rate is not a multiple or sub-multiple of the line frequency. If you sample at a 13 Hz rate, for example, and sample for 2 or 3 seconds, then you will "grab" the cycle at various parts of the waveform. Square each reading, sum them up and divide by the number of samples. Since you are using a 16F chip (why do people keep using them?), you can't use PBPL to easily deal with the sum of squares you will accumulate.
If you *are not* after an RMS reading, then you should peak-detect the AC with a bridge rectifier, store those peaks in a capacitor, take one reading, divide by two or three and be done with it.
The AC mains have a very low impedance, so true RMS probably isn't necessary to measure line voltage accurately. Current, however, is another matter.
Bookmarks