MAX17055 is an advanced fuel gauge IC used to measure the state of charge (SoC), state of health (SoH) and real-time operating parameters of single-cell Li-Ion/LiPo batteries.
This library is a lightweight Arduino API that provides easy access to all basic functions offered by MAX17055, enabling reliable battery measurements in embedded systems.
The library offers a wide range of applications from IoT sensors used in the field to handheld terminals and all portable devices requiring energy savings.
Features
With this library, you can easily access the following data via MAX17055:
- Battery voltage (Voltage mV)
- Instantaneous current (Current mA)
- State of Charge (SOC %)
- State of Health (SOH %)
- Capacity estimate (FullCapRep / Remaining Capacity)
- Fast filtered data for stable SoC measurement
- Fast configuration & automatic model setting
- Alert / Interrupt tracking
All register accesses are optimized and designed to create minimum load on the microcontroller.
Application Scenarios
This library provides critical benefits especially in these projects:
- Portable IoT devices
- Wireless sensor modules
- Smart agriculture sensors
- Handheld devices operating with LiPo
- Data recorders operating in low power mode
- Battery health tracking in long-term field systems
Accurate analysis of battery behavior; extends service life, prevents unexpected shutdowns and makes the device's energy management more predictable.
Installation
Arduino IDE
- Open Library Manager in Arduino IDE.
- Type "MAX17055" in the search box.
- Select the
MAX17055(Author: Günce Akkoyun) library and Install.
Alternative installation:
- Download
.zipfrom the Releases section on GitHub. - Add it to your project via Sketch → Include Library → Add .ZIP Library….
PlatformIO
Adding this line to your platformio.ini file is sufficient:
lib_deps = akkoyun/MAX17055
If you want, you can specify a version to use a specific version like @^1.0.0.
Basic Usage
The example code quickly shows the library's working logic:
#include <MAX17055.h>
MAX17055 battery;
void setup() {
Serial.begin(115200);
battery.begin();
}
void loop() {
Serial.print("Voltage: ");
Serial.print(battery.getVoltage());
Serial.println(" mV");
Serial.print("SOC: ");
Serial.print(battery.getSOC());
Serial.println(" %");
delay(1000);
}
When the library is initialized, MAX17055 registers are automatically configured and all calculations necessary to obtain stable measurements are performed.
Advanced Functions
This library includes not only basic measurements, but also the following advanced functions:
getCurrent()— Instantaneous current measurementgetTemperature()— Battery temperaturegetFullCapacity()— Maximum capacity estimategetRemainingCapacity()— Remaining capacitygetAVSOC()— Filtered SoC (more stable values)setAlertThreshold()— Low battery alarm setting
Thanks to these functions, battery tracking can be done entirely on the embedded system.
Bu kütüphane, gerçek sahada kullanılan projelerden gelen ihtiyaçlara göre sürekli gelişen bir açık kaynak projedir. Kullanıcı geri bildirimleri, yeni fonksiyonların eklenmesi ve mevcut yapının iyileştirilmesi açısından kritik öneme sahiptir.
Bu kütüphaneyi hem kişisel hem de ticari projelerinde özgürce kullanabilirsin. Herhangi bir lisans kısıtı uygulanmamaktadır; amacım, bu kütüphanenin mümkün olduğunca fazla gerçek dünya projesinde yer almasıdır. Özel bir entegrasyon ihtiyacın, ticari bir planın veya teknik bir sorunun varsa bana e‑posta üzerinden her zaman ulaşabilirsin: akkoyun@me.com Geri bildirimlerini veya kullanım senaryolarını paylaşman, projeyi geliştirmem açısından büyük katkı sağlar.