ModularSensors > Files > src / sensors / MeaSpecMS5803.h

MeaSpecMS5803.h file

Contains the MeaSpecMS5803 semsor subclass and the variable subclasses MeaSpecMS5803_Temp and MeaSpecMS5803_Pressure.

These are for the Measurement Specialties MS5803 pressure sensor, which is used in the SparkFun Pressure Sensor Breakout - MS5803-14BA.

This depends on the https://github.com/EnviroDIY/MS5803 library, which was modified for ModularSensors based on a fork from the https://github.com/NorthernWidget/MS5803 library, which itself expanded on https://github.com/sparkfun/SparkFun_MS5803-14BA_Breakout_Arduino_Library

Classes

class MeaSpecMS5803
The Sensor sub-class for the Measurement Specialties MS5803 sensor.
class MeaSpecMS5803_Temp
The Variable sub-class used for the temperature output from a Measurement Specialties MS5803 digital pressure sensor.
class MeaSpecMS5803_Pressure
The Variable sub-class used for the pressure output from a Measurement Specialties MS5803 digital pressure sensor.

Defines

#define MS5803_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the MS5803 can report 2 values.
#define MS5803_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Measurement Specialties MS5803

#define MS5803_WARM_UP_TIME_MS = 10
Sensor::_warmUpTime_ms; the MS5803 warms up in 10ms.
#define MS5803_STABILIZATION_TIME_MS = 0
Sensor::_stabilizationTime_ms; the MS5803 is stable as soon as it warms up (0ms stabilization).
#define MS5803_MEASUREMENT_TIME_MS = 10
Sensor::_measurementTime_ms; the MS5803 takes 10ms to complete a measurement.

Temperature

The temperature variable from a Measurement Specialties MS5803

  • Range is -40°C to +85°C
  • Accuracy is ±0.8°C

MeaSpecMS5803_Temp(MeaSpecMS5803* parentSense, const char* uuid = "", const char* varCode = MS5803_TEMP_DEFAULT_CODE) explicit

Construct a new MeaSpecMS5803_Temp object.

Parameters
parentSense The parent MeaSpecMS5803 providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "MeaSpecMS5803Temp".

#define MS5803_TEMP_RESOLUTION = 2
Decimals places in string representation; temperature should have 2 - resolution is <0.01°C.
#define MS5803_TEMP_VAR_NUM = 0
Sensor variable number; temperature is stored in sensorValues[0].
#define MS5803_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define MS5803_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define MS5803_TEMP_DEFAULT_CODE = "MeaSpecMS5803Temp"
Default variable short code; "MeaSpecMS5803Temp".

Pressure

The pressure variable from a Measurement Specialties MS5803

  • Range is 0 to 14 bar
  • Accuracy between 0 and +40°C is:
    • 14ba: ±20mbar
    • 2ba: ±1.5mbar
    • 1ba: ±1.5mbar
  • Long term stability is:
    • 14ba: -20 mbar/yr
    • 2ba: -1 mbar/yr
  • Resolution is: (at oversampling ratios: 256 / 512 / 1024 / 2048 / 4096, respectively))
    • 14ba: 1 / 0.6 / 0.4 / 0.3 / 0.2 mbar (where 1 mbar = 100 pascals)
    • 2ba: 0.13 / 0.084 / 0.054 / 0.036 / 0.024
    • 1ba: 0.065 / 0.042 / 0.027 / 0.018 / 0.012
    • MS5803_PRESSURE_RESOLUTION = 3

MeaSpecMS5803_Pressure(MeaSpecMS5803* parentSense, const char* uuid = "", const char* varCode = MS5803_PRESSURE_DEFAULT_CODE) explicit

Construct a new MeaSpecMS5803_Pressure object.

Parameters
parentSense The parent MeaSpecMS5803 providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of th a default value of MeaSpecMS5803Pressure

#define MS5803_PRESSURE_RESOLUTION = 3
Decimals places in string representation; pressure should have 3.
#define MS5803_PRESSURE_VAR_NUM = 1
Sensor variable number; pressure is stored in sensorValues[1].
#define MS5803_PRESSURE_VAR_NAME = "barometricPressure"
Variable name in ODM2 controlled vocabulary; "barometricPressure".
#define MS5803_PRESSURE_UNIT_NAME = "millibar"
Variable unit name in ODM2 controlled vocabulary; "millibar".
#define MS5803_PRESSURE_DEFAULT_CODE = "MeaSpecMS5803Pressure"
Default variable short code; "MeaSpecMS5803Pressure".