ModularSensors > Files > src / sensors / YosemitechY551.h

YosemitechY551.h file

Contains the YosemitechY551 sensor subclass and the variable subclasses YosemitechY551_COD, YosemitechY551_Temp, and YosemitechY551_Turbidity.

These are for the Yosemitech Y551 COD sensor with wiper.

This depends on the YosemitechParent super class.

Documentation for the Modbus Protocol commands and responses can be found within the documentation in the YosemitechModbus library at: https://github.com/EnviroDIY/YosemitechModbus

Classes

class YosemitechY551
The Sensor sub-class for the Yosemitech Y551-B UV254/COD sensor with wiper.
class YosemitechY551_COD
The Variable sub-class used for the carbon oxygen demand (COD) output from a Yosemitech Y551-B UV254/COD sensor with wiper.
class YosemitechY551_Temp
The Variable sub-class used for the temperature output from a Yosemitech Y551-B UV254/COD sensor with wiper.
class YosemitechY551_Turbidity
The Variable sub-class used for the turbidity output from a Yosemitech Y551-B UV254/COD sensor with wiper.

Defines

#define Y551_NUM_VARIABLES = 3
Sensor::_numReturnedValues; the Y551 can report 2 values.
#define Y551_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Yosemitch Y551

#define Y551_WARM_UP_TIME_MS = 1000
Sensor::_warmUpTime_ms; time before sensor responds after power - <500ms for response, but need >1000ms to load capcitors for brush & measure.
#define Y551_STABILIZATION_TIME_MS = 2000
Sensor::_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - 2sec in manual & confirmed by testing.
#define Y551_MEASUREMENT_TIME_MS = 4000
Sensor::_measurementTime_ms; the Y551 takes ~2000ms to complete a measurement according to manual, but testing shows ~1s for a new number but 4-12s to elimniate memory effects, potentially from internal averaging.

Carbon Oxygen Demand

The COD variable from a Yosemitch Y551

  • Range is:
    • 0.75 to 370 mg/L COD (equiv. KHP)
    • 0.2 to 150 mg/L TOC (equiv. KHP)
  • Accuracy is not reported on sensor datasheet

YosemitechY551_COD(YosemitechY551* parentSense, const char* uuid = "", const char* varCode = Y551_COD_DEFAULT_CODE) explicit

Construct a new YosemitechY551_COD object.

Parameters
parentSense The parent YosemitechY551 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 "Y551COD".

#define Y551_COD_RESOLUTION = 2
Decimals places in string representation; cod should have 2 - resolution is 0.01 mg/L COD.
#define Y551_COD_VAR_NUM = 0
Sensor variable number; COD is stored in sensorValues[0].
#define Y551_COD_VAR_NAME = "COD"
Variable name in ODM2 controlled vocabulary; "COD".
#define Y551_COD_UNIT_NAME = "milligramPerLiter"
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define Y551_COD_DEFAULT_CODE = "Y551COD"
Default variable short code; "Y551COD".

Temperature

The temperature variable from a Yosemitch Y551

  • Range is 5°C to + 45°C
  • Accuracy is ± 0.2°C

YosemitechY551_Temp(YosemitechY551* parentSense, const char* uuid = "", const char* varCode = Y551_TEMP_DEFAULT_CODE) explicit

Construct a new YosemitechY551_Temp object.

Parameters
parentSense The parent YosemitechY551 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 "Y551Temp".

#define Y551_TEMP_RESOLUTION = 2
Decimals places in string representation; temperature should have 2 - resolution is 0.01°C.
#define Y551_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define Y551_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y551_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y551_TEMP_DEFAULT_CODE = "Y551Temp"
Default variable short code; "Y551Temp".

Turbidity

The turbidity variable from a Yosemitch Y551

  • Range is 0.1~1000 NTU
  • Accuracy is <5% or 0.3NTU

YosemitechY551_Turbidity(YosemitechY551* parentSense, const char* uuid = "", const char* varCode = Y551_TURB_DEFAULT_CODE) explicit

Construct a new YosemitechY551_Turbidity object.

Parameters
parentSense The parent YosemitechY551 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 "Y551Turbidity".

#define Y551_TURB_RESOLUTION = 2
Decimals places in string representation; turbidity should have 2 - resolution is 0.01 NTU.
#define Y551_TURB_VAR_NUM = 2
Sensor variable number; turbidity is stored in sensorValues[2].
#define Y551_TURB_VAR_NAME = "turbidity"
Variable name in ODM2 controlled vocabulary; "turbidity".
#define Y551_TURB_UNIT_NAME = "nephelometricTurbidityUnit"
Variable unit name in ODM2 controlled vocabulary; "nephelometricTurbidityUnit" (NTU)
#define Y551_TURB_DEFAULT_CODE = "Y551Turbidity"
Default variable short code; "Y551Turbidity".