Campbell RainVUE10 topic

Classes for the Campbell RainVUE10 precipitation sensor.

Introduction

The RainVUETM10 is an SDI-12 tipping bucket rain gage in the RainVUE™ family of products. Advanced algorithms and digital processing within the sensor compensate for errors caused by high-intensity rain and provide accurate precipitation and intensity measurements.

The sensor is implemented as a sub-classes of the SDI12Sensors class. It requires a continuous 6 to 18 Vdc power supply. As backup, an internal 240 mAh lithium battery (3V Coin Cell CR2032) provides up to 15 days of continual operation after power loss. It draws < 80 µA when inactive and 1 mA while measuring.

Sensor Datasheet

The specifications and datasheet are available at https://www.campbellsci.com/rainvue10

Build flags

Sensor Constructor

CampbellRainVUE10::CampbellRainVUE10(char SDI12address, int8_t powerPin, int8_t dataPin, uint8_t measurementsToAverage = 1)

Construct a new Campbell RainVUE10 object.

Parameters
SDI12address The SDI-12 address of the RainVUE10; can be a char, char*, or int.
powerPin

The pin on the mcu controlling power to the RainVUE10 Use -1 if it is continuously powered.

  • The RainVUE10 requires a 9.6 to 18 Vdc power supply, which can be turned off between measurements
dataPin The pin on the mcu connected to the data line of the SDI-12 circuit.
measurementsToAverage The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1.

The SDI-12 address of the sensor, the Arduino pin controlling power on/off, and the Arduino pin sending and receiving data are required for the sensor constructor. Optionally, you can include a number of distinct readings to average. The data pin must be a pin that supports pin-change interrupts.



Example Code

The Campbell RainVUE10 is used in the menu a la carte example.

1#include <sensors/CampbellRainVUE10.h>
2
3// NOTE: Use -1 for any pins that don't apply or aren't being used.
4const char* RainVUESDI12address = "0"; // The SDI-12 Address of the RainVUE10
5const int8_t RainVUEPower = -1; // Power pin, for continous power
6const int8_t RainVUEData = 5; // The SDI-12 data pin, for continuous power
7// NOTE: you should NOT take more than one readings. THe sensor counts
8// cummulative tips and rain accumulation since the last measurement.
9
10// Create a Campbell RainVUE10 sensor object
11CampbellRainVUE10 rainvue(*RainVUESDI12address, RainVUEPower, RainVUEData);
12
13// Create turbidity, temperature, and error variable pointers for the RainVUE10
14Variable* rainvuePrecipitation = new CampbellRainVUE10_Precipitation(
15 &rainvue, "12345678-abcd-1234-ef00-1234567890ab");
16Variable* rainvueTips = new CampbellRainVUE10_Tips(
17 &rainvue, "12345678-abcd-1234-ef00-1234567890ab");
18Variable* rainvueRainRateAve = new CampbellRainVUE10_RainRateAve(
19 &rainvue, "12345678-abcd-1234-ef00-1234567890ab");
20Variable* rainvueRainRateMax = new CampbellRainVUE10_RainRateMax(
21 &rainvue, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class CampbellRainVUE10
The Sensor sub-class for the Campbell RainVUE10 precipitation sensor.
class CampbellRainVUE10_Precipitation
The Variable sub-class used for the precipitation output from a Campbell RainVUE10 precipitation sensor.
class CampbellRainVUE10_Tips
The Variable sub-class used for the tip count output from a Campbell RainVUE10 precipitation sensor.
class CampbellRainVUE10_RainRateAve
The Variable sub-class used for the average rainfall rate output from a Campbell RainVUE10 precipitation sensor.
class CampbellRainVUE10_RainRateMax
The Variable sub-class used for the maximum rainfall rate output from a Campbell RainVUE10 precipitation sensor.

Sensor Variable Counts

The number of variables that can be returned by RainVUE10

#define RAINVUE10_NUM_VARIABLES = 5
Sensor::_numReturnedValues; the RainVUE10 can report 5 values (although we only keep 4).
#define RAINVUE10_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; The RainVUE calculates averages and other stats on board, but we don't calculate any additional values.

Sensor Timing

The sensor timing for a Campbell RainVUE10

  • Readings transferred from the tipping bucket to the logger are from past tips, so there is no need to wait for stability or measuring.
#define RAINVUE10_WARM_UP_TIME_MS = 100
Sensor::_warmUpTime_ms; the RainVUE10 warms up in >100ms.
#define RAINVUE10_STABILIZATION_TIME_MS = 0
Sensor::_stabilizationTime_ms; the RainVUE10 is stable as soon as it warms up (0ms stabilization).
#define RAINVUE10_MEASUREMENT_TIME_MS = 100
Sensor::_measurementTime_ms; the RainVUE10 takes >100ms to complete a measurement.
#define RAINVUE10_EXTRA_WAKE_TIME_MS = 0
Extra wake time required for an SDI-12 sensor between the "break" and the time the command is sent. The RainVUE requires no extra time.

Precipitation Accumulated Depth

The intensity-corrected accumulation variable from a Campbell RainVUE10 For the "-IN" Option (English units)

  • Range is 0 to 1000 mm/h (0 to 40 in./h).
  • Resolution is 0.254 mm (0.01 in.)
  • Accuracy is ±1% at 0 to 500 mm/h intensity (0 to 19.7 in./h intensity) For the "-MM" Option (Metric units)
  • Range is 0 to 500 mm/h (0 to 19.7 in./h)
  • Resolution is 0.1 mm (0.004 in.)
  • Accuracy is ±3% at 0 to 300 mm/h intensity (0 to 11.8 in./h intensity) ±5% at 300 to 500 mm/h intensity (11.8 to 19.7 in./h intensity)

CampbellRainVUE10_Precipitation::CampbellRainVUE10_Precipitation(CampbellRainVUE10* parentSense, const char* uuid = "", const char* varCode = "RainVUEPrecipitation") explicit

Construct a new CampbellRainVUE10_Precipitation object.

Parameters
parentSense The parent CampbellRainVUE10 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 "RainVUEPrecipitation".

#define RAINVUE10_PRECIPITATION_RESOLUTION = 2
Decimals places in string representation; depth should have 2 (resolution is 0.01 inches).
#define RAINVUE10_PRECIPITATION_VAR_NUM = 0
Sensor variable number; precipitation is stored in sensorValues[0].
#define RAINVUE10_PRECIPITATION_VAR_NAME = "precipitation"
Variable name in ODM2 controlled vocabulary; "precipitation".
#define RAINVUE10_PRECIPITATION_UNIT_NAME = "inch"
Variable unit name in ODM2 controlled vocabulary; "inch" (in_i)
#define RAINVUE10_PRECIPITATION_DEFAULT_CODE = "RainVUEPrecipitation"
Default variable short code; "RainVUEPrecipitation".

Tip Count

Defines for tip count variable from a tipping bucket counter

  • Range and accuracy depend on the tipping bucket used.

CampbellRainVUE10_Tips::CampbellRainVUE10_Tips(CampbellRainVUE10* parentSense, const char* uuid = "", const char* varCode = "RainVUETips") explicit

Construct a new CampbellRainVUE10_Tips object.

Parameters
parentSense The parent CampbellRainVUE10 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 "RainVUETips".

#define RAINVUE10_TIPS_RESOLUTION = 0
Decimals places in string representation; the number of tips should have 0 - resolution is 1 tip.
#define RAINVUE10_TIPS_VAR_NUM = 1
Sensor variable number; tips is stored in sensorValues[1].
#define RAINVUE10_TIPS_VAR_NAME = "precipitation"
Variable name in ODM2 controlled vocabulary; "precipitation".
#define RAINVUE10_TIPS_UNIT_NAME = "event"
Variable unit name in ODM2 controlled vocabulary; "event".
#define RAINVUE10_TIPS_DEFAULT_CODE = "RainVUETips"
Default variable short code; "RainVUETips".

Rainfall Rate Average

The average rainfall rate variable from a Campbell RainVUE10, defined as average precipitation intensity since last measurement. For the "-IN" Option (English units)

  • Range is 0.01 to 1000 mm/h (0.0004 to 39.4 in./h)
  • Resolution is 0.254 mm (0.01 in.)
  • Accuracy is ±1% For the "-MM" Option (Metric units)
  • Range is 0.01 to 500 mm/h (0.0004 to 19.7 in./h)
  • Resolution is 0.1 mm (0.004 in.)
  • Accuracy is ±3.5% at 0 to 300 mm/h (0 to 11.8 in./h) ±5% at 300 to 500 mm/h (11.8 to 19.7 in./h)

CampbellRainVUE10_RainRateAve::CampbellRainVUE10_RainRateAve(CampbellRainVUE10* parentSense, const char* uuid = "", const char* varCode = "RainVUERateAve") explicit

Construct a new CampbellRainVUE10_RainRateAve object.

Parameters
parentSense The parent CampbellRainVUE10 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 "RainVUEError".

#define RAINVUE10_RAINRATEAVE_RESOLUTION = 2
Decimals places in string representation; the rainfall intensity has 2.
#define RAINVUE10_RAINRATEAVE_VAR_NUM = 3
Sensor variable number; average intensity is stored in sensorValues[3].
#define RAINVUE10_RAINRATEAVE_VAR_NAME = "rainfallRate"
Variable name in ODM2 controlled vocabulary; "instrumentStatusCode".
#define RAINVUE10_RAINRATEAVE_UNIT_NAME = "inchPerHour"
Variable unit name in ODM2 controlled vocabulary; "inchPerHour".
#define RAINVUE10_RAINRATEAVE_DEFAULT_CODE = "RainVUERateAve"
Default variable short code; "RainVUERateAve".

Rainfall Rate Maximum

The maximum rainfall rate variable from a Campbell RainVUE10, defined as maximum precipitation intensity since last measurement.

  • Range & Accuracy same as for sensor_rainvue_rainratemax

    CampbellRainVUE10_RainRateMax::CampbellRainVUE10_RainRateMax(CampbellRainVUE10* parentSense, const char* uuid = "", const char* varCode = "RainVUERateMax") explicit

    Construct a new CampbellRainVUE10_RainRateMax object.

    Parameters
    parentSense The parent CampbellRainVUE10 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 "RainVUERateAve".

#define RAINVUE10_RAINRATEMAX_RESOLUTION = 2
Decimals places in string representation; the rainfall intensity has 2.
#define RAINVUE10_RAINRATEMAX_VAR_NUM = 4
Sensor variable number; average intensity is stored in sensorValues[4].
#define RAINVUE10_RAINRATEMAX_VAR_NAME = "rainfallRate"
Variable name in ODM2 controlled vocabulary; "instrumentStatusCode".
#define RAINVUE10_RAINRATEMAX_UNIT_NAME = "inchPerHour"
Variable unit name in ODM2 controlled vocabulary; "inchPerHour".
#define RAINVUE10_RAINRATEMAX_DEFAULT_CODE = "RainVUERateMax"
Default variable short code; "RainVUERateAve".

Define documentation

#define RAINVUE10_NUM_VARIABLES = 5

Sensor::_numReturnedValues; the RainVUE10 can report 5 values (although we only keep 4).


#define RAINVUE10_INC_CALC_VARIABLES = 0

Sensor::_incCalcValues; The RainVUE calculates averages and other stats on board, but we don't calculate any additional values.


#define RAINVUE10_WARM_UP_TIME_MS = 100

Sensor::_warmUpTime_ms; the RainVUE10 warms up in >100ms.


#define RAINVUE10_STABILIZATION_TIME_MS = 0

Sensor::_stabilizationTime_ms; the RainVUE10 is stable as soon as it warms up (0ms stabilization).


#define RAINVUE10_MEASUREMENT_TIME_MS = 100

Sensor::_measurementTime_ms; the RainVUE10 takes >100ms to complete a measurement.


#define RAINVUE10_EXTRA_WAKE_TIME_MS = 0

Extra wake time required for an SDI-12 sensor between the "break" and the time the command is sent. The RainVUE requires no extra time.


#define RAINVUE10_PRECIPITATION_RESOLUTION = 2

Decimals places in string representation; depth should have 2 (resolution is 0.01 inches).


#define RAINVUE10_PRECIPITATION_VAR_NUM = 0

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


#define RAINVUE10_PRECIPITATION_VAR_NAME = "precipitation"

Variable name in ODM2 controlled vocabulary; "precipitation".


#define RAINVUE10_PRECIPITATION_DEFAULT_CODE = "RainVUEPrecipitation"

Default variable short code; "RainVUEPrecipitation".


#define RAINVUE10_TIPS_RESOLUTION = 0

Decimals places in string representation; the number of tips should have 0 - resolution is 1 tip.


#define RAINVUE10_TIPS_VAR_NUM = 1

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


#define RAINVUE10_TIPS_VAR_NAME = "precipitation"

Variable name in ODM2 controlled vocabulary; "precipitation".


#define RAINVUE10_TIPS_DEFAULT_CODE = "RainVUETips"

Default variable short code; "RainVUETips".


#define RAINVUE10_RAINRATEAVE_RESOLUTION = 2

Decimals places in string representation; the rainfall intensity has 2.


#define RAINVUE10_RAINRATEAVE_VAR_NUM = 3

Sensor variable number; average intensity is stored in sensorValues[3].


#define RAINVUE10_RAINRATEAVE_VAR_NAME = "rainfallRate"

Variable name in ODM2 controlled vocabulary; "instrumentStatusCode".


#define RAINVUE10_RAINRATEAVE_UNIT_NAME = "inchPerHour"

Variable unit name in ODM2 controlled vocabulary; "inchPerHour".


#define RAINVUE10_RAINRATEAVE_DEFAULT_CODE = "RainVUERateAve"

Default variable short code; "RainVUERateAve".


#define RAINVUE10_RAINRATEMAX_RESOLUTION = 2

Decimals places in string representation; the rainfall intensity has 2.


#define RAINVUE10_RAINRATEMAX_VAR_NUM = 4

Sensor variable number; average intensity is stored in sensorValues[4].


#define RAINVUE10_RAINRATEMAX_VAR_NAME = "rainfallRate"

Variable name in ODM2 controlled vocabulary; "instrumentStatusCode".


#define RAINVUE10_RAINRATEMAX_UNIT_NAME = "inchPerHour"

Variable unit name in ODM2 controlled vocabulary; "inchPerHour".


#define RAINVUE10_RAINRATEMAX_DEFAULT_CODE = "RainVUERateMax"

Default variable short code; "RainVUERateAve".