SDI-12 USB adapter

 Description

This SDI-12 USB adapter is a great way to add SDI-12 sensors to a PC running windows, Linux, Mac OSX, or raspberry pi. Similar products on the market sell for a lot more with less features. This adapter essentially allows you to send SDI-12 commands directly to your sensors and read back their responses. You may decide to run the free and open-source data logger code I provide and maintain, or develop your own code.

sdi-12-usb-analog

To integrate SDI-12 sensor on your Arduino instead of on PC or raspberry pi, check out my SDI-12 data logging shield and dongle:

http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/item/sdi-12-serial-logger-shield/

SDI-12 sensors are widely used in environmental monitoring including soil, streams, plants etc. On the other hand, data loggers designed for SDI-12 sensors are usually expensive and proprietary, making it harder to monitor and study soils and streams on a budget. This SDI-12 USB adapter makes it possible to directly interface SDI-12 sensors with a PC running Windows, Mac, Linux, or a Raspberry Pi, on a budget. I have built numerous SDI-12 sensor data loggers. This is my latest design that is very easy to use. All you need is the adapter and a PC/Raspberry Pi. It also comes with free data logger program (Python script) for all the above operating systems. A section on SDI-12 sensors will guide you through it. FYI, a $150 windows 10 netbook running on Intel ATOM Z3000 series or faster is more than enough to log data. All of the examples in this manual came from one such netbook. A first-generation Raspberry Pi is more than enough for data logging.

SDI-12 sensors tested

So far, I have been able to get hold of the following sensors and tested them all with the adapter. Apogee’s sensors all require command re-send, which is implemented in the adapter. Decagon’s sensors all claim to have 4V digital logic but their engineers confirmed that they are 5V tolerant. In theory, all SDI-12 sensors should work with my adapter but in practice not all sensors were made equal. The following list will keep expand as I get more sensors to test.
Apogee:

  • SI-411 (standard field of view infrared radiometer sensor)

Aquacheck:

  • CKC 6 sensor probe

Campbell Scientific:

  • CS650 30cm Soil Volumetric Water Content Probe (Thanks Stan!)
  • CS655 12cm Soil Volumetric Water Content Probe (Thanks Nick!)

Decagon:

  • DS-2 (Sonic Anemometer)
  • VP-3 (temperature, barometer, humidity sensor)
  • PRI (spectral reflectance sensor)
  • NDVI (spectral reflectance sensor)
  • GS3 (Ruggedized Soil Moisture, Temperature, and Electrical Conductivity Sensor)
  • MPS-6 (Calibrated Water Potential Sensor)
  • 5TM (Soil Moisture and Temperature Sensor)

Ponsel:

  • Digital turbidity sensor

Sentek:

  • TriSCAN (12 moisture salinity temperature sensor probes)

Data Logging (Windows/Mac/Linux/Raspberry pi)

The adapter has been designed for long-term data logging, not just hours, days, or weeks, months at a time. The data logging software can also run without problems for months. You can sit back and watch the Python data collection script collect data automatically. My Python script is free and open source and has the following features.

  • Automatically names files with start date such as 20160426.CSV
  • Uploads data to a server so you can remotely access you data, or plot them with Google Charts (Python logger code)
  • A free web page is provided so you can start making your own remote dashboard for your logger (Python logger code)
  • Select sensor address
  • Enter total data points
  • Enter delay between data points
  • Select GMT or Local time zone for time stamp stored in local log file

2016-02-03-171037_1680x1050_scrot

Data logger running on a Raspberry PI 2 B

soil logger webpage

Webpage dashboard for my sample data logger (use it for free)

Just run the python data logger script in Tera Term. Your data will be stored where this script is so if you store the script in a cloud drive, you will be able to view your data remotely. Otherwise, use the data server to store your data and retrieve them.

The following shows temperature of a 30-day run:

30-day temperature

Telemetry
Your PC or raspberry pi must have access to the internet. Your data are sent to a server and stored there ready for retrieval and plotting in a web browser. With Python data logger code V1.1 and up, your data is sent to a phant server run by sparkfun electronics. You can retrieve data remotely. So if your logger is in your lab or in the field, you can retrieve your data wherever you are if you have internet. You will still have a local logger file just in case.
I have made a sample webpage that has the links for data download and graphs to show the most recent data. You are welcome to use the webpage for free, modify it and improve it. Link
If you require your data to be uploaded to your own server with your specific formats, I will be able to help you achieve that as well. Consulting fee applies.

Local data log file Format
Your data will be stored in comma-separated-value (.CSV) format. The file name is the date and time when the script starts logging data. There are at least three columns. The first column is the date and time the data point is collected. Depending on your choice, it is either in GMT/UTC or local time. The next column is the sensor address. The third column is the first value returned by your sensor. If your sensor returns more than one value, additional columns will contain additional values.

This file format is ready to be read by any major data analysis tools such as Excel, Open Office Calc, or the more expensive Origin Pro. Here is a sample of data collected from a Decagon 5TM soil temperature and moisture sensor. The first data column is the relative dielectric constant (1 for air, yes, it’s NOT in soil). The second data column is temperature.

2015/10/31 18:30:59, 1, +1.04, +25.0
2015/10/31 18:31:27, 1, +1.04, +24.9
2015/10/31 18:31:56, 1, +1.04, +24.9

Plot
Data imported in Microsoft Excel and plotted

Where to buy:

This hardware is for sale in several online stores that ship internationally.

Buy directly on my blog:

slide2

Buy an assembled SDI-12 USB adapter (US shipping)

Buy an assembled SDI-12 USB adapter (International Priority shipping)

slide1

Buy an assembled SDI-12 + Analog USB adapter (US shipping)

Buy an assembled SDI-12 + Analog USB adapter (International Priority shipping)

Buy from inmojo.com online store:

Here is my store front at inmojo.com:

http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/item/sdi-12-usb-adapter/

There are many options such as 10 adapter and USB cable pack for a discount. You can buy just the adapter. You will need a mini-USB cable to connect it to your computer or raspberry pi. Or you can get a kit with a Molex mini-USB cable from Digikey. If you are interested in logging data with a raspberry pi, I can load the necessary program to an 8GB microSD card as the third buying option. It’s plug and play. My blog only has one option, the adapter. My inmojo store has all the options mentioned above.

Documentation:

Manual 2016-11-19

Sensor connection guide 2016-08-18

Data logger programs:

All my code are in Python. You can run them on Windows PC, Linux, Raspberry Pi, and Mac OSX:

Data Logger V1.3 download (2016-11-12)

This version adds support to reading 4 analog inputs on the SDI-12 + Analog USB adapter. There is an additional interactive question asking you whether to read analog inputs (Y/N). Select N if you have a regular SDI-12 USB adapter. If you stored answers to these interactive questions in a file to start the logger program without human interaction, you will need to add an additional answer Y or N to your answer file.

Data Logger V1.2 download (2016-07-01)

This version lists USB vendor ID (VID) of each serial port. The VID for my adapter is 0403. This helps you identify which serial port is the adapter.

Data Logger V1.1 download (2016-04-25)

This version also logs data to a phant server and to a local file. You need internet connection for telemetry.

Data logger V1.0 download (2016-02-09)

This version logs data to a local file.

Sensor configuration download (2016-02-09)

This script discovers the address of the sensor and gives you the option to change its address. It MUST run with a single sensor on the bus. Run this script with each new sensor to set their addresses to a unique value 0-9, A-Z, A-y (z is used by the adapter).

SDI-12 bus scanner V1.0 download (2016-09-25)

This script scans the bus and prints all discovered sensor addresses and information. It helps with system diagnostics. The sensors on the bus MUST have been configured with unique address, with sensor config script. Otherwise they may all be at address zero.

Firmware update

Firmware update instructions (also in the manual)

V 1.2 update files (2016-06-06):

Need some help?

If you need more sophisticated data logging scripts such as logging multiple sensors or sensor with more than 6 output values or integrating SDI-12 sensors in projects using Arduino, I should be able to help. Contact me on inmojo.com or leave a message on my blog. I am a full-time physics professor so my time during semesters may be limited. I have more time during the summer though.

%d bloggers like this: