Detecting LiPo battery voltage in sketch to display full/empty gauge

Status
Not open for further replies.

Davidelvig

Well-known member
How is this typically done?
My design has a single cell lipo and a circuit to allow running on or off USB (and charging on USB)

I’m also connecting the RTC with a coin cell (if that matters)

What Teensy pin do I measure in the sketch to check lipo voltage?

Would I need to provide a schematic in this post to answer that?

Teensy 3.2 design, using a PJRC bootloader.

Thanks!
 
LiPo charge Circuit.jpg
@manitou
I've implemented this circuit with a 100K+100K voltage divider
I'm assuming I want big resistors to minimize power drain, though I'm guessing with these values.
1) is this circuit correct (with LIPO_VOLTS going to analog pin)
2) what resistor values would you choose?
3) I'm similarly connecting VBAT to an analog pin without a voltage divider to directly measure coin cell voltage (assuming 3.0V coin cells from another post).
What coin cell size is typically used for the RTC feature, wanting the clock to run for years(?), and what voltage should be considered too low, and requiring replacement?

Thanks!
- Dave
 
i'll let the EE's comment on your schematic, but the thread URL in post #2 suggests that you use something smaller than 100k resistors for divider.
 
Status
Not open for further replies.
Back
Top