Battery-Emulator
Battery-Emulator copied to clipboard
Feature: Double battery 🔋 🔋 🥈
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
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:
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.
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!)
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: