ModularSensors > Files > src / sensors / DecagonES2.h

DecagonES2.h file

Contains the DecagonES2 subclass of the SDI12Sensors class along with the variable subclasses DecagonES2_Cond and DecagonES2_Temp.

These are used for the discontinued Decagon Devices ES-2 Electrical Conductivity Sensor.

This depends on the EnviroDIY SDI-12 library and the SDI12Sensors super class.

Classes

class DecagonES2
The Sensor sub-class for the Decagon ES-2 sensor.
class DecagonES2_Cond
The Variable sub-class used for the conductivity output from a Decagon ES-2 electrical conductivity sensor.
class DecagonES2_Temp
The Variable sub-class used for the temperature output from a Decagon ES-2 electrical conductivity sensor.

Defines

#define ES2_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the ES2 can report 2 values.
#define ES2_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Decagon ES-2

#define ES2_WARM_UP_TIME_MS = 250
Sensor::_warmUpTime_ms; maximum warm-up time in SDI-12 mode: 250ms.
#define ES2_STABILIZATION_TIME_MS = 0
Sensor::_stabilizationTime_ms; the ES2 is stable as soon as it warms up (0ms stabilization).
#define ES2_MEASUREMENT_TIME_MS = 250
Sensor::_measurementTime_ms; maximum measurement duration: 250ms.
#define ES2_EXTRA_WAKE_TIME_MS = 0
Extra wake time required for an SDI-12 sensor between the "break" and the time the command is sent. The ES-2 requires no extra time.

Conductivity

The conductivity variable from a Decagon ES-2

  • Range is 0 – 120 mS/cm (bulk)
  • Accuracy is ±0.01mS/cm or ±10% (whichever is greater)

DecagonES2_Cond(DecagonES2* parentSense, const char* uuid = "", const char* varCode = ES2_COND_DEFAULT_CODE) explicit

Construct a new DecagonES2_Cond object.

Parameters
parentSense The parent DecagonES2 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 "ES2Cond".

#define ES2_COND_RESOLUTION = 1
Decimals places in string representation; conductivity should have 1.
#define ES2_COND_VAR_NUM = 0
Sensor variable number; conductivity is stored in sensorValues[0].
#define ES2_COND_VAR_NAME = "specificConductance"
Variable name in ODM2 controlled vocabulary; "specificConductance".
#define ES2_COND_UNIT_NAME = "microsiemenPerCentimeter"
Variable unit name in ODM2 controlled vocabulary; "microsiemenPerCentimeter" (µS/cm)
#define ES2_COND_DEFAULT_CODE = "ES2Cond"
Default variable short code; "ES2Cond".

Temperature

The temperature variable from a Decagon ES-2

  • Range is -40°C to +50°C
  • Accuracy is ±1°C

DecagonES2_Temp(DecagonES2* parentSense, const char* uuid = "", const char* varCode = ES2_TEMP_DEFAULT_CODE) explicit

Construct a new DecagonES2_Temp object.

Parameters
parentSense The parent DecagonES2 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 "ES2Temp".

#define ES2_TEMP_RESOLUTION = 2
Decimals places in string representation; temperature should have 2.
#define ES2_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define ES2_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define ES2_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define ES2_TEMP_DEFAULT_CODE = "ES2Temp"
Default variable short code; "ES2Temp".