Skip to content

Battery Monitoring + Passthrough Power Support for RK3588 #61

@andrescera

Description

@andrescera

Note: This issue was cloned from CERALIVE/belaUI-ts#7


🚀 Feature Request: Battery Monitoring + Passthrough Power Support for RK3588 SBCs

📌 Summary

Support battery monitoring and smart charging for RK3588-based SBCs (e.g., Orange Pi 5/5+, Rock 5B/5B+), optionally Jetson nano using a combination of:

  • Fuel gauge (e.g., MAX17043)
  • USB-C PD charger (e.g., BQ25792)
  • Boost converters for multiple 5V/9V loads
  • Safe power-path management

🔋 Hardware Example

Battery Pack

  • 3S2P Lithium-Ion (11.1V nominal, 12.6V max)
  • With integrated BMS for protection

Charging IC

  • BQ25792 (USB-C PD, power-path capable, I²C)

Fuel Gauge

  • MAX17043 (State-of-charge + voltage over I²C)
  • 🟡 Alternatives: MAX17048, BQ27441, INA219

Boost Converters

  • MP1584 (5V 3A buck)
  • MT3608 (step-up to 5V, ~2A)
  • USB-C PD Buck Modules (e.g., ZY12PDN)

🔌 ASCII Diagram of Full Power Architecture

                        +-----------------------------+
                        |      USB-C Input Power      |
                        +-------------+---------------+
                                      |
                                      v
                          +----------------------+
                          |   BQ25792 Charger    |
                          | (USB-C PD + Power    |
                          |  Path Management)    |
                          +--+-------------+-----+
                             |             |
                             v             v
               +------------------+    +----------------------+
               |    Li-Ion Pack   |    |   System Load Rail   |
               |     (3S2P)       |    | (Power to Boost DC)  |
               +--------+---------+    +----------------------+
                        |                         |
                        |                         +--------------------------+
                        |                                                    |
                        v                                                    v
                +-------------+                              +----------------------+
                |  MAX17043   |                              |  Boost Converters    |
                | Fuel Gauge  |                              |  (5V / 9V as needed) |
                +-------------+                              +---+--------+--------+
                        |                                         |        |
                   I²C Bus                                   +----+    +--+--+
                        |                                    |         |     |
                        v                                    v         v     v
             +----------------+                    +-------------+ +-------------+
             |  RK3588 SBC    |                    | [Optional]   | | [Optional]   |
             | (e.g. OPI 5+)  |                    | USB Device 1 | | USB Device 2 |
             +----------------+                    +-------------+ +-------------+

🛠 Minimal Features Required

  • Read battery % (SoC), voltage, and charge/discharge status from I²C
  • Use i2c-bus or similar npm package
  • Provide battery data to:
    • WebSocket
  • Optionally integrate with:
    • UPower or custom systemd service
    • D-Bus messages for battery events
    • Graceful shutdown hooks when battery is low & no external power is being applied

💡 Alternative Components

Component Type Recommended Alternatives
Charger IC BQ25792 BQ24295, IP5306, BQ25620
Fuel Gauge MAX17043 MAX17048, BQ27441, INA219
Boost Module MP1584, MT3608 TPS61088, PD Buck modules
Comm Protocol I²C via Node.js Python (smbus), C (libi2c)

🔗 References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions