Re: AC voltage measurement using pic
Hi,
Peak, RMS, average rectified:
What value do you need? I guess nobody can´t tell you. You need to decide.
And how do you want to measure/claculate it?
And what resolution, what precision and what accuracy do you expect?
****
Many people want to display RMS. But they do a number of ADconversions and find the peak value. Then they simply multiply them with 0.707 and think they have RMS.
But what they do is just an estimation about RMS. (they don´t calculate RoutMeanSquare).
And the result is only true if the input signal as a pure sine signal without overtones and without noise.
But how do they know that the input is pure sine? Either they KNOW it, or they use filters, or they just hope it.
Because they use only one of all of the sampled values they take all of the errors that is included in this single value. End even worse they most probably focus on a single value with excessive high error.
Errors like noise, switching peaks, distortion cause voltage peaks. The higher the error, the higher the peaks. And because they use the value of the highest voltage there is a good chance they choose the value with the highest error.
*****
RMS and rectified average value take ALL the samples into account and therefore the error is also averaged. Both are better than the single peak value measurement.
But rectified average depends on waveform. If the input ideviates from a pure sine, then the result contains some error. How much? Noboby knows. But definitely it´s far better than the peak method.
****
Therefore my recommendation: If you want to display RMS then you should measure and calculate RMS. It´s the most precise method. It is independent of waveform and it introduces about no error.
The calculated value is very accurate.
****
On the other hand for rectified average and RMS you need a fixed known sampling rate and you need some programming skills.
Both need some time and mathematics to calculate sampling frequency and so on..
***
In any case you should know the input signal it´s overtones, it´s noise and it´s errors... it´s behaviour in time.
And you need to know how often you need a result. Maybe once in 15 minutes, maybe 3 times a second, maybe every fullwave, maybe faster...
***
Now it´s on you to decide which way to go.
Klaus