Keller Acculevel topic

Classes for the Keller Acculevel.

These are for Keller Series 30, Class 5, Group 20 sensors using Modbus communication, that are software version 5.20-12.28 and later (i.e. made after the 2012 in the 28th week).

Only tested on the Acculevel.

Sensor Datasheet

Sensor Constructor

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

Construct a new Keller Acculevel.

Parameters
modbusAddress The modbus address of the Acculevel.
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 Acculevel. Use -1 if it is continuously powered.

  • The Acculevel requires a 9-28 VDC power supply.
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 Keller Acculevel is used in the menu a la carte example.

1#include <sensors/KellerAcculevel.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 acculevelModbusAddress = 0x01; // The modbus address of KellerAcculevel
8const int8_t acculevelPower = A3; // Acculevel Sensor power pin
9const int8_t alAdapterPower = sensorPowerPin; // RS485 adapter power pin
10const int8_t al485EnablePin = -1; // Adapter RE/DE pin
11const uint8_t acculevelNumberReadings = 5;
12// The manufacturer recommends taking and averaging a few readings
13
14// Create a Keller Acculevel sensor object
15KellerAcculevel acculevel(acculevelModbusAddress, modbusSerial, alAdapterPower,
16 acculevelPower, al485EnablePin,
17 acculevelNumberReadings);
18
19// Create pressure, temperature, and height variable pointers for the Acculevel
20Variable* acculevPress = new KellerAcculevel_Pressure(
21 &acculevel, "12345678-abcd-1234-ef00-1234567890ab");
22Variable* acculevTemp = new KellerAcculevel_Temp(
23 &acculevel, "12345678-abcd-1234-ef00-1234567890ab");
24Variable* acculevHeight = new KellerAcculevel_Height(
25 &acculevel, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class KellerAcculevel
The Sensor sub-class for the Keller Acculevel sensor.
class KellerAcculevel_Pressure
The Variable sub-class used for the gauge pressure (vented and barometric pressure corrected) output from a Keller Acculevel.
class KellerAcculevel_Temp
The Variable sub-class used for the temperature output from a Keller Acculevel.
class KellerAcculevel_Height
The Variable sub-class used for the gauge height (water level with regard to an arbitrary gage datum) output from a Keller Acculevel.

Sensor Timing

The sensor timing for a Keller Acculevel

#define ACCULEVEL_WARM_UP_TIME_MS = 500
Sensor::_warmUpTime_ms; the Acculevel takes about 500 ms to respond.
#define ACCULEVEL_STABILIZATION_TIME_MS = 5000
Sensor::_stabilizationTime_ms; the Acculevel is stable after about 5s (5000ms).
#define ACCULEVEL_MEASUREMENT_TIME_MS = 1500
Sensor::_measurementTime_ms; the Acculevel takes 1500ms to complete a measurement.

Pressure

The pressure variable from a Keller Acculevel

  • Range is 0 to 11 bar
  • Accuracy is Standard ±0.1% FS, Optional ±0.05% FS

KellerAcculevel_Pressure::KellerAcculevel_Pressure(KellerAcculevel* parentSense, const char* uuid = "", const char* varCode = "kellerAccuPress") explicit

Construct a new KellerAcculevel_Pressure object.

Parameters
parentSense The parent KellerAcculevel 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 "kellerAccuPress".

#define ACCULEVEL_PRESSURE_RESOLUTION = 5
Decimals places in string representation; pressure should have 5 - resolution is 0.002%.
#define ACCULEVEL_PRESSURE_DEFAULT_CODE = "kellerAccuPress"
Default variable short code; "kellerAccuPress".

Temperature

The temperature variable from a Keller Acculevel

  • Range is -10°C to 60°C
  • Accuracy is not specified in the sensor datasheet

KellerAcculevel_Temp::KellerAcculevel_Temp(KellerAcculevel* parentSense, const char* uuid = "", const char* varCode = "kellerAccuTemp") explicit

Construct a new KellerAcculevel_Temp object.

Parameters
parentSense The parent KellerAcculevel 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 "kellerAccuTemp".

#define ACCULEVEL_TEMP_RESOLUTION = 2
Decimals places in string representation; temperature should have 2 - resolution is 0.01°C.
#define ACCULEVEL_TEMP_DEFAULT_CODE = "kellerAccuTemp"
Default variable short code; "kellerAccuTemp".

Height

The height variable from a Keller Acculevel

  • Range is 0 to 900 feet
  • Accuracy is Standard ±0.1% FS, Optional ±0.05% FS

KellerAcculevel_Height::KellerAcculevel_Height(KellerAcculevel* parentSense, const char* uuid = "", const char* varCode = "kellerAccuHeight") explicit

Construct a new KellerAcculevel_Height object.

Parameters
parentSense The parent KellerAcculevel 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 "kellerAccuHeight".

#define ACCULEVEL_HEIGHT_RESOLUTION = 4
Decimals places in string representation; height should have 4 - resolution is 0.002%.
#define ACCULEVEL_HEIGHT_DEFAULT_CODE = "kellerAccuHeight"
Default variable short code; "kellerAccuHeight".

Define documentation

#define ACCULEVEL_WARM_UP_TIME_MS = 500

Sensor::_warmUpTime_ms; the Acculevel takes about 500 ms to respond.


#define ACCULEVEL_STABILIZATION_TIME_MS = 5000

Sensor::_stabilizationTime_ms; the Acculevel is stable after about 5s (5000ms).


#define ACCULEVEL_MEASUREMENT_TIME_MS = 1500

Sensor::_measurementTime_ms; the Acculevel takes 1500ms to complete a measurement.


#define ACCULEVEL_PRESSURE_RESOLUTION = 5

Decimals places in string representation; pressure should have 5 - resolution is 0.002%.


#define ACCULEVEL_PRESSURE_DEFAULT_CODE = "kellerAccuPress"

Default variable short code; "kellerAccuPress".


#define ACCULEVEL_TEMP_RESOLUTION = 2

Decimals places in string representation; temperature should have 2 - resolution is 0.01°C.


#define ACCULEVEL_TEMP_DEFAULT_CODE = "kellerAccuTemp"

Default variable short code; "kellerAccuTemp".


#define ACCULEVEL_HEIGHT_RESOLUTION = 4

Decimals places in string representation; height should have 4 - resolution is 0.002%.


#define ACCULEVEL_HEIGHT_DEFAULT_CODE = "kellerAccuHeight"

Default variable short code; "kellerAccuHeight".