UNO ADC Nonlinearity issue

Hello all,

I'm biulding a circuit that is powered by a 12 V battery and I monitor the battery voltage from the supply battery. The battery is also an engine start battery and therefore the circuit needs to protect the ADC input pin from voltage spikes caused by the back-emf from the starter.

The protection circuit is attached. It basically divides 0-15 V down to 0-5 V and has 5.1V zener diodes to protect against spikes.

The problem is that the ADC digital value is not linear from 11 to 15 V input as demonstrated in the attached graph. I measured Batttery input voltage, ADV input voltage and ADV digital output for each 0.5 V and graphed it.

Do any of you clever minds have a suggestion as to what is going on here?

input circuit.png

The Zener starts to conduct before the design voltage is reached. The circuit needs to be redesigned.

I would use a 22R resistor and an 18V transient suppressor (TVS) diode before the voltage divider.

This was also my initial suspicion, but the same issue occurs if I choose my resistors to divide 0-15 input to 0-1.1 ADC input.

At 15 V, the ADC input is 4.73 V

Take out the diodes and extra resistors for testing purposes.

What are you using to measure what you believe to be the "correct" voltage? 4.73V is exactly what you would expect, for 15V input to the pictured divider.

Hello,

I managed to fix the issue. I think you are right about the diode conducting before 5.1 V, so I just changed the 10k resistor to a 4.3k, resulting in a division of 0-15 V to 0-2,5 V.

It gives me a lower resolution, but that's OK in this application.

Thanks for your time.

zenseidk:
It gives me a lower resolution...

Adjust so the range is zero to 1.1 V then use the internal reference.

Hello,

No need, I still have very good resolution,

15 V / 512 steps = 0,03 V/step which is fine in this case.