Battery-Emulator icon indicating copy to clipboard operation
Battery-Emulator copied to clipboard

Feature: Double battery 🔋 🔋 🥈

Open dalathegreat opened this issue 10 months ago • 1 comments

WIP

This requires extensive testing before it can be merged

What

This PR adds support for running 2x BMW i3 batteries at the same time bild

How

The second battery connects to the DualCAN add-on MCP chip. Incase the pack voltages read via CAN are within 3.0V between the two packs, the secondary battery can join the mix.

Two new events added, CAN2 failure and too large voltage diff: bild

dalathegreat avatar Apr 20 '24 17:04 dalathegreat

I think this PR should be rebased atop the main when Safety.cpp is merged. I noted the introduction of the event comparing voltage difference between batteries to keep current flow down when they are connected in parallel. Maybe-but-not-necessarily consider that they must have a similar SOH, SOC, etc.

smaresca avatar May 14 '24 23:05 smaresca

I think this PR should be rebased atop the main when Safety.cpp is merged. I noted the introduction of the event comparing voltage difference between batteries to keep current flow down when they are connected in parallel. Maybe-but-not-necessarily consider that they must have a similar SOH, SOC, etc.

This has now been rebased, and the Safety.cpp has a section specifically with Double-Battery checks. This is ready for testing (and ready for review!)

dalathegreat avatar Jul 11 '24 20:07 dalathegreat

Feature has been tested, and in use for a few days. First startup can be seen here: https://youtu.be/skBhH_EwBUE

Merging this PR to main, to get more feedback on it! :raised_hands:

dalathegreat avatar Jul 30 '24 10:07 dalathegreat