ModularSensors > Modules > Supported Sensors > Yosemitech Sensors > Yosemitech Y4000 Multi-Parameter Sonde

Yosemitech Y4000 Multi-Parameter Sonde module

Classes for the Yosemitech Y4000 multi-parameter sonde.

Sensor Datasheet

Sensor Constructor

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

Construct a new Yosemitech Y4000 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 Y4000. 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 Y4000 Sonde is used in the menu a la carte example.

#include <sensors/YosemitechY4000.h>

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

// NOTE: Use -1 for any pins that don't apply or aren't being used.
byte          y4000ModbusAddress  = 0x05;  // The modbus address of the Y4000
const int8_t  y4000AdapterPower   = sensorPowerPin;  // RS485 adapter power pin
const int8_t  y4000SensorPower    = A3;              // Sensor power pin
const int8_t  y4000EnablePin      = -1;              // Adapter RE/DE pin
const uint8_t y4000NumberReadings = 5;
// The manufacturer recommends averaging 10 readings, but we take 5 to minimize
// power consumption

// Create a Yosemitech Y4000 multi-parameter sensor object
YosemitechY4000 y4000(y4000ModbusAddress, modbusSerial, y4000AdapterPower,
                      y4000SensorPower, y4000EnablePin, y4000NumberReadings);

// Create all of the variable pointers for the Y4000
Variable* y4000DO =
    new YosemitechY4000_DOmgL(&y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000Turb = new YosemitechY4000_Turbidity(
    &y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000Cond =
    new YosemitechY4000_Cond(&y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000pH =
    new YosemitechY4000_pH(&y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000Temp =
    new YosemitechY4000_Temp(&y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000ORP =
    new YosemitechY4000_ORP(&y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000Chloro = new YosemitechY4000_Chlorophyll(
    &y4000, "12345678-abcd-1234-ef00-1234567890ab");
Variable* y4000BGA =
    new YosemitechY4000_BGA(&y4000, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class YosemitechY4000
The Sensor sub-class for the Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_DOmgL
The Variable sub-class used for the dissolved oxygen concentration output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_Turbidity
The Variable sub-class used for the turbidity output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_Cond
The Variable sub-class used for the conductivity output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_pH
The Variable sub-class used for the pH output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_Temp
The Variable sub-class used for the temperature output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_ORP
The Variable sub-class used for the electrode electrical potential output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_Chlorophyll
The Variable sub-class used for the chlorophyll concentration output from a Yosemitech Y4000 multiparameter sonde.
class YosemitechY4000_BGA
The Variable sub-class used for the blue green algae (BGA) concentration output from a Yosemitech Y4000 multiparameter sonde.

Defines

#define Y4000_NUM_VARIABLES = 8
Sensor::_numReturnedValues; the Y4000 can report 8 values.
#define Y4000_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Yosemitch Y4000 multi-parameter sonde

#define Y4000_WARM_UP_TIME_MS = 1000
Sensor::_warmUpTime_ms; time before sensor responds after power - 1.6 seconds (1600ms).

This is the time for communication to begin.

#define Y4000_STABILIZATION_TIME_MS = 50000
Sensor::_stabilizationTime_ms; the Y4000 is stable after 60000ms.

Y4000 Modbus manual says 60s; we find Cond takes about 40s to respond.

#define Y4000_MEASUREMENT_TIME_MS = 4000
Sensor::_measurementTime_ms; the Y4000 takes ~4000ms to complete a measurement.

Dissolved Oxygen Concentration

The dissolved oxygen concentration variable from a Yosemitch Y4000 multi-parameter sonde

  • Range is 0-20mg/L or 0-200% Air Saturation
  • Accuracy is ± 0.3 mg/L

YosemitechY4000_DOmgL(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_DOMGL_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_DOmgL object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000DOmgL".

#define Y4000_DOMGL_RESOLUTION = 2
Decimals places in string representation; dissolved oxygen concentration should have 2 - resolution is 0.01 mg/L.
#define Y4000_DOMGL_VAR_NUM = 0
Sensor variable number; dissolved oxygen concentration is stored in sensorValues[0].
#define Y4000_DOMGL_VAR_NAME = "oxygenDissolved"
Variable name in ODM2 controlled vocabulary; "oxygenDissolved".
#define Y4000_DOMGL_UNIT_NAME = "milligramPerLiter"
Variable unit name in ODM2 controlled vocabulary; "milligramPerLiter" (mg/L)
#define Y4000_DOMGL_DEFAULT_CODE = "Y4000DOmgL"
Default variable short code; "Y4000DOmgL".

Turbidity

The turbidity variable from a Yosemitch Y4000 multi-parameter sonde

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

YosemitechY4000_Turbidity(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_TURB_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_Turbidity object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000Turbidity".

#define Y4000_TURB_RESOLUTION = 2
Decimals places in string representation; turbidity should have 2 - resolution is 0.01 NTU.
#define Y4000_TURB_VAR_NUM = 1
Sensor variable number; turbidity is stored in sensorValues[1].
#define Y4000_TURB_VAR_NAME = "turbidity"
Variable name in ODM2 controlled vocabulary; "turbidity".
#define Y4000_TURB_UNIT_NAME = "nephelometricTurbidityUnit"
Variable unit name in ODM2 controlled vocabulary; "nephelometricTurbidityUnit" (NTU)
#define Y4000_TURB_DEFAULT_CODE = "Y4000Turbidity"
Default variable short code; "Y4000Turbidity".

Conductivity

The conductivity variable from a Yosemitch Y4000 multi-parameter sonde

  • Range is 1 µS/cm to 200 mS/cm
  • Accuracy is ± 1 % Full Scale

YosemitechY4000_Cond(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_COND_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_Cond object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000Cond".

#define Y4000_COND_RESOLUTION = 1
Decimals places in string representation; conductivity should have 1.
  • resolution is 0.1 µS/cm.
#define Y4000_COND_VAR_NUM = 2
Sensor variable number; conductivity is stored in sensorValues[2].
#define Y4000_COND_VAR_NAME = "specificConductance"
Variable name in ODM2 controlled vocabulary; "specificConductance".
#define Y4000_COND_UNIT_NAME = "microsiemenPerCentimeter"
Variable unit name in ODM2 controlled vocabulary; "microsiemenPerCentimeter" (µS/cm)
#define Y4000_COND_DEFAULT_CODE = "Y4000Cond"
Default variable short code; "Y4000Cond".

pH

The pH variable from a Yosemitch Y4000 multi-parameter sonde

  • Range is 2 to 12 pH units
  • Accuracy is ± 0.1 pH units

YosemitechY4000_pH(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_PH_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_pH object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000pH".

#define Y4000_PH_RESOLUTION = 2
Decimals places in string representation; ph should have 2 - resolution is 0.01 pH units.
#define Y4000_PH_VAR_NUM = 3
Sensor variable number; pH is stored in sensorValues[3].
#define Y4000_PH_VAR_NAME = "pH"
Variable name in ODM2 controlled vocabulary; "pH".
#define Y4000_PH_UNIT_NAME = "pH"
Variable unit name in ODM2 controlled vocabulary; "pH" (dimensionless pH units)
#define Y4000_PH_DEFAULT_CODE = "Y4000pH"
Default variable short code; "Y4000pH".

Temperature

The temperature variable from a Yosemitch Y4000 multi-parameter sonde

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

YosemitechY4000_Temp(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_TEMP_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_Temp object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000Temp".

#define Y4000_TEMP_RESOLUTION = 1
Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
#define Y4000_TEMP_VAR_NUM = 4
Sensor variable number; temperature is stored in sensorValues[4].
#define Y4000_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y4000_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y4000_TEMP_DEFAULT_CODE = "Y4000Temp"
Default variable short code; "Y4000Temp".

ORP

The ORP variable from a Yosemitch Y4000 multi-parameter sonde

  • Range is -999 ~ 999 mV
  • Accuracy is ± 20 mV

YosemitechY4000_ORP(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_ORP_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_ORP object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000Potential".

#define Y4000_ORP_RESOLUTION = 0
Decimals places in string representation; orp should have 0 - resolution is 1 mV.
#define Y4000_ORP_VAR_NUM = 5
Sensor variable number; ORP is stored in sensorValues[5].
#define Y4000_ORP_VAR_NAME = "ORP"
Variable name in ODM2 controlled vocabulary; "ORP".
#define Y4000_ORP_UNIT_NAME = "millivolt"
Variable unit name in ODM2 controlled vocabulary; "millivolt" (mV)
#define Y4000_ORP_DEFAULT_CODE = "Y4000Potential"
Default variable short code; "Y4000Potential".

Chlorophyll Concentration

The chlorophyll concentration variable from a Yosemitch Y4000 multi-parameter sonde

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

YosemitechY4000_Chlorophyll(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_CHLORO_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_Chlorophyll object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000Chloro".

#define Y4000_CHLORO_RESOLUTION = 1
Decimals places in string representation; chlorophyll concentration should have 1 - resolution is 0.1 µg/L / 0.1 RFU.
#define Y4000_CHLORO_VAR_NUM = 6
Sensor variable number; chlorophyll concentration is stored in sensorValues[6].
#define Y4000_CHLORO_VAR_NAME = "chlorophyll_a_b_c"
Variable name in ODM2 controlled vocabulary; "chlorophyll_a_b_c".
#define Y4000_CHLORO_UNIT_NAME = "microgramPerLiter"
Variable unit name in ODM2 controlled vocabulary; "microgramPerLiter" (µg/L)
#define Y4000_CHLORO_DEFAULT_CODE = "Y4000Chloro"
Default variable short code; "Y4000Chloro".

Blue Green Algae Concentration

The BGA variable from a Yosemitch Y4000 multi-parameter sonde

  • Range is 0 to 100 µg/L or 0 to 100 RFU
  • Accuracy is ± 0.04ug/L PC

YosemitechY4000_BGA(YosemitechY4000* parentSense, const char* uuid = "", const char* varCode = Y4000_BGA_DEFAULT_CODE) explicit

Construct a new YosemitechY4000_BGA object.

Parameters
parentSense The parent YosemitechY4000 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 "Y4000BGA".

#define Y4000_BGA_RESOLUTION = 2
Decimals places in string representation; bga should have 2 - resolution is 0.01 µg/L / 0.01 RFU.
#define Y4000_BGA_VAR_NUM = 7
Sensor variable number; BGA is stored in sensorValues[7].
#define Y4000_BGA_VAR_NAME = "blueGreenAlgaeCyanobacteriaPhycocyanin"
Variable name in ODM2 controlled vocabulary; "blueGreenAlgaeCyanobacteriaPhycocyanin".
#define Y4000_BGA_UNIT_NAME = "microgramPerLiter"
Variable unit name in ODM2 controlled vocabulary; "microgramPerLiter" (µg/L)
#define Y4000_BGA_DEFAULT_CODE = "Y4000BGA"
Default variable short code; "Y4000BGA".