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.OperatingMode",
"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>.OperatingMode"batMON operating mode
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 batMON channel for requesting the sleep state
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

Operating mode

ValueMeaning
0Start
1Normal operation
2Initialization of shutdown
3Shutdown

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

ValueMeaning
-3voltageAlwaysOnMV too high
-2voltageAlwaysOnMV too low
-1voltageAlwaysOffMV too low
0OK
1incorrect measurementTime
2wrong shutDownTime
3wrong bootTime
4incorrect wakeUpTime
5wrong voltageAlwaysOnMV
6wrong voltageAlwaysOffMV

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

ValueMeaningfollowing operating mode
0unknownundefined
1Terminal 15 Switch-on edgeRetrieval of historical data + continuous operation
2permanently switched offalarming + shutdown
3permanently switched onretrieval of historical data + continuous operation
4(generally periodic) CAN bus commandRetrieval of historical data + energy-saving mode
5Energy-saving modeRetrieval of historical data + energy-saving mode
6Woken up by CAN bus messageRetrieve historical data + continuous operation

Shutdown event

ValueMeaningDescription
0noneno event
1Terminal 15Shutdown via terminal 15 (e.g. ignition key)
2Voltage level "always off"Shutdown because the voltage has fallen below the limit value "always off"
3CAN bus messageShutdown due to a CAN bus message
4OvercurrentShutdown due to exceeded current
5OvertemperatureShutdown due to exceeded temperature
6-8RESERVED
9MOSFET failureShutdown due to MOSFET failure
10Terminal 15 and voltage level "always off"Shutdown because the voltage has fallen below the "always off" limit (if terminal 15, e.g. ignition key, is present)
11Eco modeShutdown after completed measurement, as the voltage is below the "always on" limit value
12undershootundershoot of the MOSFET switch-on voltage
15unknownunknown 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 Measurement and Automation Systems GmbH
since smartCORE0.101
module typeproducer & consumer (request energy save)
Dependencies"canbus" or "candbc" smartMODULE (on smartDEVICES), functioning CAN bus interface (on other platforms)