cancel
Showing results for 
Search instead for 
Did you mean: 

Oscillation in ADC measurement of DC value

SSone.1
Associate III

Hi everyone. I am trying to measure the voltage of each battery connected in series to other. I am measuring voltages over voltage divider to reduce voltage below Vdda. When I measure the voltage of node with multi-meter there is no oscillation seen. But the ADC values oscillates with about 10-20mV. I plotted the voltages that I am reading with ADC. You can see the oscillation from there. As far as I understand from multi-meter measurement(which is not oscillating) the reason for oscillation is something related with ADC. Is it true? If yes what should I do to prevent that? If no what is the reason for that oscillation and again what should I do to prevent? (ADC resolution is 12 bit, grounds are common everywhere and there is no current draining except for voltage dividers.) I don't know if it could be related to this problem but just in case I wan't to say that I am going in sleep mode for pre-determined time after measuring voltages and sending them over UART and then waking up and then it goes on like that. Thanks in advance, I hope I have explained it clearly.

The circuit that I used to measure voltages.(I used AA battery instead)

0693W000001pJhtQAE.jpg

Graphs I plotted.

0693W000001pJi8QAE.jpg

4 REPLIES 4
TDK
Guru

ADC results will have a few bits of noise in them, unless you take significant steps to reduce noise.

Multimeters don't show this because they average the value over many samples and display the averaged value. Effectively making a very low pass filter on the reading.

If you feel a post has answered your question, please click "Accept as Solution".
KnarfB
Principal III

There are some app notes like "How to get the best ADC accuracy..." that might give you additional insights.

You could also do some "high freq" continous ADC measurements to find out if the spikes come in a certain pattern/frequency like 50/60 Hz.

You can also add filtering the measurement results (average, median, Kalman...)

Nikita91
Lead II

I see at least 1 thing that is not optimal for analog measurements: The resistance values of the voltage divider are high (up to 90 Kohms), which makes the measurement very sensitive to the ambient noise (there are digital circuits not far away...)

You measure battery voltages, therefore almost static. An easy way to improve accuracy: Take 16 measurements per channel and average (this increases the accuracy of 4 bits). Nothing prevents us from averaging even more measurements.

To lower the noise, put a low ESR capacitor in parallel with the low resistor of the divider (10-100 nf ceramic).

By the way 10/20 mV is quite low, especialy if your display unit is 100mV...

What does a measurement give by setting the ADC input to ground ? This gives the measurement noise of the instrument, it may not be far from what you observe ...

This is great answer sir. I will consider them. Thanks a lot.

The ground measurement is very stable by the way.