Does anyone has a diagram for a battery monitor example circuit?

I’m trying to add a battery monitor feature for my Imp (I’m using sparkfun’s BB-11400 board -

I’ve been reading a lot of different approaches to this subject and I’m kind of confused. What would be the simpler way to reasonably monitor the batteries?

do you mean the power supply of the board or external batteries?

@DolfTraanberg, I want to use batteries to supply the Imp and I need some way to monitor how much time I’ve left (I know time is difficult to estimate, but at least voltage/capacity)

Thanks @DolfTraanberg, but my doubts are about the circuit to do that: Do I need a voltage divider or something like that?

you don’t need a circuit. just use:
server.log("voltage= " + hardware.voltage());

… and if you post that data to you can have a nice graph until the imp stops working

You should use a voltage divider if you’re trying to measure >3.3v so as to not exceed the input pin maximum voltage specification.

@beardedinventor posted a circuit in this thread a while back that looks like a nice alternative to a simple resistive divider, and one that would minimize leakage current. (I haven’t used it yet, but will incorporate in a couple of new designs I’ve got going. As I’ll likely use 4 x AA for my batteries, I’d just stick with R3 = R4 = 10k to implement a 2-to-1 divider).

Thanks @LarryJ and @DolfTraanberg!

@LarryJ and @DolfTraanberg, one more question on this subject: would 2xAA (1.5V + 1.5V) be enough to power my Imp? The cycle looks like this:

  • wake
  • poll a thermistor (the circuit is the one in the Examples page)
  • connect to agent and send data
  • deep sleep for 1 hour

Thanks in advance,

Yes it will. I ran my imp for 2 days without issue from 2xAA batteries. There was no sleeping involved and I had WiFi as well as a separate wireless chip for remote sensor connection on 100% of the time to make sure I didn’t miss any remote sensor messages. The imp will run all the way down to 2.5V (required for WiFi) no problem. With your low duty cycle, you will get much better mileage than I did!