Yosemitech Y700 Pressure Sensor topic

Classes for the Yosemitech Y700 pressure sensor.

Sensor Datasheet

Sensor Constructor

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

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

1#include <sensors/YosemitechY700.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 y700ModbusAddress = 0x70; // The modbus address of the Y700
8const int8_t y700AdapterPower = sensorPowerPin; // RS485 adapter power pin
9const int8_t y700SensorPower = A3; // Sensor power pin
10const int8_t y700EnablePin = -1; // Adapter RE/DE pin
11const uint8_t y700NumberReadings = 5;
12// The manufacturer recommends averaging 10 readings, but we take 5 to minimize
13// power consumption
14
15// Create a Y700 pressure sensor object
16YosemitechY700 y700(y700ModbusAddress, modbusSerial, y700AdapterPower,
17 y700SensorPower, y700EnablePin, y700NumberReadings);
18
19// Create pressure and temperature variable pointers for the Y700
20Variable* y700Pres =
21 new YosemitechY700_Pressure(&y700, "12345678-abcd-1234-ef00-1234567890ab");
22Variable* y700Temp =
23 new YosemitechY700_Temp(&y700, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class YosemitechY700
The Sensor sub-class for the Yosemitech Y700 pressure sensor.
class YosemitechY700_Pressure
The Variable sub-class used for the pressure output from a Yosemitech Y700 pressure sensor.
class YosemitechY700_Temp
The Variable sub-class used for the temperature output from a Yosemitech Y700 pressure sensor.

Sensor Variable Counts

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

#define Y700_NUM_VARIABLES = 2
Sensor::_numReturnedValues; the Y700 can report 2 values.
#define Y700_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Sensor Timing

The sensor timing for a Yosemitch Y700

#define Y700_WARM_UP_TIME_MS = 1000
Sensor::_warmUpTime_ms; time before sensor responds after power - 1000 ms.
#define Y700_STABILIZATION_TIME_MS = 4000
Sensor::_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - Y700 takes 4 s to get stability <1 mm, but 12 s for <0.1 mm. If highest precision is required, increase to 12000.
#define Y700_MEASUREMENT_TIME_MS = 1000
Sensor::_measurementTime_ms; the Y700 takes <1 s for new values. but >1 s for values that don't seem autocorrelated.

Pressure

The Pressure variable from a Yosemitch Y700

  • Range is 0mH2O, ~2mH2O, or 100mH2O, depending on model
  • Accuracy is ± 0.1 % Full Scale

YosemitechY700_Pressure::YosemitechY700_Pressure(YosemitechY700* parentSense, const char* uuid = "", const char* varCode = "Y700Pres") explicit

Construct a new YosemitechY700_Pressure object.

Parameters
parentSense The parent YosemitechY700 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 "Y700Pres".

#define Y700_PRES_RESOLUTION = 2
Decimals places in string representation; Pressure should have 1.
#define Y700_PRES_VAR_NUM = 0
Sensor variable number; pressure is stored in sensorValues[0].
#define Y700_PRES_VAR_NAME = "pressureGauge"
Variable name in ODM2 controlled vocabulary; "pressureGauge".
#define Y700_PRES_UNIT_NAME = "millimeterOfWater"
Variable unit name in ODM2 controlled vocabulary; "millimeterOfWater" (mmH2O)
#define Y700_PRES_DEFAULT_CODE = "Y700Pres"
Default variable short code; "Y700Pres".

Temperature

The temperature variable from a Yosemitch Y700

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

YosemitechY700_Temp::YosemitechY700_Temp(YosemitechY700* parentSense, const char* uuid = "", const char* varCode = "Y700Temp") explicit

Construct a new YosemitechY700_Temp object.

Parameters
parentSense The parent YosemitechY700 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 "Y700Temp".

#define Y700_TEMP_RESOLUTION = 1
Decimals places in string representation; temperature should have 1 - resolution is 0.1°C.
#define Y700_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define Y700_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define Y700_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define Y700_TEMP_DEFAULT_CODE = "Y700Temp"
Default variable short code; "Y700Temp".

Define documentation

#define Y700_NUM_VARIABLES = 2

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


#define Y700_INC_CALC_VARIABLES = 0

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


#define Y700_WARM_UP_TIME_MS = 1000

Sensor::_warmUpTime_ms; time before sensor responds after power - 1000 ms.


#define Y700_STABILIZATION_TIME_MS = 4000

Sensor::_stabilizationTime_ms; time between "StartMeasurement" command and stable reading - Y700 takes 4 s to get stability <1 mm, but 12 s for <0.1 mm. If highest precision is required, increase to 12000.


#define Y700_MEASUREMENT_TIME_MS = 1000

Sensor::_measurementTime_ms; the Y700 takes <1 s for new values. but >1 s for values that don't seem autocorrelated.


#define Y700_PRES_RESOLUTION = 2

Decimals places in string representation; Pressure should have 1.

  • resolution is 0.01 mm.

#define Y700_PRES_VAR_NUM = 0

Sensor variable number; pressure is stored in sensorValues[0].


#define Y700_PRES_VAR_NAME = "pressureGauge"

Variable name in ODM2 controlled vocabulary; "pressureGauge".


#define Y700_PRES_UNIT_NAME = "millimeterOfWater"

Variable unit name in ODM2 controlled vocabulary; "millimeterOfWater" (mmH2O)


#define Y700_PRES_DEFAULT_CODE = "Y700Pres"

Default variable short code; "Y700Pres".


#define Y700_TEMP_RESOLUTION = 1

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


#define Y700_TEMP_VAR_NUM = 1

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


#define Y700_TEMP_VAR_NAME = "temperature"

Variable name in ODM2 controlled vocabulary; "temperature".


#define Y700_TEMP_UNIT_NAME = "degreeCelsius"

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


#define Y700_TEMP_DEFAULT_CODE = "Y700Temp"

Default variable short code; "Y700Temp".