Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Beta BMW PHEV Support #804

Merged
merged 35 commits into from
Jan 19, 2025
Merged

Add Beta BMW PHEV Support #804

merged 35 commits into from
Jan 19, 2025

Conversation

wjcloudy
Copy link
Collaborator

What

This PR implements support for the Gen3/4 Hybrid batteries. You will need to use manual contactor control. It also sends the cell voltage delta over MQTT.

Working

  • Balancing
  • Isolation Measurement
  • Battery Limits
  • SOC / SOH
  • Cell/pack voltages/temps

Not Working

  • Contactor control (can logs wanted!)
  • Current measurement (should come alive once we get contactor control

Untested

  • Quality of SOC tracking given the zero current readings.

Why

Improving battery support in Battery Emulator

How

Implements a new battery type

Implements basic functionality
Supported:
-Pre/Post contactor voltage
-Min/ Cell Temp
-SOC
Add balancing status support (in advanced info )
Now enables balancing every 10secs
handle balancing status 2
Try i3 contactor close method, cleanup and more messages parsed
support battery charge/discharge limits
Include max capacity
fix mapping
Adds a calculated cell delta voltage for monitoring via MQTT
Increased stale allowance
Polling rate upped to 200ms
Current reading added
Various cleanups
Stale allowance can be tightened up after increased polling rate
valve state was referencing wrong lookup for description
cell temps given as temp + 50. Check value is not 0 (-50)
Support for battery wakeup. You MUST be using the native can bus for this to work for now.
SME sends a 255 sometimes
Update PHEV branch from main
Battery should now startup without any errors
Isolation test is called at startup - and results viewable in advanced
Introduce a slow update loop for slow changing values.
@dalathegreat
Copy link
Owner

Very nice, I see you have a Wiki page going already for the PHEV.

Shall we add the PHEV to the github build system already now, or later?

Adds a test compilation for BMW_PHEV
@wjcloudy wjcloudy requested a review from dalathegreat January 19, 2025 14:18
Copy link
Owner

@dalathegreat dalathegreat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙌

@dalathegreat dalathegreat merged commit a84a1d6 into main Jan 19, 2025
111 checks passed
This was referenced Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants