5 SDI-12 Basics
SDI-12 is a serial data communication standard for interfacing multiple sensors with a data recorder
SDI-12 uses a shared bus with 3 wires: power (12V), data, ground
Data rate: 1200 baud
Each sensor at the bus gets a unique address which is in the range ASCII [0-9, a-z, A-Z]. The default
address of every sensor is ASCII[0]. When setting up a SDI-12 sensor network, every sensor needs to be
configured with a unique address. This can be done using the Change Address Command.
A sensor typically can measure one or more parameters.
Sensor manufacturers usually specify Extended Commands to configure or calibrate sensors. This
commands are specified by the manufacturer, but they follow the command structure specified by SDI-12.
A typical recorder/sensor measurement sequence proceeds as follows:
1) The data recorder wakes all sensors on the SDI-12 bus with a break.
2) The recorder transmits a command to a specific, addressed sensor, instructing it to make a measurement.
3) The addressed sensor responds within 15.0 milliseconds returning the maximum time until the
measurement data will be ready and the number of data values it will return.
4) If the measurement is immediately available, the recorder transmits a command to the sensor instructing it
to return the measurement result(s). If the measurement is not ready, the data recorder waits for the sensor
to send a request to the recorder, which indicatesthat the data are ready. The recorder then transmits a
command to get the data.
5) The sensor responds, returning one or more measurement results
SDI-12 command structure:
Each SDI-12 command is an ASCII string with up to 5 characters, starting with the sensor address and
terminated by a ! character.
Example:
Send Identification Command 0I!
0 is the sensor address (sensor zero). Upon receiving this command, the sensor will send an ASCII string
containing sensor address, SDI-12 compatibility number, company name, sensor model number, sensor
version number and sensor serial number.
The standard process to carry out a measurement is to send a measurement request upon which the sensor
responds with the time that is required to carry out the measurement and the number of data items being
returned. After waiting the time that the sensor requires to carry out the measurement, the data recorder
sends a Read Command to get the measurement results.
Example:
Start Measurement Command 0M1!
Sensor 0 might respond 00302 which means the measurement will take 30 seconds and deliver 2 values.
After min. 30 seconds, the data recorder can send the Read Data Command 0D0! to which Sensor 0 might
reply 0+27+1050. +27+1050 is the two measurement results which may be 27°C and 1050 milibar.
The response string of a sensor is always in ASCII format and may contain up to 40 or up to 80 characters,
depending on the type of command. Out of 40 or 80 characters, the values part of the response string may
contain up to 35 or 75 characters.