I was thinking about measuring the battery with ADC but then I realized that Vref will be Battery V+ and the ADC will be tied to V+ also.

As the battery goes down, the ADC Vref will also go down in parallel and the result will never change in theory. Even a resistor tied from ADC pin to either Gnd or V+ will also be perfectly proportional to battery V+ when it is going down. Thus ADC will not see the difference, I think.


This is just possibility came to my mind but I am sure someone already has done something similar and is experienced with this.

Am I right on this or there is another way to do it?


----------------------------