Digital transducers include an integrated circuit in the sensor that handles any analog signal processing. The data from these transducers are then passed to the data logger via a serial digital interface. The SDI-12 standard is a relatively simple specification for a digital serial interface maintained by a non-profit organization (sdi12.org). The standard is supported by many transducer and data logger manufacturers (including Campbell), such that it is possible to mix and match compliant SDI-12 transducers and data loggers.
We will be using the Decagon 5TE soil water content sensor as an example of a SDI-12 compliant digital transducer. Let's get familiar with the device and how SDI-12 sensors are wired to a Campbell data logger (9:08 min).
Multiple SDI-12 devices can be connected to the same serial connection on the data logger. However, each device needs to be configured with a unique SDI-12 address on that connection to allow the data logger to be configured to know which sensor each measurement is coming from (8:08 min).
If the SDI-12 device is wired to the switched 12 V port, the port can be activated manually using PC400 to power the device while checking its address using the terminal. This will be required for a CR310 datalogger, which only has a switched 12 V port.
If a program that is turning the SW12V port on and off is running, you will need to stop that program or it will keep turning the port off after you turn it on. You can stop a running program by going to "Datalogger" -> "File Control" screen, then clicking "Stop Program". Note a program can be restarted using the "Run Options" dialog.
Go to the "Monitor data" tab and select an empty location for a new field.
Click the "Add" button to add a field.Â
Select the "Status" table and find the "SW12Volts" field.
Click "Paste" to add the SW12Volts field to the empty location selected in the "Monitor Data" tab.
Once the SW12Volts field is added, you can click the true/false value to toggle the power on and off. If you turn it on, you can then proceed to communicate with the SDI-12 device powered byt the SW12V port via the terminal, as shown in the video.
Decagon is a different company from Campbell, so the 5TE soil water content probe cannot be programmed with shortcut. The Decagon web page does provide some examples of Campbell programs that will work with their transducers, probably because Campbell has such a large share of the environmental monitoring market. The following is an example of one of the Campbell programs provided by Decagon that we can use as a template for our own programs. Note that using this code will require use to get familiar with how CRBasic handles arrays (multi-element data structures).
If using a CR310, the ports are named specifically. When using PortSet, you may need to use "SW12V" as the port identifier instead of the number 9 on a CR850. Remember that right-clicking on a function and then an argument in CRBasic will show you the valid options available for that argument if it is a limited list of options.
Because the SDI-12 interface is a generic standard, you do not need any device-specific functions in CRBasic to retrieve data from an SDI-12 enabled transducer. CRBasic includes a collection of SDI-12 functions capable of allowing communications with any SDI-12 device. Let's look at an example of how to use one of those functions to trigger a measurement and collect data from a Decagon 5TE soil water content probe. You will need to know the SDI-12 address of your device (see above) to adjust this example to work with your equipment (19:26 min).
After adding code to collect data from a Decagon 5TE, we now have a program that measures temperature data in yet another way, though the method of how this device is measuring temperature is hidden behind the SDI-12 interface.
Note that the "AutoRangeC" option will not be available for the voltage measurements, the TCDiff measurements, or the BrHalf measurements with a CR310. You should use the more sensitive setting, or the 34 mV setting, if working through these exercises with a CR310.
If using a CR310, the ports are named specifically. When using PortSet, you may need to use "SW12V" as the port identifier instead of the number 9 on a CR850. Remember that right-clicking on a function and then an argument in CRBasic will show you the valid options available for that argument if it is a limited list of options.
Don't forget to be sure the SDI-12 address for your device is set properly for this code to work.