Yosemitech Y513 self-cleaning Blue Green Algae (BGA) sensor. topic

Classes for the Yosemitech Y513 Blue Green Algae (BGA) sensor with wiper.

Sensor Datasheet

Sensor Constructor

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

Construct a new Yosemitech Y513 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 Y513. 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 Y513 Blue Green Algae sensor is used in the menu a la carte example.

1#include <sensors/YosemitechY513.h>
2
3// NOTE: Extra hardware and software serial ports are created in the "Settings
4// for Additional Serial Ports" section
5
6// NOTE: Use -1 for any pins that don't apply or aren't being used.
7byte y513ModbusAddress = 0x13; // The modbus address of the Y513
8const int8_t y513AdapterPower = sensorPowerPin; // RS485 adapter power pin
9const int8_t y513SensorPower = A3; // Sensor power pin
10const int8_t y513EnablePin = -1; // Adapter RE/DE pin
11const uint8_t y513NumberReadings = 5;
12// The manufacturer recommends averaging 10 readings, but we take 5 to minimize
13// power consumption
14
15// Create a Y513 Blue Green Algae (BGA) sensor object
16YosemitechY513 y513(y513ModbusAddress, modbusSerial, y513AdapterPower,
17 y513SensorPower, y513EnablePin, y513NumberReadings);
18
19// Create Blue Green Algae (BGA) concentration and temperature variable
20// pointers for the Y513
21Variable* y513BGA =
22 new YosemitechY513_BGA(&y513, "12345678-abcd-1234-ef00-1234567890ab");
23Variable* y513Temp =
24 new YosemitechY513_Temp(&y513, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class YosemitechY513
The Sensor sub-class for the Yosemitech Y513 sensor.
class YosemitechY513_BGA
The Variable sub-class used for the blue green algae concentration output from a Yosemitech Y513 Blue Green Algae (BGA) sensor with wiper.
class YosemitechY513_Temp
The Variable sub-class used for the temperature output from a Yosemitech Y513-A blue green algae sensor with wiper.

Sensor Variable Counts

The number of variables that can be returned by a Yosemitch Y514

#define Y513_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the Y513 can report 2 values.
#define Y513_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Yosemitch Y513

#define Y513_WARM_UP_TIME_MS = 1300
Sensor::_warmUpTime_ms; time before sensor responds after power - 1.3 seconds (1300ms).
#define Y513_STABILIZATION_TIME_MS = 8000
Sensor::_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - 8sec (8000ms).
#define Y513_MEASUREMENT_TIME_MS = 2000
Sensor::_measurementTime_ms; the Y513 takes ~2000ms to complete a measurement.

Chlorophyll Concentration

The blue green algae concentration variable from a Yosemitch Y513

  • Range is 0 to 400 µg/L or 0 to 100 RFU
  • Accuracy is ± 1 %

YosemitechY513_BGA::YosemitechY513_BGA(YosemitechY513* parentSense, const char* uuid = "", const char* varCode = "Y513BGA") explicit

Construct a new YosemitechY513_BGA object.

Parameters
parentSense The parent YosemitechY513 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 "Y513BGA".

#define Y513_BGA_RESOLUTION = 1
Decimals places in string representation; blue green algae concentration should have 1 - resolution is 0.1 µg/L / 0.1 RFU.
#define Y513_BGA_VAR_NUM = 0
Sensor variable number; blue green algae concentration is stored in sensorValues[0].
#define Y513_BGA_VAR_NAME = "Blue-green algae (cyanobacteria), phycocyanin"
Variable name in ODM2 controlled vocabulary; "blue_GreenAlgae_Cyanobacteria_Phycocyanin".
#define Y513_BGA_UNIT_NAME = "countPerMilliliter"
Variable unit name in ODM2 controlled vocabulary; "countPerMilliliter" (cells/mL)
#define Y513_BGA_DEFAULT_CODE = "Y513BGA"
Default variable short code; "Y513BGA".

Temperature

The temperature variable from a Yosemitch Y513

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

YosemitechY513_Temp::YosemitechY513_Temp(YosemitechY513* parentSense, const char* uuid = "", const char* varCode = "Y513Temp") explicit

Construct a new YosemitechY513_Temp object.

Parameters
parentSense The parent YosemitechY513 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 "Y513Temp".

#define Y513_TEMP_RESOLUTION = 1
Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
#define Y513_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define Y513_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y513_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y513_TEMP_DEFAULT_CODE = "Y513Temp"
Default variable short code; "Y513Temp".

Define documentation

#define Y513_NUM_VARIABLES = 2

Sensor::_numReturnedValues; the Y513 can report 2 values.


#define Y513_INC_CALC_VARIABLES = 0

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


#define Y513_WARM_UP_TIME_MS = 1300

Sensor::_warmUpTime_ms; time before sensor responds after power - 1.3 seconds (1300ms).


#define Y513_STABILIZATION_TIME_MS = 8000

Sensor::_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - 8sec (8000ms).


#define Y513_MEASUREMENT_TIME_MS = 2000

Sensor::_measurementTime_ms; the Y513 takes ~2000ms to complete a measurement.


#define Y513_BGA_RESOLUTION = 1

Decimals places in string representation; blue green algae concentration should have 1 - resolution is 0.1 µg/L / 0.1 RFU.


#define Y513_BGA_VAR_NUM = 0

Sensor variable number; blue green algae concentration is stored in sensorValues[0].


#define Y513_BGA_VAR_NAME = "Blue-green algae (cyanobacteria), phycocyanin"

Variable name in ODM2 controlled vocabulary; "blue_GreenAlgae_Cyanobacteria_Phycocyanin".


#define Y513_BGA_UNIT_NAME = "countPerMilliliter"

Variable unit name in ODM2 controlled vocabulary; "countPerMilliliter" (cells/mL)


#define Y513_BGA_DEFAULT_CODE = "Y513BGA"

Default variable short code; "Y513BGA".


#define Y513_TEMP_RESOLUTION = 1

Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.


#define Y513_TEMP_VAR_NUM = 1

Sensor variable number; temperature is stored in sensorValues[1].


#define Y513_TEMP_VAR_NAME = "temperature"

Variable name in ODM2 controlled vocabulary; "temperature".


#define Y513_TEMP_UNIT_NAME = "degreeCelsius"

Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)


#define Y513_TEMP_DEFAULT_CODE = "Y513Temp"

Default variable short code; "Y513Temp".