8.1.12. How to use the Contactor module

8.1.12.1. How to change number of Contactors

Note

The minimal number of Contactors used is dependent on the number of Strings attached (+ and - for each)

The number of additional Contactors (precharge, etc.) can be changed by editing BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS in src/app/application/config/battery_system_cfg.h

8.1.12.2. How to change the Contactor behaviour

Contactor behaviour is changed in file src/app/driver/config/contactor_cfg.c The variable cont_contactorStates holds a list of configurations. Each of the entries corresponds to one Contactor.

Listing 8.21 The structure of configuration for one Contactor
1typedef struct {
2    CONT_ELECTRICAL_STATE_TYPE_e currentSet;    /*!< current set point for the contactor */
3    CONT_ELECTRICAL_STATE_TYPE_e feedback;      /*!< feedback from the contactor */
4    const CONT_FEEDBACK_TYPE_e feedbackPinType; /*!< type of feedback that the contactor uses */
5    const BS_STRING_ID_e stringIndex;           /*!< index in which string the contactor is placed */
6    const CONT_TYPE_e type;                     /*!< type of contactor */
7    const SPS_CHANNEL_INDEX spsChannel;         /*!< channel index of the SPS to which this contactor is connected */
8    const CONT_CURRENT_BREAKING_DIRECTION_e breakingDirection; /*!< preferred contactor opening direction */
9} CONT_CONTACTOR_STATE_s;

The options for each value along with a quick explanation are listed below.

currentSet/feedback

explanation

CONT_SWITCH_OFF

Contactor is open

CONT_SWITCH_ON

Contactor is closed

CONT_SWITCH_UNDEFINED

Contactor state is not known

feedbackPinType

explanation

CONT_FEEDBACK_NORMALLY_OPEN

feedback line is normally open

CONT_FEEDBACK_NORMALLY_CLOSED

feedback line is normally closed

CONT_FEEDBACK_THROUGH_CURRENT

Get feedback through the current flowing

CONT_HAS_NO_FEEDBACK

Feedback line is not used

stringIndex

BS_STRING0

BS_STRING1

BS_STRING2

BS_STRING_MAX

type

explanation

CONT_PLUS

Contactor is placed in HV plus path

CONT_MINUS

Contactor is placed in HV minus path

CONT_PRECHARGE

used as precharge Contactor, installed as a plus Contactor

CONT_UNDEFINED

Undefined Contactor

spsChannel

any number

breakingDirection

explanation

CONT_CHARGING_DIRECTION

preferably open in charge current direction

CONT_DISCHARGING_DIRECTION

preferably open in discharge current direction

CONT_BIDIRECTIONAL

no preference

Some Contactors are designed and optimized to open current that is flowing in one direction to provide maximum current breaking capability. This direction is then dependent on how the Contactors are installed withing the battery system. If bidirectional Contactors are used, the main power terminals can be connected in either direction and the current breaking capability is the same for both directions.

8.1.12.3. Further Reading

Implementation details of the Contactor module are found in Contactor.