BM Sensor Integration - SDI-12 Multiparameter Sonde EXO3s

Introduction

This blog is an ongoing attempt to be able to communicate with SDI-12 sensors. This is not as popular as a protocol but is still a standard used widely in environment data acquisition.

The Bristlemouth DevKit has the terminal blocks available for SDI-12 communication. We have chosen the YSI EXO3s Multi-parameter Sonde for this effort since it has native SDI-12 communication.

This post will capture the steps, the challenges and any bugs I might come across while integrating the multi-parameter sonde EXO3s to the Bristlemouth DevKit.

What is SDI-12? It’s a single data line serial communication that is widely used in environment data acquisition. It has 3 lines - GND, Data and 12VDC. Here is more information on the nitty gritty details of what makes SDI-12 communication

What is my strategy?

My approach to this project is pretty simple. The steps I plan to follow are -

  • The sensor shows up and can be connected to on a terminal on the laptop.
  • Send commands and receive responses. Understand the data frames coming via the SDI-12 Data line.
  • Wire the SDI-12 lines to the corresponding terminal blocks on the BM DevKit and see if the sensor is sending the same data frames.
  • Write a firmware app for the BM Mote (brains of the Bristlemouth DevKit) to send commands, receive and parse responses from the sensor to a readable format.
  • Spotter can receive sensor data via Bristlemouth and we can log it the the SD card and/or see it on the dashboard

End Goal

Able to integrate and communicate with an SDI-12 protocol capable sensor (Multi-parameter Sonde) via Bristlemouth.

:wave: Follow along as I work on integrating a new sensor to our Bristlemouth Ecosystem! Also feel free to add comments or post any questions!

8 Likes

This post documents how to wire and connect to the YSI EXO3s Multi-parameter Sonde. A note about EXO3s - it is the same as EXO3 but without a battery pack inside the housing.

Materials

Sensor Pinout and cable

For this section, I want to wire the SDI-12 lines from the sensor to an SDI-12 to USB adapter to make sure we have the pinout and wring right, and the sensor shows up as a USB port.

Based on the EXO3’s manual page 30, the wiring for native SDI-12 communication is GND on black and bare wire, Data on orange wire, 12VDC on red wire.

Unfortunately, I don’t have the flying lead cable that is mentioned in the manual. We have a similar “subconnector” cable available but the cable colors are most likely not the same as the flying lead cable.

To use this cable, I need the pinout of the of the male connector on the sensor side. The YSI support team provided us with the pinout details -

After using a multimeter and checking which color of the subconn conductor is which pin, I figured out which color of the subconn cable wires is which SDI-12 net. Here below:

net name pin cable color (flying lead) cable color (subconn)
SDI12 Data 1 orange black
GND 2 & 4 black, bare white, green
12V 3 red red

Wiring

3 Likes

Basic SDI-12 commands and responses

After wiring as mentioned above, I used pyserial-miniterm to find the sensor and connect to it (any serial terminal should work). I also added echo to view the commands I type to send. I noticed I receive the response immediately after typing ! at the end of the command to send.

Here is what I saw on the terminal. The EXO3s Multi-parameter Sonde shows up as a USB port with description:
/dev/cu.usbserial-D30FEU73 'FT231X USB UART - FT231X USB UART'

uma@Umas-MacBook-Pro-2 ~ % pyserial-miniterm -e
— Available ports:
— 1: /dev/cu.BLTH ‘n/a’
— 2: /dev/cu.Bluetooth-Incoming-Port ‘n/a’
— 3: /dev/cu.usbserial-D30FEU73 ‘FT231X USB UART - FT231X USB UART’
— Enter port index or full name: 3
— Miniterm on /dev/cu.usbserial-D30FEU73 9600,8,N,1 —
— Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
␀?!0
0!0
0I!013YSIIWQSGEXOSND100
0M!00629
0
0D!0
0D0!0+0.098+22.783+5.50+6.87
0D1!0-7.13+83.10+7.16+5.95
0D2!0+1.22+12.41
0D3!0

Breaking it down -

I used this website to look up SDI-12 commands since it’s easy to read.

command response interpretation
?! 0 Address Query: 0 is the address
0! 0 ACK: 0 is the address
0I! 013YSIIWQSGEXOSND100 Identification: 0 sdi-12 sensor address; 13 sdi-12 version number; YSIIWQSG vendor identification; EXOSND sensor model; 100 sensor version
0M! 00629 Measure command: 0 sdi-12 sensor address; 062 time is seconds until data available; 9 number of value to expect after 62 seconds (0 will be rxd to indicate measurement is done)
0D0! 0+0.098+22.783+5.50+6.87 Send Data command from channel 0: 0 sdi-12 sensor address; 0.098 value 1; 22.783 value 2; 5.50 value 3; 6.87 value 4
0D1! 0-7.13+83.10+7.16+5.95 Send Data command from channel 1: 0 sdi-12 sensor address; -7.13 value 5; 83.10 value 6; 7.16 value 7; 5.95 value 8
0D2! 0+1.22+12.41 Send Data command from channel 2: 0 sdi-12 sensor address; 1.22 value 9; 12.41 value 10?

Next Steps

The next step is understanding this data. Some questions that came up after getting this data –

  • What do the values mean?
  • In what order are they being sent?
  • Can I configure them and choose which reading is sent first?
  • Does the position of the sensors inside the sonde matter?

After having a little back and forth with the YSI support team, I understand I would need to use their Kor Software and along with their DCP Signal Output Adapter to configure the data frames being sent from the sonde. My next post will be about my discoveries using the Kor software + DCP SOA with the EXO3s.

2 Likes