Skip to content

CbChargeSOMDriver: refactoring of contactor control for AC and DC use-cases#64

Open
mhei wants to merge 8 commits into
mainfrom
feature/chargesom-3ph1ph
Open

CbChargeSOMDriver: refactoring of contactor control for AC and DC use-cases#64
mhei wants to merge 8 commits into
mainfrom
feature/chargesom-3ph1ph

Conversation

@mhei

@mhei mhei commented Jun 8, 2026

Copy link
Copy Markdown
Member

This PR does not only affect CbChargeSOMDriver, but also influences CbTarragonDriver - but there is no functional change expected.

It restructures the contactor control classes, developed and used by CbTarragonDriver, and make then usable also for CbChargeSOMDriver. For this, the files are moved to the recently introduced library part of this repo.

CbChargeSOMDriver gains then support for phase count switching in AC use-cases, with the same wiring possibilities already supported by CbTarragonDriver.
The contactor control classes can also be used to model the DC use-cases in a better way, so a new configuration parameter is introduced for DC use-cases as well.

Note, that there is currently no cross-check implemented, which checks whether the safety controller configuration really fits to the EVerest side. This might be implemented in a subsequent PR but needs some infrastructure rework before.
One downside of this is, that users needs to configure the feedback type twice at the moment: the CbChargeSOMDriver wants to know which kind of feedback of the contactor is used, and the safety controller needs this information too.

mhei added 8 commits June 5, 2026 08:50
Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
…ame CbTarragonRelay class

This will helper later to re-use the contactor control classes on other platforms.

Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
The goal is to re-use the existing contactor control classes and the
same configuration keys are already known for Tarragon platform.

However, the control path for the contactors is different and thus
it introduces a new "relay" class CbCarrierBoardRelay which bridges
between the CbChargeSOM and the contactor control classes.

Please also not, that there is no physical "relay" on the existing
carrier boards, but it is only a 'switch chip' - for this reason,
we do not need to model 'closing delays' at the moment.

Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
On platforms with safety controller, it's better to have async events
when contactor states change. So add this as infrastructure.

Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
Introduce a new config option for this because it is kind of different
to AC and phase count configuration.

Also introduce a new conncector type: use a string which is most probably
introduced later by upstream. The connector is now used to determine
AC vs DC use-case.

Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
Now that we have proper DC contactor control, we can simplify the
relay class again and get rid of switching two relay channels from the
same instance: the proper modelling is 1:1, i.e. a relay class instance
corresponds to a single channel and the combination is ensure in the
layer above.

Signed-off-by: Michael Heimpold <michael.heimpold@chargebyte.com>
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.

1 participant