Raw Data Format

The Raw Data Format developed for the Bosch Sensortec BME688 is used to store the Board Configuration as well as the raw data. It is recommended to use this data format whenever data with the BME688 is recorded. The BME688 Development Kit also uses this data format.

File Name

The filename consists of the following parts (each separated by a _):

  • <date>
  • <boardId>
  • <counterPowerOnOff>
  • <seedPowerOnOff>
  • <counterFileLimit>
  • .bmerawdata

Example: 2021_03_06_09_15_Board_2462ABD29048_PowerOnOff_1_pfqncv1hjow4xm4t_File_0.bmerawdata

partDescription
<date>Date created with the format: "yyyy_mm_dd_hh_mm"
<boardId>Board-specific ID prefixed with "board_" (each board has a unique ID)
<counterPowerOnOff>Counter for power interruptions prefixed with "PowerOnOff_" (a new file is created every time the board is powered on)
<seedPowerOnOff>Unique seed that labels raw data that belongs to the same Measurement Session
<counterFileLimit>Counter for consecutive raw data files prefixed with "File_" (after a file limit of 299 MB is reached a new file is created)
.bmerawdataBME AI-Studio specific ending with JSON syntax

Structure

The file is structured into 4 parts:

  • configHeader
  • configBody
  • rawDataHeader
  • rawDataBody

The parts configHeader and configBody represent the board configuration. They are also saved within the .bmeconfig file. The parts rawDataHeader and rawDataBody store the actual recorded raw data.

The following subsections give a description of each parameter used.

configHeader

ParameterDescription
dateCreated_ISOCreation date and time of the board configuration, according to ISO 8601 in Coordinated Universal Time (UTC)
appVersionApplication version number of BME AI-Studio that created the board configuration
boardTypeIdentifier for the type of hardware used. board_8 refers to the BME688 Development Kit (see Board type). Other boardType are also accepted, and can be used when data is recorded with other hardware devices.
boardModeIdentifier for Board Mode. burn_in refers to the sensorboard's default HP/RDC, heater_profile_exploration refers to Heater Profile Exploration, duty_cycle_profile_exploration refers to Duty Cycle Exploration. Other boardMode are also accepted, and can be used when data is recorded with specific settings.
boardLayoutIdentifier for Board Layout. grouped refers to Grouped Board Layout, shuffled refers to Shuffled Board Layout, random refers to Random Board Layout.

configBody

ParameterDescription
heaterProfilesDefinition of Heater Profiles.

id can be any identifier string.

timeBase is stated in milliseconds and defines the base unit of time used for temperatureTimeVectors. In order to work properly it should be set to 140.

temperatureTimeVectors are defined as [temperature,time], where temperature is stated in degree Celsius and time spans are stated as multiples of timeBase.
dutyCycleProfilesDefinition of Duty Cycles.

id can be any identifier string.

numberScanningCycles states the number of Scanning Cycles.

numberSleepingCycles states the number of Sleeping Cycles.
sensorConfigurationsAllocation of sensors to HP/RDC Combinations referencing to already defined heaterProfiles and dutyCycleProfiles by their id.

sensorIndex states the index of one of the sensors on the board (usually counting starts at 0).

heaterProfile states the id of one of the defined heaterProfiles.

dutyCycleProfile states the id of one of the defined dutyCycleProfiles.

rawDataHeader

ParameterDescription
counterPowerOnOffCounter for power interruptions prefixed with "PowerOnOff_" (a new file is created every time the board is powered on). This parameter is also reflected within the File Name.
seedPowerOnOffUnique seed that labels raw data that belongs to the same Measurement Session. This parameter is also reflected within the File Name.
counterFileLimitCounter for consecutive rawdata files prefixed with "File_" (after a file limit of 299 MB is reached a new file is created). This parameter is also reflected within the File Name.
dateCreatedCreation date and time of the start of raw data recording, according to UnixTime (seconds since 1 January 1970 in Coordinated Universal Time (UTC))
dateCreated_ISOCreation date and time of the start of raw data recording, according to ISO 8601 in Coordinated Universal Time (UTC)
firmwareVersionFirmware version of the BME688 Development Kit
boardIdUnique board id for the BME688 Development Kit used for recording

rawDataBody

This section is divided into two parts. The first part (dataColumns) acts as a column description for the second part (dataBlock), which actually carries the raw data in a condensed form. Every block within dataColumns describes one of the 12 data columns.

Here are some additional remarks concerning the column descriptions:

  • sensor_id is a unique id per sensor, that can be used to trace back data to an individual sensor element
  • heater_profile_step_index is a counter for 10 heater steps that will be cycled continously (see Heater Profile ). Counting starts at 0 up to 9.
  • label_tag records when the buttons on the BME688 Development Kit are used. The encoding is:
    0 if no button was pressed so far,
    1 if Button 1 (S1) was pressed,
    2 if Button 2 (S2) was pressed, and
    3 if both buttons (S1+S2) were pressed simultaneously.
    The current state is carried on until another button is pressed. (see During recording).
  • error_code states errors that happened during recording with the follwing encoding:
    1 for invalid Heater Profiles (affects all data points that follow)
    2for time stamp mismatch or data loss (affects only a single data point, dropping the whole cycle is recommended)
    3 for communication errors (affects only a single data point, dropping the whole cycle is recommended).

Example

{
  "configHeader": {
    "dateCreated_ISO": "2023-10-04T19:03:42.602Z",
    "appVersion": "2.2.0",
    "boardType": "board_8",
    "boardMode": "heater_profile_exploration",
    "boardLayout": "grouped"
  },
  "configBody": {
    "heaterProfiles": [
      {
        "id": "heater_301",
        "timeBase": 140,
        "temperatureTimeVectors": [
          [
            100,
            2
          ],
          [
            100,
            41
          ],
          [
            200,
            2
          ],
          [
            200,
            14
          ],
          [
            200,
            14
          ],
          [
            200,
            14
          ],
          [
            320,
            2
          ],
          [
            320,
            14
          ],
          [
            320,
            14
          ],
          [
            320,
            14
          ]
        ]
      },
      {
        "id": "heater_354",
        "timeBase": 140,
        "temperatureTimeVectors": [
          [
            320,
            5
          ],
          [
            100,
            2
          ],
          [
            100,
            10
          ],
          [
            100,
            30
          ],
          [
            200,
            5
          ],
          [
            200,
            5
          ],
          [
            200,
            5
          ],
          [
            320,
            5
          ],
          [
            320,
            5
          ],
          [
            320,
            5
          ]
        ]
      }
    ],
    "dutyCycleProfiles": [
      {
        "id": "duty_1",
        "numberScanningCycles": 1,
        "numberSleepingCycles": 0
      }
    ],
    "sensorConfigurations": [
      {
        "sensorIndex": 0,
        "heaterProfile": "heater_301",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 1,
        "heaterProfile": "heater_301",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 2,
        "heaterProfile": "heater_354",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 3,
        "heaterProfile": "heater_354",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 4,
        "heaterProfile": "heater_501",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 5,
        "heaterProfile": "heater_501",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 6,
        "heaterProfile": "heater_411",
        "dutyCycleProfile": "duty_1"
      },
      {
        "sensorIndex": 7,
        "heaterProfile": "heater_411",
        "dutyCycleProfile": "duty_1"
      }
    ]
  }
	,
	"rawDataHeader": {
		"counterPowerOnOff": 1,
		"seedPowerOnOff": "03ch37nq19ybsm3u",
		"counterFileLimit": 1,
		"dateCreated": "1696446294",
		"dateCreated_ISO": "2023-10-04T19:04:54+00:00",
		"firmwareVersion": "2.1.0",
		"boardId": "E0E2E69BA804"
	},
	"rawDataBody": {
		"dataColumns": [
			{
				"name": "Sensor Index",
				"unit": "",
				"format": "integer",
				"key": "sensor_index",
				"colId": 1
			},
			{
				"name": "Sensor ID",
				"unit": "",
				"format": "integer",
				"key": "sensor_id",
				"colId": 2
			},
			{
				"name": "Time Since PowerOn",
				"unit": "Milliseconds",
				"format": "integer",
				"key": "timestamp_since_poweron",
				"colId": 3
			},
			{
				"name": "Real time clock",
				"unit": "Unix Timestamp: seconds since Jan 01 1970. (UTC); 0 = missing",
				"format": "integer",
				"key": "real_time_clock",
				"colId": 4
			},
			{
				"name": "Temperature",
				"unit": "DegreesCelcius",
				"format": "float",
				"key": "temperature",
				"colId": 5
			},
			{
				"name": "Pressure",
				"unit": "Hectopascals",
				"format": "float",
				"key": "pressure",
				"colId": 6
			},
			{
				"name": "Relative Humidity",
				"unit": "Percent",
				"format": "float",
				"key": "relative_humidity",
				"colId": 7
			},
			{
				"name": "Resistance Gassensor",
				"unit": "Ohms",
				"format": "float",
				"key": "resistance_gassensor",
				"colId": 8
			},
			{
				"name": "Heater Profile Step Index",
				"unit": "",
				"format": "integer",
				"key": "heater_profile_step_index",
				"colId": 9
			},
			{
				"name": "Scanning Mode Enabled",
				"unit": "",
				"format": "boolean",
				"key": "scanning_enabled",
				"colId": 10
			},
			{
				"name": "Scanning Cycle Index",
				"unit": "",
				"format": "integer",
				"key": "scanning_cycle_index",
				"colId": 11
			},
			{
				"name": "Label Tag",
				"unit": "",
				"format": "integer",
				"key": "label_tag",
				"colId": 12
			},
			{
				"name": "Error Code",
				"unit": "",
				"format": "integer",
				"key": "error_code",
				"colId": 13
			}
		],
		"dataBlock": [
			[
				1,
				1903381786,
				21279,
				1696446295,
				27.810465,
				995.643311,
				35.638016,
				3719409.750000,
				0,
				1,
				1,
				0,
				0
			],
			[
				0,
				1903393567,
				21418,
				1696446295,
				27.758204,
				995.798706,
				35.669182,
				4340132.500000,
				0,
				1,
				1,
				0,
				0
			],
			[
				2,
				1903399449,
				21704,
				1696446296,
				30.015207,
				995.810059,
				35.779125,
				184438.046875,
				0,
				1,
				1,
				0,
				0
			],
			[
				3,
				1903370010,
				21709,
				1696446296,
				29.958317,
				995.867188,
				35.601505,
				141241.375000,
				0,
				1,
				1,
				0,
				0
			],
			[
				2,
				1903399449,
				21984,
				1696446296,
				30.015207,
				995.908508,
				35.750591,
				16141872.000000,
				1,
				1,
				1,
				0,
				0
			],
			[
				3,
				1903370010,
				21989,
				1696446296,
				29.960827,
				995.924927,
				35.554985,
				9191585.000000,
				1,
				1,
				1,
				0,
				0
			],
			[
				2,
				1903399449,
				23384,
				1696446297,
				30.307734,
				995.911621,
				35.369877,
				15837603.000000,
				2,
				1,
				1,
				0,
				0
			]
	    ]
	}
}