How to measure only the true RMS AC component of the waveform in an ADC?
Decide on what window you want the AC RMS value over.
Determine the mean of the samples in the window.
For each sample, subtract the mean.  Square each sample and sum them together.
Divide the sum of the squares by the number of samples.  This is the mean squared value.
Take the square root of that result to obtain RMS.  Note that it will rarely be zero.  The mean will be close to zero, which is why we're using it as a reference value here to subtract the DC component.