The term “RMS” stands for “Root-Mean-Squared”. Most books define this as the “amount of AC power that produces the same heating effect as an equivalent DC power”, or something similar along these lines, but an RMS value is more than just that. The RMS value is the square root of the mean (average) value of the squared function of the instantaneous values. The symbols used for defining an RMS value are VRMS or IRMS.
In practical you have to take few samples of the input wave at a fixed interval ,square each sample result, add all of the result, calculate mean of the results and then finally to get final RMS value calculate square root of the mean.
lets see graphically how to calculate true RMS.
in the software rms calculation is done exactly same way ,
hardware consist of few basic components , at the core we have MSP430FR5969 microcontroller which is actually mounted on TI Launchpad board and i have built a booster pack pcb around this board which consist all necessary components to interface this board to mains AC.
as shown in the image above at the input side we have isolation / step down transformer which will step down mains AC to around 20 V peak to peak (at 300V main input) around 7 Vrms . then we have simple potentiometer to further attenuate 20 V peak to peak to around 2.5 V peak to peak ( microcontroller ADC reference voltage is 2.5V ). after attenuation we have standard AC coupled sallen key low pass filter cutoff frequency at 800Hz , output of the filter goes directly to microcontroller ADC input pin for voltage measurement and internal comparator input pin for frequency measurement ,ADC trigger(triggering at same point every time helps to get more stable results).
the isolation , attenuation , and filtering happen on the the board shown in the image above, display is also mounted on same board. display is quite common nokia 5510 / 3315 display , i have having this display from very old project and it is also available in on ebay and other small hobby shops fairly low price. it give resolution of around 84*48 pixels which is okey for our current purposes.
as always all the magic happens in the software. the the software is written in with code composer studio Version: 6.0.1.00040 free edition.
all the source files are available on github. or you can download from this link (may not be latest) .
if you have any questions please ask