Availability of SDI-12 USB adapters

Due to the chip shortage, I was unable to make more batches of USB adapters lately and the stock has gone down to zero for some time. Lately I’ve found a small batch of chips to make two small batches to fill out recent orders and have some extra to sell on my square store again. This small batch of chips will not last very long. There’s about a dozen of SDI-12 USB adapters and a few SDI-12 + Analog USB adapters that are in stock. Meanwhile, I’ve sourced a different processor package and am in the process of making updates to my designs to use these new processors. Here is a comparison between the existing processor package (TQFP-32) on the left and the new processor package (QFN-28) on the right.

As you can see, the new package is quite a bit smaller and you can’t even see any pins as there aren’t any. There are metal pads under the processor. The only difference between the processors is how the processor is packaged. The existing adapters use the thin-quad-flat-pack with 32 pins while the new adapters will be using the quad-flat-pack-no-pin with 28 pins. The 4 missing pins are not used by the adapter so there’s no difference. Since the new design is still under development/prototype stage, I’ll still be selling remaining adapters based on the existing design until I completely run out of parts to make them, which is very soon. Here is a comparison of the existing and new designs. The one on the right with a smaller processor at the bottom is the new design:

So not too much has changed. I do, on the other hand, have a new variant that I want to float here: Remove the 12-pole connector at the top. Replace it with a 5V->12V boost converter. This will also remove the power selection jumper and external power terminal because the adapter will provide 12V with the boost converter. Having a 12V is more desirable than the default 5V from USB because some sensors require 12V or minimal 7.5V to operate and you must attach an AC adapter. If you see the benefit of such a variant (my main design remains unchanged), please respond so I can gauge the level of interest. Once my prototyping is done and I’m certain my design works fine, I can make a small batch of the variants that have the boost converter if there’s enough interest. Here is what it looks like:

I have added a 5th terminal for SDI-12 sensors where the external power terminal was. The tentative price is $59. It saves you from having to purchase a separate 12V adapter for each USB adapter and the hassle to wire the adapter. Since I removed the 12-pole terminal and the associated 4 analog pins, it makes routing easier and I used a double footprint of the processor so the board can be assembled with either processor.

How I am programming and testing an SDI-12 USB adapter

In case you wonder how I managed to program and test all the adapters I sell, here is a video for that:

So I made a programming jig and put it in a box. I then have two terminal programs open, one for the programming jig’s control and the other for sending test commands to the SDI-12 adapter. I plan to write a Python script to further automate this process.

Sentek SDI-12 soil probe troubleshooting

A number of years ago, I had an opportunity to use a Sentek SDI-12 soil probe with 16 sensor nodes in the probe. It was quite something! Lots of data to extract and lots of measurement and data commands to issue. I think that my experience with the probe helped me better understand SDI-12 protocol and ultimately helped me develop and test my SDI-12 USB adapter’s firmware. Recently one of my customers reached out to me regarding troubleshooting tips with this sensor. I felt quite interested to help and refresh my memory on how to properly use the sensor. Here are the troubleshooting tips in case you need them.

First of all, the sensor probe has multiple sensor nodes, making it require longer delays before data can be extracted from it. According to the manual, if you have 16 sensor nodes, the complete moisture measurement M! could take up to 13 seconds (first 9 sensors in the probe), then M1! could take up to 11 seconds (next 7 sensors in the probe). Salinity takes up to 23 seconds with M2! (first 9 sensors in the probe), then M3! could take up to 18 seconds (next 7 sensors in the probe). Temperature and humidity measurements are faster so they only take up to 5 seconds for all 16 sensors.

So if you have more than 9 sensor nodes, you need all measurement commands M! (AKA M0!) thru M7!. If you have 9 sensor nodes or less, you only need M!, M2!, M4!, and M6!.

What this means to you is, you must use my logging script version 1.6.x, which allows you to enter multiple measurement commands per sensor address. For instance, you have 16 sensor nodes, you want all measurements, you can enter 01234567 when asked what measurement commands to use. The ‘0’ means the M! command, which is also known as M0!. Then ‘1’ means M1! command. If you only have 9 or less sensors and you want all data, you need to enter 0246 for all measurements. But if you only want moisture and temperature nothing else, you would use 04.

Next, you want your delay between data points to be longer than these values. If you wish to save ALL data every minute, and you have 16 sensor nodes, this may be too little delay. You can try out delay between data yourself. If you see -999.999, then you need to increase your delay.

Finally, because more sensor nodes require more time before data become available, you may have to increase the serial port timeout value from 10 to a larger value, if you’re not able to obtain data from your sensor.

ser.append(serial.Serial(port=port_device, baudrate=9600, timeout=10))

This is the line you need to change the timeout. The script only waits this long after issuing a measurement command before it times out. Increasing this value will NOT slow down your data collection. The time your sensor requires to get data determines how much time is need to get your data.

Want USB AND UART/Serial both?

While it is impossible to have both USB and UART/Serial interfaces simultaneously, you CAN switch between them with the UART-version of the SDI-12 adapter and the help of an extra adapter (for USB interface).

SDI-12 USB adapters on a map

[UPDATED] I’ve been thinking about making a map of where the SDI-12 USB adapters have gone to. Now it’s finally taking shape, thanks to my son. It includes locations I shipped SDI-12 USB adapters to between 2019 and March of 2022. I’ll get more locations added to it for later this year but too bad PayPal doesn’t keep records older than 2019. I am only putting the city and country for each package, without postal code or any details of where. In case you wish something removed or corrected, please drop me a message. If you want to leave a message for others to see, you are very welcome to do so! The map may not work on some devices but I’ll migrate it to google map sometime soon.

Map

Reading SDI-12 sensors with your Android smartphones

So if you want to get started with your SDI-12 sensors quickly, you can use your Android smartphone as a display and install a serial port app. Then within a minute, you are reading your SDI-12 sensors already! Watch my short tutorial for Android phones. I’ll investigate how to do this on an iphone and ipad as well and post my findings.

Reading SDI-12 sensors with an Android Smartphone

By the way, those 6 customizable buttons are really useful. You can long press it to edit both its name and value to a command. Then you can just tap the buttons instead of typing. You can even type in both M command that starts the data acquisition and the D command that reads back the data. You will need some delays between the commands though. The following is how I configured my serial port app for a better experience with SDI-12 sensors:

Here is the serial terminal program:

SDI-12 USB+Analog adapter vs stacking basic adapter with Analog extension board

If you wonder the pros and cons of these two options, here is a video for you.

SDI-12 USB+Analog adapter:

Pro: small form factor that is easy to work with
Con: no digital inputs for digital pulse from rain gauge or flow meter, no extension

SDI-12 USB adapter stacked with Analog extension board:
Pro: extendable with up to 4 hi-res analog addons and other addons such as extra SDI-12 terminals, 4-20mA sensor addon (coming out soon), and possibly a future GPS addon via the 6-pin header.
Con: device gets taller with the extension boards

New videos posted

It’s been a while since my last video introductions so I took some time to record an overview of all the adapters and extension boards.

I also added detailed introduction to each one and their features. Here is the playlist containing all of my recent videos:

Volumetric water content and dielectric constant from METER group/Decagon 10HS sensor

If you are measuring volumetric water content of soil with an analog sensor such as the METER group (formally Decagon) 10HS sensor, you need to convert the voltage you read from it into either VWC or dielectric constant. The manual of the sensor gives you the conversion formula. In the following video, I demonstrated how to apply the conversion formula to an analog reading:

Even if you are using an SDI-12 sensor, its output may be dielectric constant instead of VWC, which needs conversion using a similar formula. I would do the conversion post data logging since I could potentially find a more precise calibration curve of my soil instead of using their standard mineral soil curve or potting soil curve. Without applying the curve, I can easily apply a different curve.

SDI-12 USB adapter with larger terminals

After some design and prototyping, now I have a newer version of the SDI-12 USB adapter that features larger 3.5mm terminals. The original 2.54mm terminals can accommodate 18AWG wires and the new 3.5mm terminals can accommodate 16AWG wires. I’ve never seen sensor wires that thick although you could get some really thick wires from AC adapters. The bigger terminals makes installing wires easier with the additional spacing between pins, besides they accept slightly thicker wires. The screws are also slightly bigger, making the terminals sturdier. I have to make the terminals overhang a millimeter or so to fit them on the same board edges. I’ve kept the 2.54mm terminals for the optional analog and digital input terminals on the top edge. I moved the power selector to fit the larger terminals on the left. Otherwise, the height of the terminals is the same as before and you won’t notice a difference unless you look carefully. For example, I no longer have a 3-pole terminal for the external power. Instead, I have a 2-pole terminal to save space. Here are some photos:

The new prototype held diagonally in my hand. I had the board printed in black matte instead of regular black glossy. This has made part placement and inspection easier since there is no longer a glare from the glossy surface. Besides the terminals, I also added a footprint for the transceiver and a solder jumper. Most people will not need a transceiver. I’ve tested my adapters without this added transceiver with cable up to 100ft (30m) without visible signal degradation. You only need it if you have a total data cable length significantly greater than 100ft(30m).

Here is a side view photo of the prototype:

Here are some comparisons between the current version (top) and the new prototype (bottom):

Since the spacing is no longer 2.54mm, like the pin headers, I will have to make a header for testing with SDI-12 sensors after assembly. I also need to find proper source to buy the larger terminals in quantity, and print out more than a handful of boards. It will take a while before I am ready to sell these in my stores.

I have also designed a 3.5mm version of the SDI-12 + Analog USB adapter but haven’t built a prototype yet. It should look the same as the basic adapter though.