ModularSensors > Modules > Supported Sensors > SDI-12 Sensors > In-Situ LevelTROLL 400, 500, and 700 Data Loggers

In-Situ LevelTROLL 400, 500, and 700 Data Loggers module

Classes for the In-Situ LevelTROLL feature sensors pressure, temperature, and depth.

Introduction

A slim 1.8 cm diameter sensor, depth measuremente temperature compensated to 0.1% (0.05%) across Full Scale depth range and across temperature range.

Has an internal logger for reliable data collection.

Reports sensor serial number and model in uSD .csv file

The In-Situ Aqua/Level TROLL requires 8-36V DC input.

The In-Situ Aqua/Level TROLLs are programmed through WinSitu.

The SDI address needs to be changed to what the class is set to - default is '1'.

Parameters are very flexible and need to be aligned used WinSitu with this module.

The depth sensor third paramter may need to be created. The expected paramters and order are Pressure (PSI), Temperature (C), Depth (ft).

Tested with Level TROLL 500.

Sensor Datasheet

Documentation for the SDI-12 Protocol commands and responses The In-Situ Level/Aqua TROLL can be found at:

https://in-situ.com/en/pub/media/support/documents/SDI-12_Commands_Tech_Note.pdf

https://in-situ.com/us/support/documents/sdi-12-commands-and-level-troll-400500700-responses

Build flags

Sensor Constructor

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

Construct a new ITROLL object.

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

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

  • The ITROLL requires a 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 In-Situ TROLL is used in the menu a la carte example.

#include <sensors/InSituTrollSdi12a.h>

// NOTE: Use -1 for any pins that don't apply or aren't being used.
const char* TROLLSDI12address =
    "1";  // The SDI-12 Address of the Aqua/Level TROLL
const int8_t TROLLPower =
    sensorPowerPin;  // Pin to switch power on and off (-1 if unconnected)
const int8_t  TROLLData           = 7;  // The SDI-12 data pin
const uint8_t TROLLNumberReadings = 2;  // The number of readings to average

// Create an In-Situ TROLL sensor object
InSituTrollSdi12a insituTROLL(*TROLLSDI12address, TROLLPower, TROLLData,
                              TROLLNumberReadings);

// Create pressure, temperature, and depth variable pointers for the TROLL
Variable* trollPressure = new InSituTrollSdi12a_Pressure(
    &insituTROLL, "12345678-abcd-1234-ef00-1234567890ab");
Variable* trollTemp = new InSituTrollSdi12a_Temp(
    &insituTROLL, "12345678-abcd-1234-ef00-1234567890ab");
Variable* trollDepth = new InSituTrollSdi12a_Depth(
    &insituTROLL, "12345678-abcd-1234-ef00-1234567890ab");

Classes

class InSituTrollSdi12a
The Sensor sub-class for the Insitu Level/Aqua TROLL pressure, temperature, and depth sensor.
class InSituTrollSdi12a_Pressure
The Variable sub-class used for the pressure output from a Insitu TROLL 3-in-1 water level sensor..
class InSituTrollSdi12a_Temp
The Variable sub-class used for the temperature Output from a Insitu TROLL 3-in-1 water level sensor..
class InSituTrollSdi12a_Depth
The Variable sub-class used for the depth output from a Insitu TROLL 3-in-1 water level sensor..

Defines

#define ITROLLA_NUM_VARIABLES = 3
Sensor::_numReturnedValues; the TROLL 500 can report 3 values.

Sensor Timing

The sensor timing for a In-Situ TROLL

#define ITROLLA_WARM_UP_TIME_MS = 500
Sensor::_warmUpTime_ms; maximum warm-up time in SDI-12 mode: 500ms.
#define ITROLLA_STABILIZATION_TIME_MS = 0
Sensor::_stabilizationTime_ms; the TROLL 500 is stable as soon as it warms up (0ms stabilization).
#define ITROLLA_MEASUREMENT_TIME_MS = 500
Sensor::_measurementTime_ms; maximum measurement duration: 500ms.

Pressure

The pressue variable from a In-Situ TROLL

  • Range is 0 – x (depends on range eg 5psig)

InSituTrollSdi12a_Pressure(Sensor* parentSense, const char* uuid = "", const char* varCode = ITROLLA_PRESSURE_DEFAULT_CODE)

Construct a new InSituTrollSdi12a_Pressure object.

Parameters
parentSense The parent InSituTrollSdi12a providing 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 "ITROLLPressure".

#define ITROLLA_PRESSURE_RESOLUTION = 5
Decimals places in string representation; conductivity should have 1.

0 are reported, adding extra digit to resolution to allow the proper number of significant figures for averaging - resolution is 0.001 mS/cm = 1 µS/cm

#define ITROLLA_PRESSURE_VAR_NUM = 0
Sensor variable number; pressure is stored in sensorValues[0].
#define ITROLLA_PRESSURE_VAR_NAME = "pressureGauge"
Variable name in ODM2 controlled vocabulary; "specificConductance".
#define ITROLLA_PRESSURE_UNIT_NAME = "psi"
Variable unit name in ODM2 controlled vocabulary; "pounds per square inch" (psi)
#define ITROLLA_PRESSURE_DEFAULT_CODE = "ITROLLpressure"
Default variable short code; "ITROLLpressure".

Temperature

The temperature variable from a In-Situ TROLL

  • Range is -11°C to +49°C
  • Accuracy is ±1°C

InSituTrollSdi12a_Temp(Sensor* parentSense, const char* uuid = "", const char* varCode = ITROLLA_TEMP_DEFAULT_CODE)

Construct a new InSituTrollSdi12a_Temp object.

Parameters
parentSense The parent InSituTrollSdi12a providing the 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 "ITROLLtemp".

#define ITROLLA_TEMP_RESOLUTION = 2
Decimals places in string representation; temperature should have 2.

1 is reported, adding extra digit to resolution to allow the proper number of significant figures for averaging - resolution is 0.1°C

#define ITROLLA_TEMP_VAR_NUM = 1
Sensor variable number; temperature is stored in sensorValues[1].
#define ITROLLA_TEMP_TEMP_VAR_NAME = "temperature"
Variable name in ODM2 controlled vocabulary; "temperature".
#define ITROLLA_TEMP_TEMP_UNIT_NAME = "degreeCelsius"
Variable unit name in ODM2 controlled vocabulary; "degreeCelsius" (°C)
#define ITROLLA_TEMP_DEFAULT_CODE = "ITROLLtemp"
Default variable short code; "ITROLLtemp".

Water Depth

The water depth variable from a In-Situ TROLL

  • Range is 0 to 3.5m to 350m depending on model
  • Accuracy is ±0.05% of full scale

InSituTrollSdi12a_Depth(Sensor* parentSense, const char* uuid = "", const char* varCode = ITROLLA_DEPTH_DEFAULT_CODE)

Construct a new InSituTrollSdi12a_Depth object.

Parameters
parentSense The parent InSituTrollSdi12a providing the 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 "ITROLLdepth".

#define ITROLLA_DEPTH_RESOLUTION = 5
Decimals places in string representation; depth should have 1.

0 are reported, adding extra digit to resolution to allow the proper number of significant figures for averaging - resolution is 2 mm

#define ITROLLA_DEPTH_VAR_NUM = 2
Sensor variable number; depth is stored in sensorValues[2].
#define ITROLLA_DEPTH_VAR_NAME = "waterDepth"
Variable name in ODM2 controlled vocabulary; "waterDepth".
#define ITROLLA_DEPTH_UNIT_NAME = "feet"
Variable unit name in ODM2 controlled vocabulary; "millimeter".
#define ITROLLA_DEPTH_DEFAULT_CODE = "ITROLLdepth"
Default variable short code; "ITROLLdepth".