Yosemitech Y520 Conductivity Sensor topic
- Sensor Datasheet
- Sensor Constructor
- Example Code
- Reference
- Detailed Descriptions
Classes for the Yosemitech Y520 4-pole conductivity sensor.
Sensor Datasheet
Sensor Constructor
Construct a new Yosemitech Y520 object.
YosemitechY520::
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 Y520. 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 Y520 conductivity sensor is used in the menu a la carte example.
Classes
- class YosemitechY520
- The Sensor sub-class for the Yosemitech Y520-A 4-electrode conductivity sensor.
- class YosemitechY520_Cond
- The Variable sub-class used for the conductivity output from a Yosemitech Y520-A 4-electrode conductivity sensor.
- class YosemitechY520_Temp
- The Variable sub-class used for the temperature output from a Yosemitech Y520-A 4-electrode conductivity sensor.
Sensor Variable Counts
The number of variables that can be returned by a Yosemitch Y520
- #define Y520_NUM_VARIABLES = 2
- Sensor::
_numReturnedValues; the Y520 can report 2 values. - #define Y520_INC_CALC_VARIABLES = 0
- Sensor::
_incCalcValues; we don't calculate any additional values.
Sensor Timing
The sensor timing for a Yosemitch Y520
- #define Y520_WARM_UP_TIME_MS = 1600
- Sensor::
_warmUpTime_ms; time before sensor responds after power - 1600 ms. - #define Y520_STABILIZATION_TIME_MS = 10000
- Sensor::
_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - 10sec (10,000ms). - #define Y520_MEASUREMENT_TIME_MS = 2700
- Sensor::
_measurementTime_ms; the Y520 takes ~2700ms to complete a measurement.
Conductivity
The conductivity variable from a Yosemitch Y520
- Range is 1 µS/cm to 200 mS/cm
- Accuracy is ± 1 % Full Scale
Construct a new YosemitechY520_
YosemitechY520_
Parameters
parentSense
The parent YosemitechY520 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 "Y520Cond".
- #define Y520_COND_RESOLUTION = 1
- Decimals places in string representation; conductivity should have 1.
- #define Y520_COND_VAR_NUM = 0
- Sensor variable number; conductivity is stored in sensorValues[0].
- #define Y520_COND_VAR_NAME = "specificConductance"
- Variable name in ODM2 controlled vocabulary; "specificConductance".
- #define Y520_COND_UNIT_NAME = "microsiemenPerCentimeter"
- Variable unit name in ODM2 controlled vocabulary; "microsiemenPerCentimeter" (µS/cm)
- #define Y520_COND_DEFAULT_CODE = "Y520Cond"
- Default variable short code; "Y520Cond".
Temperature
The temperature variable from a Yosemitch Y520
- Range is 0°C to + 50°C
- Accuracy is ± 0.2°C
Construct a new YosemitechY520_
YosemitechY520_
Parameters
parentSense
The parent YosemitechY520 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 "Y520Temp".
- #define Y520_TEMP_RESOLUTION = 1
- Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
- #define Y520_TEMP_VAR_NUM = 1
- Sensor variable number; temperature is stored in sensorValues[1].
- #define Y520_TEMP_VAR_NAME = "temperature"
- Variable name in ODM2 controlled vocabulary; "temperature".
- #define Y520_TEMP_UNIT_NAME = "degreeCelsius"
- Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
- #define Y520_TEMP_DEFAULT_CODE = "Y520Temp"
- Default variable short code; "Y520Temp".
Define documentation
#define Y520_NUM_VARIABLES = 2
#include <src/sensors/YosemitechY520.h>
Sensor::
#define Y520_INC_CALC_VARIABLES = 0
#include <src/sensors/YosemitechY520.h>
Sensor::
#define Y520_WARM_UP_TIME_MS = 1600
#include <src/sensors/YosemitechY520.h>
Sensor::
#define Y520_STABILIZATION_TIME_MS = 10000
#include <src/sensors/YosemitechY520.h>
Sensor::
#define Y520_MEASUREMENT_TIME_MS = 2700
#include <src/sensors/YosemitechY520.h>
Sensor::
#define Y520_COND_RESOLUTION = 1
#include <src/sensors/YosemitechY520.h>
Decimals places in string representation; conductivity should have 1.
- resolution is 0.1 µS/cm.
#define Y520_COND_VAR_NUM = 0
#include <src/sensors/YosemitechY520.h>
Sensor variable number; conductivity is stored in sensorValues[0].
#define Y520_COND_VAR_NAME = "specificConductance"
#include <src/sensors/YosemitechY520.h>
Variable name in ODM2 controlled vocabulary; "specificConductance".
#define Y520_COND_UNIT_NAME = "microsiemenPerCentimeter"
#include <src/sensors/YosemitechY520.h>
Variable unit name in ODM2 controlled vocabulary; "microsiemenPerCentimeter" (µS/cm)
#define Y520_COND_DEFAULT_CODE = "Y520Cond"
#include <src/sensors/YosemitechY520.h>
Default variable short code; "Y520Cond".
#define Y520_TEMP_RESOLUTION = 1
#include <src/sensors/YosemitechY520.h>
Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
#define Y520_TEMP_VAR_NUM = 1
#include <src/sensors/YosemitechY520.h>
Sensor variable number; temperature is stored in sensorValues[1].
#define Y520_TEMP_VAR_NAME = "temperature"
#include <src/sensors/YosemitechY520.h>
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y520_TEMP_UNIT_NAME = "degreeCelsius"
#include <src/sensors/YosemitechY520.h>
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y520_TEMP_DEFAULT_CODE = "Y520Temp"
#include <src/sensors/YosemitechY520.h>
Default variable short code; "Y520Temp".