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

Charger: Fix soft over current detection when PWM changes often #762

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

corneliusclaussen
Copy link
Contributor

Describe your changes

Soft over current detection triggers when the EV draws more current then the PWM limit for several seconds. The current implementation checked the EV's current against the internally set current limit, which may be different from the PWM signalled current limit for up to 5 seconds (as IEC allows PWM updates only every 5 seconds).
If PWM is changed frequently (e.g. due to solar charging) this may lead to unintended over current triggers (it takes 5 seconds for the PWM to change and another 6s or so for some EVs to actually reduce current).
With this PR, the OC detection is based on the current actually signalled on the PWM for basic AC charging.

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@corneliusclaussen corneliusclaussen added the include-in-release Tag that this PR should be included in the current merge window for the upcoming release if possible label Jul 5, 2024
@corneliusclaussen corneliusclaussen force-pushed the bugfix/soft-over-current branch from 7d81e60 to 989589e Compare July 5, 2024 10:16
Copy link
Contributor

@SebaLukas SebaLukas left a comment

Choose a reason for hiding this comment

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

👍

@hikinggrass hikinggrass merged commit 11e8b3f into main Jul 8, 2024
8 checks passed
@hikinggrass hikinggrass deleted the bugfix/soft-over-current branch July 8, 2024 17:47
hikinggrass added a commit that referenced this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include-in-release Tag that this PR should be included in the current merge window for the upcoming release if possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants