Atlas EZO-DO topic

Classes for the Atlas Scientific EZO-DO dissolved oxygen circuit and probe.

The Atlas Scientifc DO sensor outputs DO in both mg/L and percent saturation.

Sensor Datasheet

Documentation on the probe is found here: https://www.atlas-scientific.com/probes/dissolved-oxygen-probe/

Documentation on the measurement circuit is found here: https://www.atlas-scientific.com/circuits/ezo-dissolved-oxygen-circuit/

Sensor Constructors

AtlasScientificDO::AtlasScientificDO(int8_t powerPin, uint8_t i2cAddressHex = 0x61, uint8_t measurementsToAverage = 1) explicit

Construct a new Atlas Scientific DO object using the primary hardware I2C instance.

Parameters
powerPin

The pin on the mcu controlling powering to the Atlas DO circuit. Use -1 if it is continuously powered.

  • Requires a 3.3V and 5V power supply
i2cAddressHex The I2C address of the Atlas circuit; optional with the Atlas-supplied default address of 0x61.
measurementsToAverage The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1.

AtlasScientificDO::AtlasScientificDO(TwoWire* theI2C, int8_t powerPin, uint8_t i2cAddressHex = 0x61, uint8_t measurementsToAverage = 1)

Construct a new Atlas Scientific DO object using a secondary hardware I2C instance.

Parameters
theI2C A TwoWire instance for I2C communication. Due to the limitations of the Arduino core, only a hardware I2C instance can be used. For an AVR board, there is only one I2C instance possible and this form of the constructor should not be used. For a SAMD board, this can be used if a secondary I2C port is created on one of the extra SERCOMs.
powerPin

The pin on the mcu controlling powering to the Atlas DO circuit. Use -1 if it is continuously powered.

  • Requires a 3.3V and 5V power supply
i2cAddressHex The I2C address of the Atlas circuit; optional with the Atlas-supplied default address of 0x61.
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 Atlas DO sensor is used in the menu a la carte example.

1#include <sensors/AtlasScientificDO.h>
2
3// NOTE: Use -1 for any pins that don't apply or aren't being used.
4const int8_t AtlasDOPower = sensorPowerPin; // Power pin
5uint8_t AtlasDOi2c_addr = 0x61; // Default for DO is 0x61 (97)
6// All Atlas sensors have different default I2C addresses, but any of them can
7// be re-addressed to any 8 bit number. If using the default address for any
8// Atlas Scientific sensor, you may omit this argument.
9
10// Create an Atlas Scientific DO sensor object
11// AtlasScientificDO atlasDO(AtlasDOPower, AtlasDOi2c_addr);
12AtlasScientificDO atlasDO(AtlasDOPower);
13
14// Create concentration and percent saturation variable pointers for the EZO-DO
15Variable* atlasDOconc = new AtlasScientificDO_DOmgL(
16 &atlasDO, "12345678-abcd-1234-ef00-1234567890ab");
17Variable* atlasDOpct = new AtlasScientificDO_DOpct(
18 &atlasDO, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class AtlasScientificDO
The Sensor sub-class for the Atlas Scientific EZO dissolved oxygen circuit.
class AtlasScientificDO_DOmgL
The Variable sub-class used for the dissolved oxygen concentration output from an Atlas Scientific EZO dissolved oxygen circuit.
class AtlasScientificDO_DOpct
The Variable sub-class used for the dissolved oxygen percent of saturation output from an Atlas Scientific EZO dissolved oxygen circuit.

Sensor Variable Counts

The number of variables that can be returned by the Atlas DO sensor

#define ATLAS_DO_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the Atlas EZO DO circuit can report 2 values.
#define ATLAS_DO_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Configuration Defines

Defines to configure and set the address of the Atlas DO sensor

#define ATLAS_DO_I2C_ADDR = 0x61
The default I2C address of the Atlas DO sensor is 0x61 (97)

Sensor Timing

The sensor timing for an Atlas DO sensor

#define ATLAS_DO_WARM_UP_TIME_MS = 745
Sensor::_warmUpTime_ms; the Atlas DO sensor warms up in 745ms.
#define ATLAS_DO_STABILIZATION_TIME_MS = 0
Sensor::_stabilizationTime_ms; the Atlas DO sensor is stable at completion of warm up (0ms after warm-up).
#define ATLAS_DO_MEASUREMENT_TIME_MS = 600
Sensor::_measurementTime_ms; the Atlas DO sensor takes 600ms to complete a measurement.

DO Concentration

The dissolved oxygen concentration from an Atlas DO sensor

  • Accuracy is ± 0.05 mg/L
  • Range is 0.01 − 100+ mg/L

AtlasScientificDO_DOmgL::AtlasScientificDO_DOmgL(AtlasScientificDO* parentSense, const char* uuid = "", const char* varCode = "AtlasDOmgL") explicit

Construct a new AtlasScientificDO_DOmgL object.

Parameters
parentSense The parent AtlasScientificDO 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 "AtlasDOmgL".

#define ATLAS_DOMGL_RESOLUTION = 2
Decimals places in string representation; dissolved oxygen concentration should have 2 - resolution is 0.01 mg/L.
#define ATLAS_DOMGL_VAR_NUM = 0
Sensor variable number; dissolved oxygen concentration is stored in sensorValues[0].
#define ATLAS_DOMGL_VAR_NAME = "oxygenDissolved"
Variable name in ODM2 controlled vocabulary; "oxygenDissolved".
#define ATLAS_DOMGL_UNIT_NAME = "milligramPerLiter"
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define ATLAS_DOMGL_DEFAULT_CODE = "AtlasDOmgL"
Default variable short code; "AtlasDOmgL".

DO Percent Saturation

The dissolved oxygen percent saturation for an Atlas DO sensor

  • Accuracy is ± 0.05 mg/L
  • Range is 0.1 − 400+ % saturation

AtlasScientificDO_DOpct::AtlasScientificDO_DOpct(AtlasScientificDO* parentSense, const char* uuid = "", const char* varCode = "AtlasDOpct") explicit

Construct a new AtlasScientificDO_DOpct object.

Parameters
parentSense The parent AtlasScientificDO 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 "AtlasDOpct".

#define ATLAS_DOPCT_RESOLUTION = 1
Decimals places in string representation; dissolved oxygen percent should have 1 - resolution is 0.1 % saturation.
#define ATLAS_DOPCT_VAR_NUM = 1
Sensor variable number; dissolved oxygen percent is stored in sensorValues[1].
#define ATLAS_DOPCT_VAR_NAME = "oxygenDissolvedPercentOfSaturation"
Variable name in ODM2 controlled vocabulary; "oxygenDissolvedPercentOfSaturation".
#define ATLAS_DOPCT_UNIT_NAME = "percent"
Variable unit name in ODM2 controlled vocabulary; "percent" (percent saturation)
#define ATLAS_DOPCT_DEFAULT_CODE = "AtlasDOpct"
Default variable short code; "AtlasDOpct".

Define documentation

#define ATLAS_DO_NUM_VARIABLES = 2

Sensor::_numReturnedValues; the Atlas EZO DO circuit can report 2 values.


#define ATLAS_DO_INC_CALC_VARIABLES = 0

Sensor::_incCalcValues; we don't calculate any additional values.


#define ATLAS_DO_I2C_ADDR = 0x61

The default I2C address of the Atlas DO sensor is 0x61 (97)


#define ATLAS_DO_WARM_UP_TIME_MS = 745

Sensor::_warmUpTime_ms; the Atlas DO sensor warms up in 745ms.

737-739 in tests


#define ATLAS_DO_STABILIZATION_TIME_MS = 0

Sensor::_stabilizationTime_ms; the Atlas DO sensor is stable at completion of warm up (0ms after warm-up).


#define ATLAS_DO_MEASUREMENT_TIME_MS = 600

Sensor::_measurementTime_ms; the Atlas DO sensor takes 600ms to complete a measurement.

only ~555 measurement time in tests, but keep the 600 recommended by manual


#define ATLAS_DOMGL_RESOLUTION = 2

Decimals places in string representation; dissolved oxygen concentration should have 2 - resolution is 0.01 mg/L.


#define ATLAS_DOMGL_VAR_NUM = 0

Sensor variable number; dissolved oxygen concentration is stored in sensorValues[0].


#define ATLAS_DOMGL_VAR_NAME = "oxygenDissolved"

Variable name in ODM2 controlled vocabulary; "oxygenDissolved".


#define ATLAS_DOMGL_UNIT_NAME = "milligramPerLiter"

Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)


#define ATLAS_DOMGL_DEFAULT_CODE = "AtlasDOmgL"

Default variable short code; "AtlasDOmgL".


#define ATLAS_DOPCT_RESOLUTION = 1

Decimals places in string representation; dissolved oxygen percent should have 1 - resolution is 0.1 % saturation.


#define ATLAS_DOPCT_VAR_NUM = 1

Sensor variable number; dissolved oxygen percent is stored in sensorValues[1].


#define ATLAS_DOPCT_VAR_NAME = "oxygenDissolvedPercentOfSaturation"

Variable name in ODM2 controlled vocabulary; "oxygenDissolvedPercentOfSaturation".


#define ATLAS_DOPCT_UNIT_NAME = "percent"

Variable unit name in ODM2 controlled vocabulary; "percent" (percent saturation)


#define ATLAS_DOPCT_DEFAULT_CODE = "AtlasDOpct"

Default variable short code; "AtlasDOpct".