Yosemitech Y504 Dissolved Oxygen Sensor topic
Classes for the Yosemitech Y502-A or Y504-A optical dissolved oxygen sensor.
Sensor Datasheet
Sensor Constructor
YosemitechY504:: YosemitechY504(byte modbusAddress,
Stream* stream,
int8_t powerPin,
int8_t powerPin2 = -1,
int8_t enablePin = -1,
uint8_t measurementsToAverage = 1)
Construct a new Yosemitech Y504 object.
Parameters | |
---|---|
modbusAddress | The modbus address of the sensor. |
stream | An Arduino data stream for modbus communication. See notes for more information on what streams can be used. |
powerPin | The pin on the mcu controlling power to the Y504. Use -1 if it is continuously powered. |
powerPin2 | The pin on the mcu controlling power to the RS485 adapter, if it is different from that used to power the sensor. Use -1 or omit if not applicable. |
enablePin | The pin on the mcu controlling the direction enable on the RS485 adapter, if necessary; use -1 or omit if not applicable. |
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 Yosemitech Y504 Dissolved Oxygen is used in the menu a la carte example.
Classes
- class YosemitechY504
- The Sensor sub-class for the Yosemitech Y502-A or Y504-A optical dissolved oxygen sensors.
- class YosemitechY504_DOpct
- The Variable sub-class used for the dissolved oxygen percent saturation output from a Yosemitech Y502-A or Y504-A optical dissolved oxygen sensor.
- class YosemitechY504_Temp
- The Variable sub-class used for the temperature output from a Yosemitech Y504 optical dissolved oxygen sensor.
- class YosemitechY504_DOmgL
- The Variable sub-class used for the dissolved oxygen concentration output from a Yosemitech Y502-A or Y504-A optical dissolved oxygen sensor.
Sensor Variable Counts
The number of variables that can be returned by a Yosemitech Y504
- #define Y504_NUM_VARIABLES = 3
- Sensor::
_numReturnedValues; the Y504 can report 3 values. - #define Y504_INC_CALC_VARIABLES = 1
- Sensor::
_incCalcValues; we calculated DO concentration from the percent saturation and the temperature.
Sensor Timing
The sensor timing for a Yosemitech Y504
- #define Y504_WARM_UP_TIME_MS = 375
- Sensor::
_warmUpTime_ms; time before sensor responds after power - 375ms. - #define Y504_STABILIZATION_TIME_MS = 8000
- Sensor::
_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - 8sec (8000ms). - #define Y504_MEASUREMENT_TIME_MS = 1700
- Sensor::
_measurementTime_ms; the Y504 takes ~1700ms to complete a measurement.
Dissolved Oxygen Percent Saturation
The dissolved oxygen percent saturation variable from a Yosemitech Y504
- Range is 0-20mg/L or 0-200% Saturation
- Accuracy is ± 1 %
YosemitechY504_ DOpct:: YosemitechY504_DOpct(YosemitechY504* parentSense,
const char* uuid = "",
const char* varCode = "Y504DOpct") explicit
Construct a new YosemitechY504_
Parameters | |
---|---|
parentSense | The parent YosemitechY504 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 "Y504DOpct". |
- #define Y504_DOPCT_RESOLUTION = 1
- Decimals places in string representation; dissolved oxygen percent should have 1 - resolution is 0.1%.
- #define Y504_DOPCT_VAR_NUM = 0
- Sensor variable number; dissolved oxygen percent is stored in sensorValues[0].
- #define Y504_DOPCT_VAR_NAME = "oxygenDissolvedPercentOfSaturation"
- Variable name in ODM2 controlled vocabulary; "oxygenDissolvedPercentOfSaturation".
- #define Y504_DOPCT_UNIT_NAME = "percent"
- Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
- #define Y504_DOPCT_DEFAULT_CODE = "Y504DOpct"
- Default variable short code; "Y504DOmgL".
Temperature
The temperature variable from a Yosemitech Y504
- Range is 0°C to + 50°C
- Accuracy is ± 0.2°C
YosemitechY504_ Temp:: YosemitechY504_Temp(YosemitechY504* parentSense,
const char* uuid = "",
const char* varCode = "Y504Temp") explicit
Construct a new YosemitechY504_
Parameters | |
---|---|
parentSense | The parent YosemitechY504 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 "Y504Temp". |
- #define Y504_TEMP_RESOLUTION = 1
- Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
- #define Y504_TEMP_VAR_NUM = 1
- Sensor variable number; temperature is stored in sensorValues[1].
- #define Y504_TEMP_VAR_NAME = "temperature"
- Variable name in ODM2 controlled vocabulary; "temperature".
- #define Y504_TEMP_UNIT_NAME = "degreeCelsius"
- Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
- #define Y504_TEMP_DEFAULT_CODE = "Y504Temp"
- Default variable short code; "Y504Temp".
Dissolved Oxygen Concentration
The dissolved oxygen concentration variable from a Yosemitech Y504
- Range is 0-20mg/L or 0-200% Saturation
- Accuracy is ± 1 %
YosemitechY504_ DOmgL:: YosemitechY504_DOmgL(YosemitechY504* parentSense,
const char* uuid = "",
const char* varCode = "Y504DOmgL") explicit
Construct a new YosemitechY504_
Parameters | |
---|---|
parentSense | The parent YosemitechY504 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 "Y504DOmgL". |
- #define Y504_DOMGL_RESOLUTION = 2
- Decimals places in string representation; dissolved oxygen concentration should have 2 - resolution is 0.01 mg/L.
- #define Y504_DOMGL_VAR_NUM = 2
- Sensor variable number; dissolved oxygen concentration is stored in sensorValues[2].
- #define Y504_DOMGL_VAR_NAME = "oxygenDissolved"
- Variable name in ODM2 controlled vocabulary; "oxygenDissolved".
- #define Y504_DOMGL_UNIT_NAME = "milligramPerLiter"
- Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
- #define Y504_DOMGL_DEFAULT_CODE = "Y504DOmgL"
- Default variable short code; "Y504DOmgL".
Define documentation
#define Y504_NUM_VARIABLES = 3
#include <src/sensors/YosemitechY504.h>
Sensor::
#define Y504_INC_CALC_VARIABLES = 1
#include <src/sensors/YosemitechY504.h>
Sensor::
#define Y504_WARM_UP_TIME_MS = 375
#include <src/sensors/YosemitechY504.h>
Sensor::
#define Y504_STABILIZATION_TIME_MS = 8000
#include <src/sensors/YosemitechY504.h>
Sensor::
#define Y504_MEASUREMENT_TIME_MS = 1700
#include <src/sensors/YosemitechY504.h>
Sensor::
#define Y504_DOPCT_RESOLUTION = 1
#include <src/sensors/YosemitechY504.h>
Decimals places in string representation; dissolved oxygen percent should have 1 - resolution is 0.1%.
#define Y504_DOPCT_VAR_NUM = 0
#include <src/sensors/YosemitechY504.h>
Sensor variable number; dissolved oxygen percent is stored in sensorValues[0].
#define Y504_DOPCT_VAR_NAME = "oxygenDissolvedPercentOfSaturation"
#include <src/sensors/YosemitechY504.h>
Variable name in ODM2 controlled vocabulary; "oxygenDissolvedPercentOfSaturation".
#define Y504_DOPCT_UNIT_NAME = "percent"
#include <src/sensors/YosemitechY504.h>
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define Y504_DOPCT_DEFAULT_CODE = "Y504DOpct"
#include <src/sensors/YosemitechY504.h>
Default variable short code; "Y504DOmgL".
#define Y504_TEMP_RESOLUTION = 1
#include <src/sensors/YosemitechY504.h>
Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
#define Y504_TEMP_VAR_NUM = 1
#include <src/sensors/YosemitechY504.h>
Sensor variable number; temperature is stored in sensorValues[1].
#define Y504_TEMP_VAR_NAME = "temperature"
#include <src/sensors/YosemitechY504.h>
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y504_TEMP_UNIT_NAME = "degreeCelsius"
#include <src/sensors/YosemitechY504.h>
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y504_TEMP_DEFAULT_CODE = "Y504Temp"
#include <src/sensors/YosemitechY504.h>
Default variable short code; "Y504Temp".
#define Y504_DOMGL_RESOLUTION = 2
#include <src/sensors/YosemitechY504.h>
Decimals places in string representation; dissolved oxygen concentration should have 2 - resolution is 0.01 mg/L.
#define Y504_DOMGL_VAR_NUM = 2
#include <src/sensors/YosemitechY504.h>
Sensor variable number; dissolved oxygen concentration is stored in sensorValues[2].
#define Y504_DOMGL_VAR_NAME = "oxygenDissolved"
#include <src/sensors/YosemitechY504.h>
Variable name in ODM2 controlled vocabulary; "oxygenDissolved".
#define Y504_DOMGL_UNIT_NAME = "milligramPerLiter"
#include <src/sensors/YosemitechY504.h>
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define Y504_DOMGL_DEFAULT_CODE = "Y504DOmgL"
#include <src/sensors/YosemitechY504.h>
Default variable short code; "Y504DOmgL".