icboredman / juice

Linux charger and fuel gauge module for 2S LiPo battery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

juice

Linux charger and fuel gauge userland driver for 2S LiPo battery.

Designed to work with "Juice Board" module attached to Khadas Edge-V SBC.

Publishes battery info as a MQTT topic.

MQTT client code uses Eclipse C++ library paho.mqtt.cpp

Notes

  • Fuel Gauge IC: CW2015C
  • Charger IC: BQ25703A
  • Uses Linux I2C driver (ioctl, I2C_RDWR-style)
  • Requires MQTT broker, such as Mosquitto
  • Requires Paho C++ MQTT library installed in default location

Compiling

  • cd build
  • cmake ..
  • make

Running

  • easiest is to add link to <path>/bin/juice to /etc/rc.local file in order to launch at boot

Example

  • provided example code could be used as a basis to integrate into final application

About

Linux charger and fuel gauge module for 2S LiPo battery

License:GNU General Public License v3.0


Languages

Language:C++ 95.2%Language:CMake 4.8%