Electronic – AVR ADC can measure rms

adcanalogavrmicrocontroller

I have worked many years with AVRs and know that its ADC has an internal capacitor that if charged well can measure AC voltages (applying an AC voltage gives a number). But what I don't know is that if this is just a feature made by intrinsic nature of them or they are designed to do that. In other words, how reliable this measurement is as a RMS measurement and if this is applicable, should I cut the input signal to remove the negative part of it (for example by a diode) or the pure peak-peak voltage is applicable?

Best Answer

If you want to use an undocumented feature then that's fine but if you want to be safer you need to calculate RMS based on the input waveform being fully within the upper and lower limits of the ADC.

You also need to take enough samples per second so that your RMS calculation fully takes account of harmonics in the waveform.

Removing part of the waveform is OK provided you are dealing with sinewaves (no harmonics) and you take account of this "planned" distortion.