# Low consumption resistor pair

I'm working on a project that measures battery voltage. The device, I designed, works on coin cell. I have to extend battery life, that's why I used the following design

But it requires two pins

• S1 digital output pin

I don't want to use 2 pins. Can we redesign by using a single pin which will act like analogue as well as digital output, and we can measure voltage when we require, with very low power?

• I see five connection points not two. Sep 27 at 11:06
• It will GREATLY help others, and yourself if || Component labels do not overlap making then hard or impssible to read. || Adding identifiers to ALL components helps greatly. eg the 2 x 47K. Sometimes it makes little difference. Other times it needs magic descriptions to make sense of advice. Labelling then always helps heaps. Sep 27 at 11:35
• What MCU? What MCU voltage? What battery voltage? Sep 27 at 11:57
• I can't see how the proposed circuit ever measures anything except (VDD / 2) Sep 27 at 21:12
• @effect IF the ADC range includes Vdd that would work. In many (maybe most) cases it will not. ||Also - Vref has to be some fraction of Vdd. If Vdd is used as reference the result is always the same (full scale) regardless of the value of Vdd. Sep 28 at 23:18

May I offer a different approach?

Instead of turning off the voltage divider, reduce its current drastically and buffer the voltage.

simulate this circuit – Schematic created using CircuitLab

• This looks like an excellent way to approach it. I note that MCP6441 specifically includes battery voltage sensing in its typical applications in the datasheet and has 450 nA quiescent typ! Sep 27 at 15:44
• To use this circuit successfully, great attention needs to be paid on PCB layout and board cleanliness to avoid leakage. Sep 27 at 20:09
• A nice IC. Even using say 10M:10M would make it less sensitive to leakage. Input is rail to rail and his coin cell is say 3V3 max and IC runs down at about 1.4? V - so it would work well. Sep 28 at 11:40

I'll assume that the VDD is not really intended and that this switch only operates when battery voltage sampling is required. If Q2 also supplies Vdd to the system a different design is needed.

If you drive Qlower gate via a diode D1 from BATADC with a digital high, and add a capacitor C1 to Qlower gate to create a 'stay turned on' time constant with R19, then you can.

• Assert BATADC digital high - turns on sampling

• Measure battery voltage before falling voltage on C1 starts to affect the reading.

D1 must be silicon, not Schottky to avoid potentially high reverse bias currents in Schottky.

AO3401A is an "entirely OK" part to use - Rdson will probably be around 60 milliOhm. This is insignificant given the value of the resistor divider. BUT that divider MAY be loaded somewhat by the ADC depending on circuit details. Using a sub-10-milliOhm Rdson FET will probably cost no more.

The effect of the 2 x 47k values on precision should be checked (and may have been already).

The AO3400 hs an Vgsth max of about 1.5V which allows lots of headroom when designing the RC turnoff time.

Can we redesign by using a single pin which will act like analogue as well as digital output, and we can measure voltage when we require, with very low power?

No.

Any convoluted solution we come up with to multiplex two functions into one GPIO would affect the accuracy of the reading and make that solution pointless.

• I believe that the accuracy effect in my solution will be far less than 1 LSB and so undetectable. Error is reverse leakage of a silicon diode into a 47K/47K (or smaller) divider. Sep 28 at 2:53

You can try this procedure:

Switch pin as digital.
Set output High. This charges the C1 to hold mosfets ON for a while.
Switch pin to analog.
Measure the battery level.

The C1 discharges itself through R1 after some time. You can use a schottky instead of 1n4148 to increase measurement range. Theres no need to R3 and R4 to be so high since the batt. measurement is in minor periods only (1k,1k should be ok).

simulate this circuit – Schematic created using CircuitLab

• Great minds think alike :-) - that's identical to my (diagramless) answer. Note that using Schottky diode for D1 risks reverse bias leakage currents affecting reading accuracy - especially is used at somewhat eleveated temperatures. Sep 28 at 2:50
• @RussellMcMahon Using harder R3R4 resistor divider should make the schottky leakage insignificant. Btw, I am surprised you wrote almost the same solution :). Sep 28 at 3:27
• I was about 5.5 hours ahead of you BUT as I did not provide a diagram you'd have to have traced the answer through to see that they were the same. So easily missed.|| I mentioned not using Schottky but did not go into any detail. At room temperatures reverse Schottky current for an eg BAT54 will be under 0.1 uA. Divider current as shown is about 30 uA. Around 1 bit. At say 100C and 3V3 Diode Irev typical is about 10 uA. Very significant as shown. As you say, reducing divider to arbitrarily low values will swamp this. Schottky offers minimal delta delay time over silicon so 1N4148 probably OK. Sep 28 at 11:37