Eagle: SDI-12 configuration and compatibility

The SDI-12 interface is a low data rate protocol designed for agricultural and scientific sensors (SDI-12 Website).

A soil moisture probe will often have multiple sensors along its length. Each sensor can have an address between 0 and 9 (inclusive), and allows for up to 10 different 'measurements'. Each of these measurements can actually return a number of different values. For example, a soil moisture probe may have a soil moisture and soil temperature measurements, and each of these will return a number of values, each being taken at a certain point along the probe.


What SDI-12 probes are compatible?

The SDI-12 specification is a generic specification. Any probe that follows the spec will in theory work with the Eagle. What this means in practice is that most probes work - but occasionally, some will send data slightly differently (i.e. not 100% in accordance with the specification) - or there can be issues with timing. This can lead to the probe incorrectly functioning.  These issues are hard to predict ahead of time without simply testing the probe with the device. In general though the majority of SDI-12 probes are compatible.


What SDI-12 commands does the Eagle use?

The Eagle (and SensorData LoRaWAN) use the M! command. It is mainly designed around the use-case of monitoring soil moisture probes. Implementing multiple arbitrary commands in a specific sequence generically is more complicated - but contact us if you have specific requirements to discuss the options.

The full control flow of the SDI-12 measurement, for an address a, and measurement type t, is:
Tx: aI! (identify device)

Rx: axxxxx…. The response gets sent as part of the SDI12 data. If no response, then we give up this measurement.

 

For each measurement parameter, the following goes through each set bit in the mask

Tx: aM! (or aMt! if the type is not 0)

Rx: aXXXn. XXX is how long we need to wait before the samples are ready, and n are how many it will return (both can be 0).

 

After waiting XXX seconds, the following goes through each value of n, from 0 to 9, until either 0 data is returned (but still a response), or we reach 15 individual values returned. Each aDn command can return more than one value

 

Tx: aDn

Rx: a<data>

 

If at any time no response is heard, the measurement is aborted.


Parameter Setup

SDI-12 General

Vout on the Eagle is simply the supply voltage. Different sensors need different warm-up times before readings can be taken, so set the power up delay here. 


SDI-12 Measurements 1-5

Up to 10 measurements types can be taken on each probe and there are 5 different addresses represented by the tabs in system parameters. Set the address (0-4) in the Address field

  • The measurement mask is a hex bit mask. For example; for address 0, and measurements 1, 4 and 7, we would set the Address parameter to 0
  • Then the measurement mask is created as follows: From right to left, set the nth 0 to 1 for the type number you want to measure. 
  • e.g. To measure types 1, 4 and 7, set the 1st, 4th and 7th bit from the right to 1, creating 1001 0010.
  •  Convert this binary octet to hexadecimal: 1001 0010 = 0x92.
  • So the Measurement Mask parameter needs to be set to 0x92

SDI-12 Measurement example

SDI12Sensordata. //Device Type

DeviceAddress: 0,  // SDI-12 Measurement address

DeviceId: 13EP100GL-08 01180808155625  // (Probe ID)

Measurements: Type:0, Count:8, Values: 59030 64930 67100 68450 70570 69170 68750 65450.  //Measurement type 0 with 8 samples

Measurements: Type:2, Count:8, Values: 20020 19570 19250 18940 18920 18780 18550 18210.  //Measurement type 2 with 8 samples

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.