28
capacitance, then the Vref warm-up time can be lengthened. With this configuration, if the warm-up time is
too short, the returned voltage will be low, resulting in a temperature reading colder than actual. For this
example, a Vref warm-up time of 0.1 second was chosen instead of using the default of 0.01 second. Also,
since this sensor is relatively high impedance (almost 19K at -40 C), the high impedance input buffers are
enabled. We satisfy the requirements for use of the buffers because our input voltage will be in the 0.4V to
1.9V range. To read the temperature in degrees C, issue the:
aM3!
command and then a couple of seconds later issue the
aD0!
command to read back the temperature.
4-20mA Output Sensor
This example is for a water depth sensor, 15 foot range that provides a 4-20mA output. In this example, the
sensor will only be powered during measurements and we will assume that the sensor requires 8 volts to
operate. The SDI-12 AnalogPlus module is a voltage measurement device, therefore a precision resistor
needs to be used to convert the output current to a voltage. A 250 ohm resistor would convert the 20 mA
output into a 5V output, but the sensor requires at least 8 volts for proper operation, so the module would
have to supply at least 13 volts (8 volts for the 5 volts for the output) to the current loop. For most
battery powered systems, this requirement exceeds the expected voltage from the data recorder and therefore
would not work reliably. The voltage drop in the switched output powering the 20 mA sensor would typically
be less than 0.7 Volts, with a maximum of 1 Volt. Therefore if in our system we can expect the SDI-12
module to be powered by at least 11 Volts, then the allowed sensing voltage drop is:
11V min. supply – 8V for sensor – 1V for module switched V = 2V max for current sensing
The 2V implies that the maximum value sensing resistor that can be used is 100 ohms. Note: Even though the
100 ohm resistor would give the highest resolution, the SDI-12 AnalogPlus module has sufficient excess
resolution that a smaller sensing resistor could be utilized without degrading total sensor accuracy.
Connect the sensor‟s positive input to the SW‟D voltage connection and the sensor‟s negative side to the AN4
analog input. AN4 was chosen since it is on the same terminal block as the SW‟D voltage connection.
Connect the 100 ohm sense resistor from AN4 to GND. With this configuration, the module will measure
0.4V when the sensor is output 4 mA (0 feet) and 2V when the sensor output is 20 mA (15 feet). We want the
output to report a 15 foot change for every 1.6 Volt (2V – 0.4V) change therefore we need a slope of 9.375
Ft/V (15 feet/ 1.6 volts) and we need an offset of -3.75 Ft (9.375 ft/V * 0.4V). The other piece of
information that is needed is how long the sensor needs power applied before it produces an accurate output.
For our example sensor, we will assume that the sensor needs one second to stabilize and produce an accurate
output. Therefore, to program the M2 command to perform this reading on channel AN4, issue the
configuration command:
aXV2+4+G+9.375-3.75+X+X+12+1+U+0!
This says that M2 will measure channel 4 with respect to ground. Apply a slope of 9.375 and offset of -3.75
to the output. And that the default settings for averaging time and Vref warm-up are satisfactory. We also
say that we need Switched 12 V for this measurement and that it should be turned on for one second before
the measurement is taken. We chose an unbuffered input since our source impedance is low (100 ohms), and
we configured the unit to use automatic gain. We could have just as well chosen a buffered input for this
measurement since the voltage range of interest 0.4V to 2V is within the acceptable window for using
buffered inputs. To read water level in feet, the data recorder would issue the
aM2!
command and then about 2 seconds later it would issue the
aD0!
command to read back the water level.