Electronic – How to efficiently read a battery voltage level with ADC

adccell-batteryefficiencylow-power

There is a circuit powered by a battery (3V button cell) and another circuit with a microcontroller (Attiny85 in my case) reading perfectly the battery level (through ADC3 pin) each 5 minutes interval.

                              --------------------
                              | *                |
                          -----                  -----
  Circuit+                | 1 |                  | 8 |------------- +5V  
     |                    -----                  -----
     |              ADC3  -----                  -----
     +--------------------| 2 |                  | 7 |  
     |                    -----     ATTINY85     -----
     | BAT+               -----                  -----
     |                    | 3 |                  | 6 |  
 /-------\                -----                  -----
/         \          GND  -----                  -----
|   3V    |     +---------| 4 |                  | 5 |  
|  Cell   |     |         -----                  -----
\         /     |             |                  |
 \-------/      |             --------------------
     |          |
     | BAT-     |
     |          |
     +----------+-------------------------------------------------- GND
     |
     |
  Circuit-

As commented bellow by @michael-karas, according to datasheet, the Attiny85 has an input leakage current of 0-1 µA.

So, the question: Is there any circuit configuration or software tip to minimize the battery consumption by the Attiny85?


A friend of mine suggested this solution where R should be higher enough to minimize RTC circuit overvoltage and allow ADC readings to vary proportionally to the cell battery voltage:

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

@rdtsc has removed his answer which IMO raises a valid concern. I don't think the OP can rely on +5V to always be present (else, they wouldn't need the battery, would they?), and when that +5V is removed, the MCU will be powered via the pin's clamping diodes.

It is therefore recommended to either add a significant series resistor to the measurement pin which will reduce the leakage current to a minimum, or add an active circuit which connects the battery to the MCU only when a measure must be taken:

enter image description here

Depending on the expected intervals the system will spend without +5V power, the schematic above may be an overkill, but at least a series resistor should be there.