Keller Water Level Sensors topic

The Sensor and Variable objects for all Keller water level sensors.

This library currently supports the following Keller pressure and water level sensors:

These sensors communicate via Modbus RTU over RS485 at 9600 baud. More documentation for our implementation of the Keller Modbus communication commands and responses, along with information about the various variables, can be found in the EnviroDIY KellerModbus library.

Sensors ship with default slave addresses set to 0x01, which can be set by the user.

The Keller sensors expect an input voltage of 9-28 VDC, so they also require a voltage booster and an RS485 to TTL Serial converter with logic level shifting from the higher output voltage to the 3.3V or 5V of the Arduino data logging board.

Digital communication with Keller sensors configured for SDI12 communication protocols are not supported by this library.

The sensor constructors require as input: the sensor modbus address, a stream instance for data (ie, Serial), and one or two power pins. The Arduino pin controlling the receive and data enable on your RS485-to-TTL adapter and the number of readings to average are optional. (Use -1 for the second power pin and -1 for the enable pin if these don't apply and you want to average more than one reading.) Please see the section "[Notes on Arduino Streams and Software Serial](@ref page_arduino_streams)" for more information about what streams can be used along with this library. In tests on these sensors, SoftwareSerial_ExtInts did not work to communicate with these sensors, because it isn't stable enough. AltSoftSerial and HardwareSerial work fine. Up to two power pins are provided so that the RS485 adapter, the sensor and/or an external power relay can be controlled separately. If the power to everything is controlled by the same pin, use -1 for the second power pin or omit the argument. If they are controlled by different pins and no other sensors are dependent on power from either pin then the order of the pins doesn't matter. If the RS485 adapter, sensor, or relay are controlled by different pins and any other sensors are controlled by the same pins you should put the shared pin first and the un-shared pin second. Both pins cannot be shared pins.

The lower level details of the communication with the sensors is managed by the EnviroDIY Keller library

Topics

topic Keller Acculevel
topic Keller Nanolevel

Classes

class KellerParent
The Sensor sub-class for all Keller water level sensors.

Sensor Variable Counts

The number of variables that can be returned by the RDO PRO-X

#define KELLER_NUM_VARIABLES = 3
Sensor::_numReturnedValues; the Keller level sensors can report 3 values.
#define KELLER_INC_CALC_VARIABLES = 0
Sensor::_incCalcValues; we don't calculate any additional values.

Pressure

The pressure variable from a Keller modbus sensor

#define KELLER_PRESSURE_VAR_NUM = 0
Variable number; pressure is stored in sensorValues[0].
#define KELLER_PRESSURE_VAR_NAME = "pressureGauge"
Variable name in ODM2 controlled vocabulary; "pressureGauge".
#define KELLER_PRESSURE_UNIT_NAME = "millibar"
Variable unit name in ODM2 controlled vocabulary; "millibar".

Temperature

The temperature variable from a Keller modbus sensor

#define KELLER_TEMP_VAR_NUM = 1
Variable number; temperature is stored in sensorValues[1].
#define KELLER_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define KELLER_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)

Height

The height variable from a Keller modbus sensor

#define KELLER_HEIGHT_VAR_NUM = 2
Variable number; height is stored in sensorValues[2].
#define KELLER_HEIGHT_VAR_NAME = "gaugeHeight"
Variable name in ODM2 controlled vocabulary; "gaugeHeight".
#define KELLER_HEIGHT_UNIT_NAME = "meter"
Variable unit name in ODM2 controlled vocabulary; "meter".

Define documentation

#define KELLER_NUM_VARIABLES = 3

Sensor::_numReturnedValues; the Keller level sensors can report 3 values.


#define KELLER_INC_CALC_VARIABLES = 0

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


#define KELLER_PRESSURE_VAR_NUM = 0

Variable number; pressure is stored in sensorValues[0].


#define KELLER_PRESSURE_VAR_NAME = "pressureGauge"

Variable name in ODM2 controlled vocabulary; "pressureGauge".


#define KELLER_PRESSURE_UNIT_NAME = "millibar"

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


#define KELLER_TEMP_VAR_NUM = 1

Variable number; temperature is stored in sensorValues[1].


#define KELLER_TEMP_VAR_NAME = "temperature"

Variable name in ODM2 controlled vocabulary; "temperature".


#define KELLER_TEMP_UNIT_NAME = "degreeCelsius"

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


#define KELLER_HEIGHT_VAR_NUM = 2

Variable number; height is stored in sensorValues[2].


#define KELLER_HEIGHT_VAR_NAME = "gaugeHeight"

Variable name in ODM2 controlled vocabulary; "gaugeHeight".