Decagon ES-2 topic
- Introduction
- Sensor Datasheet
- Build flags
- Sensor Constructor
- Example Code
- Reference
- Detailed Descriptions
Classes for the Decagon ES-2 conductivity and temperature sensor.
Introduction
If you still have one of these sensors, it is implemented as a sub-classes of the SDI12Sensors class. It requires a 3.5-12V power supply, which can be turned off between measurements. While contrary to the manual, they will run with power as low as 3.3V. On the version with a stereo cable, the power is connected to the tip, data to the ring, and ground to the sleeve. On the bare-wire version, the power is connected to the white cable, data to red, and ground to the unshielded cable.
Sensor Datasheet
Build flags
Sensor Constructor
Construct a new Decagon ES2 object. The pin on the mcu controlling power to the ES2 Use -1 if it is continuously powered. The SDI-12 address of the sensor, the Arduino pin controlling power on/off, and the Arduino pin sending and receiving data are required for the sensor constructor. Optionally, you can include a number of distinct readings to average. The data pin must be a pin that supports pin-change interrupts.
DecagonES2::
Parameters
SDI12address
The SDI-12 address of the ES-2; can be a char, char*, or int.
powerPin
dataPin
The pin on the mcu connected to the data line of the SDI-12 circuit.
measurementsToAverage
The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1.
Example Code
The Decagon ES-2 is used in the menu a la carte example.
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.
Sensor Variable Counts
The number of variables that can be returned by Decagon ES2
- #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)
Construct a new DecagonES2_
DecagonES2_
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
Construct a new DecagonES2_
DecagonES2_
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".
Define documentation
#define ES2_NUM_VARIABLES = 2
#include <src/sensors/DecagonES2.h>
Sensor::
#define ES2_INC_CALC_VARIABLES = 0
#include <src/sensors/DecagonES2.h>
Sensor::
#define ES2_WARM_UP_TIME_MS = 250
#include <src/sensors/DecagonES2.h>
Sensor::
#define ES2_STABILIZATION_TIME_MS = 0
#include <src/sensors/DecagonES2.h>
Sensor::
#define ES2_MEASUREMENT_TIME_MS = 250
#include <src/sensors/DecagonES2.h>
Sensor::
#define ES2_EXTRA_WAKE_TIME_MS = 0
#include <src/sensors/DecagonES2.h>
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.
#define ES2_COND_RESOLUTION = 1
#include <src/sensors/DecagonES2.h>
Decimals places in string representation; conductivity should have 1.
0 are reported, adding extra digit to resolution to allow the proper number of significant figures for averaging - resolution is 0.001 mS/cm = 1 µS/cm
#define ES2_COND_VAR_NUM = 0
#include <src/sensors/DecagonES2.h>
Sensor variable number; conductivity is stored in sensorValues[0].
#define ES2_COND_VAR_NAME = "specificConductance"
#include <src/sensors/DecagonES2.h>
Variable name in ODM2 controlled vocabulary; "specificConductance".
#define ES2_COND_UNIT_NAME = "microsiemenPerCentimeter"
#include <src/sensors/DecagonES2.h>
Variable unit name in ODM2 controlled vocabulary; "microsiemenPerCentimeter" (µS/cm)
#define ES2_COND_DEFAULT_CODE = "ES2Cond"
#include <src/sensors/DecagonES2.h>
Default variable short code; "ES2Cond".
#define ES2_TEMP_RESOLUTION = 2
#include <src/sensors/DecagonES2.h>
Decimals places in string representation; temperature should have 2.
1 is reported, adding extra digit to resolution to allow the proper number of significant figures for averaging - resolution is 0.1°C
#define ES2_TEMP_VAR_NUM = 1
#include <src/sensors/DecagonES2.h>
Sensor variable number; temperature is stored in sensorValues[1].
#define ES2_TEMP_VAR_NAME = "temperature"
#include <src/sensors/DecagonES2.h>
Variable name in ODM2 controlled vocabulary; "temperature".
#define ES2_TEMP_UNIT_NAME = "degreeCelsius"
#include <src/sensors/DecagonES2.h>
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define ES2_TEMP_DEFAULT_CODE = "ES2Temp"
#include <src/sensors/DecagonES2.h>
Default variable short code; "ES2Temp".