Zebra-Tech D-Opto topic
Classes for the Zebra-Tech D-Opto digital dissolved oxygen sensor.
Introduction
The Zebra-Tech D-Opto sensor is implemented as a sub-classes of the SDI12Sensors class. It requires an 8-12V power supply, which can be turned off between measurements. The connection between the logger and the Arduino board is made by way of a white interface module provided by Zebra-Tech. You will need a voltage booster or a separate power supply to give the D-Opto sufficient voltage to run. At the Stroud Center, we use Pololu 9V Step-Up Voltage Regulators.
Sensor Datasheet
The manual for this sensor is available at: www.zebra-tech.co.nz/wp-content/uploads/2014/04/D-Opto-Sensor-manual-A4-ver-2.pdf
Build flags
Sensor Constructor
Construct a new Zebra-Tech DOpto object. The pin on the mcu controlling power to the D-Opto 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.
ZebraTechDOpto::
Parameters
SDI12address
The SDI-12 address of the DOpto; 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 Zebra-Tech D-Opto is used in the menu a la carte example.
Classes
- class ZebraTechDOpto
- The Sensor sub-class for the Zebra-Tech D-Opto dissolved oxygen sensor.
- class ZebraTechDOpto_Temp
- The Variable sub-class used for the temperature output from a Zebra-Tech D-Opto dissolved oxygen sensor.
- class ZebraTechDOpto_DOpct
- The Variable sub-class used for the dissolved oxygen percent saturation output from a Zebra-Tech D-Opto dissolved oxygen sensor.
- class ZebraTechDOpto_DOmgL
- The Variable sub-class used for the dissolved oxygen concentration output from a Zebra-Tech D-Opto dissolved oxygen sensor.
Sensor Variable Counts
The number of variables that can be returned by a ZebraTech D-Opto
- #define DOPTO_NUM_VARIABLES = 3
- Sensor::
_numReturnedValues; the D-Opto can report 3 values. - #define DOPTO_INC_CALC_VARIABLES = 0
- Sensor::
_incCalcValues; we don't calculate any additional values.
Sensor Timing
The sensor timing for a ZebraTech D-Opto
- #define DOPTO_WARM_UP_TIME_MS = 275
- Sensor::
_warmUpTime_ms; the D-Opto warms up in 275ms. Maximum warm-up time in SDI-12 mode: ~250ms, give a bit of extra for safety. - #define DOPTO_STABILIZATION_TIME_MS = 0
- Sensor::
_stabilizationTime_ms; the D-Opto is stable as soon as it warms up (0ms stabilization). - #define DOPTO_MEASUREMENT_TIME_MS = 5335
- Sensor::
_measurementTime_ms; the D-Opto takes 5335ms to complete a measurement. - #define DOPTO_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 D-Opto requires no extra time.
Temperature
The temperature variable from a ZebraTech D-Opto
- Range is not specified in sensor datasheet
- Accuracy is ± 0.1°C
Construct a new ZebraTechDOpto_
ZebraTechDOpto_
Parameters
parentSense
The parent ZebraTechDOpto 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 "DOtempC".
- #define DOPTO_TEMP_RESOLUTION = 2
- Decimals places in string representation; temperature should have 2 - resolution is 0.01°C.
- #define DOPTO_TEMP_VAR_NUM = 0
- Sensor variable number; temperature is stored in sensorValues[0].
- #define DOPTO_TEMP_VAR_NAME = "temperature"
- Variable name in ODM2 controlled vocabulary; "temperature".
- #define DOPTO_TEMP_UNIT_NAME = "degreeCelsius"
- Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
- #define DOPTO_TEMP_DEFAULT_CODE = "DOtempC"
- Default variable short code; "DOtempC".
Dissolved Oxygen Percent Saturation
The percent saturation variable from a ZebraTech D-Opto
- Range is not specified in sensor datasheet
- Accuracy is 1 % of reading or 0.02PPM, whichever is greater
Construct a new ZebraTechDOpto_
ZebraTechDOpto_
Parameters
parentSense
The parent ZebraTechDOpto 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 "DOpercent".
- #define DOPTO_DOPCT_RESOLUTION = 2
- Decimals places in string representation; dissolved oxygen percent should have 2.
- #define DOPTO_DOPCT_VAR_NUM = 1
- Sensor variable number; dissolved oxygen percent is stored in sensorValues[1].
- #define DOPTO_DOPCT_VAR_NAME = "oxygenDissolvedPercentOfSaturation"
- Variable name in ODM2 controlled vocabulary; "oxygenDissolvedPercentOfSaturation".
- #define DOPTO_DOPCT_UNIT_NAME = "percent"
- Variable unit name in ODM2 controlled vocabulary; "percent" (% saturation)
- #define DOPTO_DOPCT_DEFAULT_CODE = "DOpercent"
- Default variable short code; "DOpercent".
Dissolved Oxygen Concentration
The DO concentration variable from a ZebraTech D-Opto
- Range is not specified in sensor datasheet
- Accuracy is 1 % of reading or 0.02PPM, whichever is greater
Construct a new ZebraTechDOpto_
ZebraTechDOpto_
Parameters
parentSense
The parent ZebraTechDOpto 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 "DOppm".
- #define DOPTO_DOMGL_RESOLUTION = 3
- Decimals places in string representation; dissolved oxygen concentration should have 3 - resolution is 0.01 % / 0.001 PPM.
- #define DOPTO_DOMGL_VAR_NUM = 2
- Sensor variable number; dissolved oxygen concentration is stored in sensorValues[2].
- #define DOPTO_DOMGL_VAR_NAME = "oxygenDissolved"
- Variable name in ODM2 controlled vocabulary; "oxygenDissolved".
- #define DOPTO_DOMGL_UNIT_NAME = "milligramPerLiter"
- Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
- #define DOPTO_DOMGL_DEFAULT_CODE = "DOppm"
- Default variable short code; "DOppm".
Define documentation
#define DOPTO_NUM_VARIABLES = 3
#include <src/sensors/ZebraTechDOpto.h>
Sensor::
#define DOPTO_INC_CALC_VARIABLES = 0
#include <src/sensors/ZebraTechDOpto.h>
Sensor::
#define DOPTO_WARM_UP_TIME_MS = 275
#include <src/sensors/ZebraTechDOpto.h>
Sensor::
#define DOPTO_STABILIZATION_TIME_MS = 0
#include <src/sensors/ZebraTechDOpto.h>
Sensor::
#define DOPTO_MEASUREMENT_TIME_MS = 5335
#include <src/sensors/ZebraTechDOpto.h>
Sensor::
- Excitiation time before measurement: ~5225ms
- Maximum measurement duration: ~110ms
Obnoxiously, the sensor will not take a "concurrent" measurement and leave the sensor powered on, so we must wait entire ~5200ms exitation time and the 110ms measurement time each time. There is the ability to do a non-concurrent measurement and leave the sensor powered on, in which case the re-measurement takes ~110ms, but doing it that way the sensor would send an interruption when it was finished, possibly colliding with and confusing other sensor results.
#define DOPTO_EXTRA_WAKE_TIME_MS = 0
#include <src/sensors/ZebraTechDOpto.h>
Extra wake time required for an SDI-12 sensor between the "break" and the time the command is sent. The D-Opto requires no extra time.
#define DOPTO_TEMP_RESOLUTION = 2
#include <src/sensors/ZebraTechDOpto.h>
Decimals places in string representation; temperature should have 2 - resolution is 0.01°C.
#define DOPTO_TEMP_VAR_NUM = 0
#include <src/sensors/ZebraTechDOpto.h>
Sensor variable number; temperature is stored in sensorValues[0].
#define DOPTO_TEMP_VAR_NAME = "temperature"
#include <src/sensors/ZebraTechDOpto.h>
Variable name in ODM2 controlled vocabulary; "temperature".
#define DOPTO_TEMP_UNIT_NAME = "degreeCelsius"
#include <src/sensors/ZebraTechDOpto.h>
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define DOPTO_TEMP_DEFAULT_CODE = "DOtempC"
#include <src/sensors/ZebraTechDOpto.h>
Default variable short code; "DOtempC".
#define DOPTO_DOPCT_RESOLUTION = 2
#include <src/sensors/ZebraTechDOpto.h>
Decimals places in string representation; dissolved oxygen percent should have 2.
#define DOPTO_DOPCT_VAR_NUM = 1
#include <src/sensors/ZebraTechDOpto.h>
Sensor variable number; dissolved oxygen percent is stored in sensorValues[1].
#define DOPTO_DOPCT_VAR_NAME = "oxygenDissolvedPercentOfSaturation"
#include <src/sensors/ZebraTechDOpto.h>
Variable name in ODM2 controlled vocabulary; "oxygenDissolvedPercentOfSaturation".
#define DOPTO_DOPCT_UNIT_NAME = "percent"
#include <src/sensors/ZebraTechDOpto.h>
Variable unit name in ODM2 controlled vocabulary; "percent" (% saturation)
#define DOPTO_DOPCT_DEFAULT_CODE = "DOpercent"
#include <src/sensors/ZebraTechDOpto.h>
Default variable short code; "DOpercent".
#define DOPTO_DOMGL_RESOLUTION = 3
#include <src/sensors/ZebraTechDOpto.h>
Decimals places in string representation; dissolved oxygen concentration should have 3 - resolution is 0.01 % / 0.001 PPM.
#define DOPTO_DOMGL_VAR_NUM = 2
#include <src/sensors/ZebraTechDOpto.h>
Sensor variable number; dissolved oxygen concentration is stored in sensorValues[2].
#define DOPTO_DOMGL_VAR_NAME = "oxygenDissolved"
#include <src/sensors/ZebraTechDOpto.h>
Variable name in ODM2 controlled vocabulary; "oxygenDissolved".
#define DOPTO_DOMGL_UNIT_NAME = "milligramPerLiter"
#include <src/sensors/ZebraTechDOpto.h>
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define DOPTO_DOMGL_DEFAULT_CODE = "DOppm"
#include <src/sensors/ZebraTechDOpto.h>
Default variable short code; "DOppm".