As of May 31, 2023, the now-discontinued LC709203 battery monitor chip has been replaced with the MAX17048. Unsure which one you have? Check the silk on the back of the board. If your board does NOT have "MAX17048 Monitor" in the upper left corner, then you have the LC709203 version.

Your microcontroller board comes with an LC709203 lithium ion polymer (lipoly) battery monitor built right onto the board. The LC709203 is available over I2C.

The sensor comes with its own Adafruit CircuitPython library that makes it simple to write code to read data from it. This example will be using, among other things, the Adafruit LC709203F library.

The example simply reads data from the sensor and prints it to the serial console. It is designed to show you how to get data from the sensor.

The LC709203 battery monitor (highlighted in red) is located on the bottom of the board near the VBAT pin label. Its I2C address is 0x0B. (0xb, which is returned by I2C scan, is the same as 0x0B, which simply has leading zeros.)

Arduino Library Installation

You can install the necessary libraries from the Library Manager. To open, click Sketch > Include Library > Manage Libraries...

Search for LC709203F, and install the Adafruit LC709203F library.

When asked about installing dependencies, click Install all

LC709203 Simple Data Example

Click File > Examples > Adafruit LC709203F > LC709203F_demo to open the example.

#include "Adafruit_LC709203F.h"

Adafruit_LC709203F lc;

void setup() {
  Serial.println("\nAdafruit LC709203F demo");

  // For the Feather ESP32-S2, we need to enable I2C power first!
  // this section can be deleted for other boards
  // turn on the I2C power by setting pin to opposite of 'rest state'
  pinMode(PIN_I2C_POWER, INPUT);
  bool polarity = digitalRead(PIN_I2C_POWER);
  digitalWrite(PIN_I2C_POWER, !polarity);

  if (!lc.begin()) {
    Serial.println(F("Couldnt find Adafruit LC709203F?\nMake sure a battery is plugged in!"));
    while (1) delay(10);
  Serial.println(F("Found LC709203F"));
  Serial.print("Version: 0x"); Serial.println(lc.getICversion(), HEX);

  Serial.print("Thermistor B = "); Serial.println(lc.getThermistorB());



void loop() {
  Serial.print(lc.cellVoltage(), 3);
  Serial.print(lc.cellPercent(), 1);
  Serial.println(lc.getCellTemperature(), 1);

  delay(2000);  // dont query too often!

After opening the LC709203F_demo file, upload it to your microcontroller. Open the Serial Monitor at 115200 baud. You should see the following as the sketch starts up.

Once the sketch begins running, you should see something like the following.

That's all there is to reading battery data from the LC709203 using Arduino!

This guide was first published on Jan 12, 2022. It was last updated on Jul 14, 2024.

This page (LC709203 Simple Data) was last updated on Mar 08, 2024.

Text editor powered by tinymce.