ModularSensors > Files > src / sensors / YosemitechY511.h

YosemitechY511.h file

Contains the YosemitechY511 sensor subclass and the variable subclasses YosemitechY511_Turbidity and YosemitechY511_Temp.

These are for the Yosemitech Y511 Turbidity 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 YosemitechY511
The Sensor sub-class for the Yosemitech Y511-A optical turbidity sensor with wiper.
class YosemitechY511_Turbidity
The Variable sub-class used for the turbidity output from a Yosemitech Y511-A optical turbidity sensor with wiper.
class YosemitechY511_Temp
The Variable sub-class used for the temperature output from a Yosemitech Y511-A optical turbidity sensor with wiper.

Defines

#define Y511_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the Y511 can report 2 values.
#define Y511_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Yosemitch Y511

#define Y511_WARM_UP_TIME_MS = 8000
Sensor::_warmUpTime_ms; Y511 warms up in 8000ms.
#define Y511_STABILIZATION_TIME_MS = 40000
Sensor::_stabilizationTime_ms; Y511 is stable after 40s.
#define Y511_MEASUREMENT_TIME_MS = 4000
Sensor::_measurementTime_ms; Y511 take ~4s (4000ms) to complete a measurement.

Turbidity

The turbidity variable from a Yosemitch Y511

  • Range is 0.1 to 1000 NTU
  • Accuracy is ± 5 % or 0.3 NTU

YosemitechY511_Turbidity(YosemitechY511* parentSense, const char* uuid = "", const char* varCode = Y511_TURB_DEFAULT_CODE) explicit

Construct a new YosemitechY511_Turbidity object.

Parameters
parentSense The parent YosemitechY511 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 "Y511Turbidity".

#define Y511_TURB_RESOLUTION = 2
Decimals places in string representation; turbidity should have 2 - resolution is 0.01 NTU.
#define Y511_TURB_VAR_NUM = 0
Sensor variable number; turbidity is stored in sensorValues[0].
#define Y511_TURB_VAR_NAME = "turbidity"
Variable name in ODM2 controlled vocabulary; "turbidity".
#define Y511_TURB_UNIT_NAME = "nephelometricTurbidityUnit"
Variable unit name in ODM2 controlled vocabulary; "nephelometricTurbidityUnit" (NTU)
#define Y511_TURB_DEFAULT_CODE = "Y511Turbidity"
Default variable short code; "Y511Turbidity".

Temperature

The temperature variable from a Yosemitch Y511

  • Range is 0°C to + 50°C
  • Accuracy is ± 0.2°C

YosemitechY511_Temp(YosemitechY511* parentSense, const char* uuid = "", const char* varCode = Y511_TEMP_DEFAULT_CODE) explicit

Construct a new YosemitechY511_Temp object.

Parameters
parentSense The parent YosemitechY511 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 "Y511Temp".

#define Y511_TEMP_RESOLUTION = 1
Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
#define Y511_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define Y511_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y511_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y511_TEMP_DEFAULT_CODE = "Y511Temp"
Default variable short code; "Y511Temp".