Solution
AC noise can be filtered out of DC measurements with a low-pass filter. To build a low-pass filter, simply set up the RC (Resistor-Capacitor) circuit shown below. Choose the resistance and the capacitance so that the cut-off frequency is below the frequency of the noise signal you want to reject. The cut-off frequency is computed by:
Cut-off Frequency = 1/(2 x pi x R x C)where:
R = resistor value in Ohms
C = capacitor value in Farads
If a hardware filtering solution is not desirable, it's also possible to eliminate noise
purely in software.