Battery monitor/sensing ratio calculation

Started by FlyingSaucrDude, August 27, 2021, 07:39:30 PM

FlyingSaucrDude

Apologies for raising a long-dormant thread from the dead, but I was hoping to verify my understanding of the discussion that went on this thread.

From reading the thread above, I get the sense that the attached circuit should work if I want to measure the battery voltage only when I set the DIO pin to HIGH, and draw minimal current whenever I set the DIO pin to LOW.

Assuming that's correct, I have a couple questions:

  • How are R1 and R2 chosen? Are they necessary for this application? This was asked above, but I didn't quite understand the answer.
  • Is a capacitor in parallel with R4 necessary? I get that adding it would allow me to use bigger values for R3 and R4 (and thus use less current while I'm measuring). I also get that it would require me to wait a couple milliseconds (depending on the RC constant, which depends on the values of R4 and the capacitor). But is there any other benefit from adding it?
  • Is there no off-the-shelf IC I can buy that combines all these components? I'm mildly surprised that "low-current voltage monitor in a single IC" isn't a thing that exists, but I guess maybe this is specialized enough that it doesn't make sense.

Thanks in advance for the help!

Felix

FlyingSaucrDude,
Thanks for the post but it was not really relevant to the thread you posted in, it's just a general vbat monitor question, so it's now a new thread.

Not sure what "this application" you refer to, the web photo you attached ???? That's an overly complicated way to sample battery voltage.
If you can afford a sub microamp constant drain, then just use a [Vbat]->[1Mohm]<-ADC->[1Mohm+0.1uF]->GND voltage divider. Otherwise you can use a GPIO to toggle a single PFET that feeds into a divider, enable it only when you sample - in this case the 2 resistors can be much lower value for fast response. The ratio of the 2 resistors give you the Vbat divider, so 1:1 yields 50% of Vbat going to the ADC pin, this is when Vbat > VCC of the MCU. Otherwise if Vbat feeds directly into the MCU then you can use bandgap to sample the battery with no external components (not most accurate but with a little calibration its very accurate).
Many many voltage monitor ICs exist, you only need to search.