Skip to main content

batMON smartCORE module

Description

The batmon module is the interface between the smartIO batMON battery monitoring system and the smartCORE. Various battery parameters are

  • written to smartCHANNELS in the form of live data if the system is running
  • recorded as historical data during the system's idle phase and downloaded from batMON during the system's switch-on phase and stored in a file provided for this purpose.

Operating states

The following diagram illustrates the operating states of the batMON.

batMON States

Interfaces & protocols used

  • CAN bus
  • OSF format

JSON configuration

The following section describes the entire JSON configuration of the module and explains the individual parameters.

Example configuration (minimum)

{
"module": "batmon",
"factory": "batmon",
"config":{}
}

Example configuration (maximum)

{
"module": "batmon",
"factory": "batmon",
"config":{
"priority":80,
"timeoutMs":1000,
"readBufferSize":8192,
"writeBufferSize":8192,
"canInterface": "can1",
"fileName":"/sde/<tag>/<date>/<date>_<time>.osf",
"fileTag": "preview",
"measurementTimeChannelName": "Batmon.Parameter.MeasurementTime",
"shutDownTimeChannelName": "Batmon.Parameter.ShutDownTime",
"bootTimeChannelName": "Batmon.Parameter.BootTime",
"wakeUpTimeChannelName": "Batmon.Parameter.WakeUpTime",
"voltageDropDelayTimeChannelName": "Batmon.Parameter.VoltageDropDelayTime",
"vAlwaysOffChannelName": "Batmon.Parameter.VAlwaysOff",
"vAlwaysOnChannelName": "Batmon.Parameter.VAlwaysOn",
"powerSupplyVoltageChannelName": "Batmon.PowerSupplyVoltage",
"powerSupplyCurrentChannelName": "Batmon.PowerSupplyCurrent",
"temperatureMOSFETChannelName": "Batmon.TemperatureMOSFET",
"temperatureChannelName": "Batmon.Temperature",
"resistanceChannelName": "Batmon.Resistance",
"operatingModeChannelName": "Batmon.PluginState",
"configurationErrorChannelName": "Batmon.ConfigurationError",
"batteryStatusChannelName": "Batmon.BatteryStatus",
"terminal15StatusChannelName": "Batmon.Terminal15Status",
"shutDownCounterChannelName": "Batmon.ShutDownCounter",
"bootCounterChannelName": "Batmon.BootCounter",
"wakeUpEventChannelName": "Batmon.WakeUpEvent",
"shutDownEventChannelName": "Batmon.ShutDownEvent",
"requestEnergySaveChannelName": "Batmon.RequestEnergySave",
"aboutToShutDownChannelName": "Batmon.AboutToShutDown",
"criticalPowerStateChannelName": "Batmon.CriticalPowerState",
"lowPowerStateChannelName": "Batmon.LowPowerState",
"firmwareVersionsChannelName": "firmwareVersions",
"wakeUpTime":3600,
"measurementTime":60,
"shutDownTime":90,
"bootTime":900,
"voltageDropDelayTime":10,
"voltageAlwaysOnMV":23000,
"voltageAlwaysOffMV":20500,
"canIdValues123":120,
"canIdValues456":121,
"canIdStatus":125,
"canIdSetRtcRXD":10,
"canIdSetRtcTXD":11,
"canIdRXD":128,
"canIdTXD":129,
"canIdParameter1":130,
"canIdParameter2":131,
"canIdParameter3":132
}
}

Parameter list

Parameter nameRequiredData typeMeaningful value rangeDefaultDescription
priorityNoINT1 ... 9980Scheduling priority of the CAN bus interface
timeoutMsNoINT1 ...1000Interval between periodically executed parts of the module
readBufferSizeNoINT1 ...8192Number of buffered CAN bus messages (read direction)
writeBufferSizeNoINT1 ...8192Number of buffered CAN bus messages (write direction)
canInterfaceNoSTRING"can0", "can1", ..."can1"CAN bus interface
fileNameNoSTRINGvalid OSF path template"/sde/<tag>/<date>/<date>_<time>.osf"Historical OSF file
fileTagNoSTRING"preview"Tag attributes of the historical OSF file
measurementTimeChannelNameNoSTRING"<module>.Parameter.MeasurementTime"Channel with set measurement interval Parameter
shutDownTimeChannelNameNoSTRING"<module>.Parameter.ShutDownTime"Channel with set shutdown time Parameter
bootTimeChannelNameNoSTRING"<module>.Parameter.BootTime"Channel with set boot time Parameter
wakeUpTimeChannelNameNoSTRING"<module>.Parameter.WakeUpTime"Channel with set wake-up time Parameter
voltageDropDelayTimeChannelNameNoSTRING"<module>.Parameter.VoltageDropDelayTime"Channel with set voltage drop tolerance time parameter
vAlwaysOffChannelNameNoSTRING"<module>.Parameter.VAlwaysOff"Channel with set parameter of the lower switching threshold
vAlwaysOnChannelNameNoSTRING"<module>.Parameter.VAlwaysOn"Channel with set parameter of the upper switching threshold
powerSupplyVoltageChannelNameNoSTRING"<module>.PowerSupplyVoltage"Supply voltage (U_Sup)
powerSupplyCurrentChannelNameNoSTRING"<module>.PowerSupplyCurrent"Supply current (I_Sup)
temperatureMOSFETChannelNameNoSTRING"<module>.TemperatureMOSFET"Temperature of the MOSFET (T_MOS)
temperatureChannelNameNoSTRING"<module>.Temperature"Temperature of the batMON (T_bM)
resistanceChannelNameNoSTRING"<module>.Resistance"Resistance of the batMON (R_bM)
operatingModeChannelNameNoSTRING"<module>.PluginState"batMON plugin state (raw state machine value)
configurationErrorChannelNameNoSTRING"<module>.ConfigurationError"batMON configuration error
batteryStatusChannelNameNoSTRING"<module>. "BatteryStatus"batMON BatteryStatus
terminal15StatusChannelNameNoSTRING"<module>.Terminal15Status"batMON Status of terminal 15
shutDownCounterChannelNameNoSTRING"<module>.ShutDownCounter"batMON Countdown within which the shutdown must be completed
bootCounterChannelNameNoSTRING"<module>.BootCounter"batMON Countdown within which the system startup must be completed
wakeUpEventChannelNameNoSTRING"<module>.WakeUpEvent"batMON Wakeup event
requestEnergySaveChannelNameNoSTRING"<module>.RequestEnergySave"BOOL latch: set once energy-saving has been requested at least once since module startup (ECO mode, KL15 switch-off edge in AlwaysOn mode, or acknowledged shutdown command); reset only on module restart
aboutToShutDownChannelNameNoSTRING"<module>.AboutToShutDown"BOOLesche batMON channel for notification of imminent shutdown
criticalPowerStateChannelNameNoSTRING"<module>.CriticalPowerState"BOOLesche batMON channel for notification of a critical power state
lowPowerStateChannelNameNoSTRING"<module>.LowPowerState"BOOLesche batMON channel for notification of a low power state
firmwareVersionsChannelNameNoSTRING"<module>.FirmwareVersion"STRING Channel with FW and PIC FW version information
wakeUpTimeNoINT600 ... 72003600batMON Wake-up time [s]
measurementTimeNoINT30 ... 30060batMON Measuring interval [s]
shutDownTimeNoINT30 ... 12090batMON Shutdown time [s]
bootTimeNoINT60 ... 120900batMON Boot time [s]
voltageDropDelayTimeNoINT10batMON Voltage drop-in tolerance time [s]
voltageAlwaysOnMVNoINT(voltageAlwaysOffMV + 2000) ... 15000023000batMON Switch-on threshold for continuous operation [mV]
voltageAlwaysOffMVNoINT18500 ... (voltageAlwaysOnMV - 2000)20500batMON Switch-off threshold [mV]
canIdValues123NoINTvalid/unique CAN ID120batMON CAN bus ID for message (U_Sup,I_Sup,T_MOS)
canIdValues456NoINTvalid/unique CAN ID121batMON CAN bus ID for message (T_bM)
canIdStatusNoINTvalid/unique CAN ID125batMON CAN bus ID for status message
canIdSetRtcRXDNoINTvalid/unique CAN ID10batMON CAN bus ID for setting the RTC
canIdSetRtcTXDNo/DiscardedINTvalid/unique CAN ID11batMON CAN bus ID for setting the RTC (acknowledgement)
canIdParameter1NoINTvalid/unique CAN ID130batMON CAN bus ID for the first parameter report frame
canIdParameter2NoINTvalid/unique CAN ID131batMON CAN bus ID for the second parameter report frame
canIdParameter3NoINTvalid/unique CAN ID132batMON CAN-Bus ID for the third Parameter Report Frame

Parameter Enums

Plugin state (OperatingMode)

ValueEnumState
0bsInitInitializing
1bsBootBooting
2bsBootInternComBooting: internal communication
3bsSynchronizeRtcBooting: synchronizing RTC
4bsGetFirmwareVersionBooting: reading firmware version
5bsGetHistoryBooting: downloading historical data
6bsGetParameterBooting: reading parameters
7bsUpdateParameterBooting: writing parameters
8bsWakeupWaking up
9bsRunningRunning
10bsCmdShutdownRunning: processing shutdown command
11bsResynchronizeRtcRunning: re-synchronizing RTC
12bsNotifyShutDownNotifying shutdown
13bsAboutToShutDownShutdown initiated
14bsPostponeShutDownShutdown postponed
15bsShutdownShutting down

batMON smartIO device status

ValueMeaning
0initial after a cold start / reset
1Standby (monitoring idle state timer, voltages, terminal 15, ...)
2Switched on (MOSFET switched on, monitoring of input voltage
3System start (waiting for the system to start up)
4Monitoring (waiting for system shutdown condition)
5Switching off (waiting for the system to switch off)
6Switched off (MOSFET switched off, capacitors are discharged)

Configuration error

ValueEnumMeaning
-3VoltageAlwaysOnTooHighvoltageAlwaysOnMV too high
-2VoltageAlwaysOnTooLowvoltageAlwaysOnMV too low
-1VoltageAlwaysOffTooLowvoltageAlwaysOffMV too low
0OKOK
1WrongMeasurementTimewrong measurementTime
2WrongShutdownTimewrong shutDownTime
3WrongBootTimewrong bootTime
4WrongWakeUpTimewrong wakeUpTime
5WrongVAlwaysOnwrong voltageAlwaysOnMV
6WrongVAlwaysOffwrong voltageAlwaysOffMV
7WrongVoltageDropDelayTimewrong voltageDropDelayTime

Battery status

ValueMeaning
0unknown
1permanently switched on
2energy saving mode
3permanently switched off
4permanently switched off (below power supply switch-on voltage)

Status of terminal 15

ValueMeaning
0unknown/not available
1switch-on edge
2switch-off edge

Wake-up event

ValueEnumMeaningFollowing operating mode
0eWakeUp_noneno eventundefined
1eWakeUp_KL15_ONTerminal 15 switch-on edgeRetrieval of historical data + continuous operation
2eWakeUp_Ubatt_Always_OFFU_batt below Always-OFF thresholdAlarming + shutdown
3eWakeUp_Ubatt_Always_ONU_batt above Always-ON thresholdRetrieval of historical data + continuous operation
4eWakeUp_Ubatt_TimerPeriodic wakeup in energy-saving mode (timer)Retrieval of historical data + energy-saving mode
5eWakeUp_Ubatt_LowPower(deprecated)Retrieval of historical data + energy-saving mode
6eWakeUp_CAN_TimerWakeup after sleep actively requested via CANRetrieval of historical data + continuous operation

Shutdown event

ValueEnumMeaningDescription
0eShutdown_nonenoneno event
1eShutdown_KL15Terminal 15Shutdown via terminal 15 (e.g. ignition key)
2eShutdown_Ubatt_Always_OFFU_batt below Always-OFF thresholdShutdown because U_batt fell below the Always-OFF threshold
3eShutdown_CANCAN bus messageShutdown due to a CAN bus message
4eShutdown_OverCurrentOvercurrent (fault)Shutdown due to exceeded current
5eShutdown_OverTemperatureOvertemperature (fault)Shutdown due to exceeded temperature
6–8RESERVED
9eShutdown_MOSFET_FailureMOSFET failure (fault)Shutdown due to MOSFET failure
10ePowerOff_KL15_Ubatt_Always_OFFTerminal 15 and Always-OFF thresholdShutdown because U_batt fell below the Always-OFF threshold (terminal 15 present)
11ePowerOff_ECO_ModeEco modeShutdown after completed measurement, U_batt below Always-ON threshold
12ePowerOff_Underrange_IntrexisUndershootUndershoot of the MOSFET switch-on voltage
15eShutdown_Unknownunknownunknown shutdown event

Call interface functions

requestDelayedShutdown

Function for the shutdown delay

ParametersTypeDescription
senderSTRINGUnique sender identifier (e.g. module instance)
delayINTDelay [ms] < 64k

Module information

InformationValue
AuthoroptiMEAS GmbH
since smartCORE0.101
module typeproducer & consumer (request energy save)
Dependencies"canbus" or "candbc" smartMODULE (on smartDEVICES), functioning CAN bus interface (on other platforms)