Overview
SDI-12 is a data communications protocol developed specifically for environmental monitoring applications. The motivation to develop SDI-12 began in the 1980s when a group of environmental monitoring specialists started to become frustrated with the complexity of interfacing analog sensors with the data loggers of the time. In addition, these low-power analog sensors were extremely unreliable. A goal was set to develop a protocol that would address and solve these frustrations.
The Serial Digital Interface at 1200 baud Protocol (SDI-12) was the solution to the environmental monitoring specialists needs. SDI-12 governs exactly how a sensor must communicate with a data logger. Any sensor claiming to be SDI-12 compatible must accept a standard set of commands and conform to specific electrical and power standards. SDI-12 sensors are smart sensors. They contain specialized circuitry and programming to enable users to configure and calibrate the sensor completely independent of a data logger.
There are a number of advantages to using SDI-12 sensors over classic analog monitoring devices:
- The SDI-12 digital signal is low-power and resistant to data errors.
- The sensors analog signal is converted to digital in the sensor, not the data logger.
- Use of digital signals greatly reduces the effects of noise interference.
- The sensors can be instantly plugged-in or unplugged from the system.
Sensors that adhere to SDI-12 protocol have a subset of commands that are consistent with every other SDI-12 sensor. These commands are used to identify the instrument, start a measurement, get data, etc. At a user specified interval (the log or sample interval), the data logger sends the measurement command to the instrument. The SDI-12 sensor will then start taking a measurement and let the data logger know when it will be done doing so. When the sensor has finished taking a measurement the data logger will ask the sensor for the data. The sensor will return its data in a data string such as:
0+79.5+0.008+0.988+0.92
SDI-12 protocol does not tell the user what parameter and unit of measurement each returned value is. This information is stored in the data logger and must be specified in the software.
The list of standard SDI-12 commands is available in the SDI-12 protocol specification from the SDI-12 Support Group at www.sdi-12.org.
SDI-12 Command Grammar
SDI-12 grammar is not required for sensor operation when connected to a NexSens iSIC data logger because iChart software and iSIC data loggers take care of all the protocols and commands.
However, iChart provides a terminal where a user can enter SDI-12 commands manually and send them directly to the SDI-12 sensor. The sensor response is displayed to the user allowing troubleshooting and SDI-12 configuration to be easily accomplished.
Sensor Address
The first character of every command is the controller address. Likewise, the first character of every response is the address as well. The default controller address is ASCII (American Standard Code for Information Interchange) 0. Only addresses ASCII 0 through ASCII 9 are allowed.
“?” Wildcard Address
The wildcard address ASCII “?” may be used in the place of a sensor address. ? can be used in place of the SDI-12 address for any SDI-12 command (NOT just the address query command). However, if a system has more than one SDI-12 sensor connected, all of them will respond to the wildcard address which may cause confusion. It is recommended that the wildcard address be only used when using the address query command.
Typical SDI-12 Commands
SDI-12 has a unique set of commands. A few of the commonly used ones are summarized below.
Identification
Command: aI!
Response: allcccccccmmmmmmvvvxx
- ll, the 2 digit supported SDI-12 version, i.e. “13”
- cccccc, the 7 digit manufacturer name, i.e. “NexSens”
- mmmmmm, the 6 digit model number, i.e. “iSICDL”
- vvv, the 3 digit major and minor firmware version number, i.e. “613”
- xx, the two digit build firmware version number, i.e. “01”
Measurement
Command: aM! or aMC!
Response: atttn
· ttt, the 3 digit number of seconds until the requested measurement is ready.
· n, the single digit number of parameters returned by the measurement.
This single digit number is an ASCII (American Standard Code for Information Interchange) character that is NOT limited to ‘0’ to ‘9’ as in the SDI-12 specification.
It can be from ‘0’ on through the ASCII list (limit will be different from version to version). The “N” character displayed is an ASCII character that corresponds to the number of parameters only after subtracting the ASCII value “0” from it.
i.e. <# of parameters> = N – <decimal value of ASCII 0>
Example: 20 parameters
The N value displayed will be “D”
So that N = “D”-“0” = 68 – 48 = 20
For information on ASCII characters, visit www.asciitable.com
Concurrent Measurement
Command: aC! or aCC!
Response: atttnn
- ttt, the 3 digit number of seconds until the requested measurement is ready.
- nn, the number of measurement values that will be returned from a Request Data command.
It is NOT limited to 20 as in the specification. It can be from 00 to 99.
Request Data
Command: aD0 … aD9!
Response: 0+79.5+0.008+0.988+0.92
Responds with the maximum number of decimal places (5) and truncates measurements to meet the 7 character limit defined in the specification. This command should not be sent until after the measurement command has been sent and time specified by the measurement command has passed, otherwise the measurement will be aborted.
Change SDI-12 Address
Command: aAb!
Response: b
Changes the sensor address from a to b. b must be from 0 to 9 and it should be an address that is not in use by any other SDI-12 sensor connected to the particular system.
REV: 13G18