I am attempting to read the voltage on a backup battery on an Arduino. To that end, I used the circuit Olin Lathrop offered in answer to this question. I am powering the Arduino with 5V, and the battery is 3 AA cells, so 4.6V or less. Using the battery checker circuit Olin offered, see link above, I can reliably read the voltage on the main power supply (~5V) but when I connect the battery instead, I am only reading 0.06V when the Q1 is turned on. I believe this is because the base voltage on Q2 is too close to Q2's collector voltage. I only see turning Q2 on as more difficult as the batteries discharge. I think the way to fix this is to modify the Q1 part of the circuit so that the base voltage on Q2 is less when this circuit is "on".
Any input would be appreciated.

  • \$\begingroup\$ Please draw us some images. One of the current situation with your voltages and one with your proposal how to solve it. I understand you don't have the reputation to upload them, but if you give us the URL in a comment, someone will upload and incorporate it in your question for you. \$\endgroup\$
    – jippie
    Jul 21, 2012 at 21:12
  • \$\begingroup\$ The circuit of Olin's I used is at this URL: i.stack.imgur.com/2WpMz.gif. It worked until the BATT voltage got down close to the output of the micro-controller output pins. I had no proposal, as it's been decades since I studied transistors, and am baffled that any I build with discrete components actually work. \$\endgroup\$ Jul 22, 2012 at 20:08

1 Answer 1


This circuit I showed in the other answer was for when the battery voltage was somewhat higher than the processor's voltage. After all, that was your original reason for not just connecting the battery to a processor input pin.

When you know the battery voltage won't exceed the processor voltage you can do something like this:

CTRL is driven by a digital output of the processor. When high, the battery test circuit is off. when low a few 10s of mA drain is put on the battery, and the battery voltage minus the Q1 saturation voltage appears at out. This only needs to be on for a few 10s of µs occasionally, so represents very little average drain on the battery.

If the C-E voltage of Q1 introduces a unacceptable offset on the battery voltage reading, then you can replace Q1 with a P channel FET. You have to make sure to use one that can turn on well enough with just the processor voltage on the gate. Such things are sometimes called logic level FETs.

  • \$\begingroup\$ Thank you for the help, this works perfectly, though I added the 120/68 ohm divider from your other diagram to get the OUT voltage below 2.56V since I am using the internal reference on the Atmel part I'm using. I had tried a N -channel MOSFET, since I had one laying around, and that didn't work at all. \$\endgroup\$ Jul 22, 2012 at 20:13
  • \$\begingroup\$ @None: Like I said, it would need to be a P channel mosfet, and it would need a low gate turnon voltage. \$\endgroup\$ Jul 22, 2012 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.