ModularSensors > Modules > Supported Sensors > Yosemitech Sensors > Yosemitech Y550 UV245/COD Sensor

Yosemitech Y550 UV245/COD Sensor module

Classes for the Yosemitech Y550 UV245/COD sensor with wiper.

Sensor Datasheet

Sensor Constructor

YosemitechY550(byte modbusAddress, Stream* stream, int8_t powerPin, int8_t powerPin2 = -1, int8_t enablePin = -1, uint8_t measurementsToAverage = 1)

Construct a new Yosemitech Y550 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 Y550. 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 Y550 UV245/COD sensor is used in the menu a la carte example.

#include <sensors/YosemitechY550.h>

// NOTE: Extra hardware and software serial ports are created in the "Settings
// for Additional Serial Ports" section

byte         y550ModbusAddress = 0x50;  // The modbus address of the Y550
const int8_t y550AdapterPower  = sensorPowerPin;  // RS485 adapter power pin
                                                  // (-1 if unconnected)
const int8_t  y550SensorPower = A3;               // Sensor power pin
const int8_t  y550EnablePin   = -1;  // Adapter RE/DE pin (-1 if not applicable)
const uint8_t y550NumberReadings = 5;
// The manufacturer recommends averaging 10 readings, but we take 5 to minimize
// power consumption

// Create a Y550 chemical oxygen demand sensor object
YosemitechY550 y550(y550ModbusAddress, modbusSerial, y550AdapterPower,
                    y550SensorPower, y550EnablePin, y550NumberReadings);

// Create COD, turbidity, and temperature variable pointers for the Y550
Variable* y550COD =
    new YosemitechY550_COD(&y550, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y550Turbid =
    new YosemitechY550_Turbidity(&y550, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y550Temp =
    new YosemitechY550_Temp(&y550, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class YosemitechY550
The Sensor sub-class for the Yosemitech Y550-B UV254/COD sensor with wiper.
class YosemitechY550_COD
The Variable sub-class used for the carbon oxygen demand (COD) output from a Yosemitech Y550-B UV254/COD sensor with wiper.
class YosemitechY550_Temp
The Variable sub-class used for the temperature output from a Yosemitech Y550-B UV254/COD sensor with wiper.
class YosemitechY550_Turbidity
The Variable sub-class used for the turbidity output from a Yosemitech Y550-B UV254/COD sensor with wiper.

Defines

#define Y550_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the Y550 can report 2 values.

Sensor Timing

The sensor timing for a Yosemitch Y550

#define Y550_WARM_UP_TIME_MS = 1500
Sensor::_warmUpTime_ms; time before sensor responds after power - 1500ms.
#define Y550_STABILIZATION_TIME_MS = 2000
Sensor::_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - 2sec.
#define Y550_MEASUREMENT_TIME_MS = 2000
Sensor::_measurementTime_ms; the Y550 takes ~2000ms to complete a measurement.

Carbon Oxygen Demand

The COD variable from a Yosemitch Y550

  • 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

YosemitechY550_COD(YosemitechY550* parentSense, const char* uuid = "", const char* varCode = Y550_COD_DEFAULT_CODE) explicit

Construct a new YosemitechY550_COD object.

Parameters
parentSense The parent YosemitechY550 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 "Y550COD".

#define Y550_COD_RESOLUTION = 2
Decimals places in string representation; cod should have 2 - resolution is 0.01 mg/L COD.
#define Y550_COD_VAR_NUM = 0
Sensor variable number; COD is stored in sensorValues[0].
#define Y550_COD_VAR_NAME = "COD"
Variable name in ODM2 controlled vocabulary; "COD".
#define Y550_COD_UNIT_NAME = "milligramPerLiter"
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define Y550_COD_DEFAULT_CODE = "Y550COD"
Default variable short code; "Y550COD".

Temperature

The temperature variable from a Yosemitch Y550

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

YosemitechY550_Temp(YosemitechY550* parentSense, const char* uuid = "", const char* varCode = Y550_TEMP_DEFAULT_CODE) explicit

Construct a new YosemitechY550_Temp object.

Parameters
parentSense The parent YosemitechY550 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 "Y550Temp".

#define Y550_TEMP_RESOLUTION = 2
Decimals places in string representation; temperature should have 2 - resolution is 0.01°C.
#define Y550_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define Y550_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y550_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y550_TEMP_DEFAULT_CODE = "Y550Temp"
Default variable short code; "Y550Temp".

Turbidity

The turbidity variable from a Yosemitch Y550

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

YosemitechY550_Turbidity(YosemitechY550* parentSense, const char* uuid = "", const char* varCode = Y550_TURB_DEFAULT_CODE) explicit

Construct a new YosemitechY550_Turbidity object.

Parameters
parentSense The parent YosemitechY550 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 "Y550Turbidity".

#define Y550_TURB_RESOLUTION = 2
Decimals places in string representation; turbidity should have 2 - resolution is 0.01 NTU.
#define Y550_TURB_VAR_NUM = 2
Sensor variable number; turbidity is stored in sensorValues[2].
#define Y550_TURB_VAR_NAME = "turbidity"
Variable name in ODM2 controlled vocabulary; "turbidity".
#define Y550_TURB_UNIT_NAME = "nephelometricTurbidityUnit"
Variable unit name in ODM2 controlled vocabulary; "nephelometricTurbidityUnit" (NTU)
#define Y550_TURB_DEFAULT_CODE = "Y550Turbidity"
Default variable short code; "Y550Turbidity".