New bulk SDI-12 USB order packaging

The above is an order of 9 adapters. So if you have received your order of SDI-12 USB adapters in a stack of boards, hope you will make good use of the M3 standoffs! I’ve been shipping bulk quantities of the adapters lately due to an increase of quantities per order. I thought, the anti-static bags are cheap but are waste once the adapter has been received. So if I could pack the adapters better, I may be able to ship more adapters with a more compact box. Also the standoffs are nice to have for anyone who will mount the adapters in boxes. If there has been any problems with this bulk packaging, please let me know!

Here is another order of 6 adapters.

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.

Python scripts updated

I’ve just updated some of my data logging python scripts. The 1.5.0 version is still the most recommended version for beginners. In this version, I removed the dependency of cURL and replaced it with the builtin module urllib. This way you will be able to upload data without installing cURL. I also updated the API address of thingspeak.com. Although the old API address from a few years ago still works, having the new address helps. I also enabled fields 7 and 8. This means each channel can record up to 8 values instead of 6. If you have more than 8, you still need additional channels.

I also released version 1.5.7. This version is based on 1.5.0 but has better error handling and also has a config file. Only during the first execution, you will be greeted by interactive questions such as which serial port, SDI-12 sensor addresses etc. It then saves the config to a Liudrlogger.conf and will load the config from this file when it is executed next time, so no questions will be asked anymore. This helps auto run the script at boot. Also it remembers the exact SDI-12 adapter by serial number, in case you have multiple serial ports and are using Linux or RPI and these ports tend to change order on every reboot (unless you bind the hardware to a port number).

I have not updated 1.6.0 BP since not many people use multiple SDI-12 USB adapter on the same computer. If you wish, you can change max_upload_values = 6 to max_upload_values = 8 to take advantage of the up to 8 fields per channel capacity of thingspeak.com and update http_request_url_format = ‘https://api.thingspeak.com/update/?api_key=%s%s’ to http_request_url_format = ‘https://api.thingspeak.com/update.json?api_key=%s%s’

Documentation and scripts:

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.

Please check USPS international service alters before shopping!

I have just noticed that USPS has suspended packages to Australia when I was searching for first-class package price to Australia at USPS.com and couldn’t find that option. There were no explanation so I searched around and found some news from last week:

Check the service alerts here. I can only ship USPS:

https://about.usps.com/newsroom/service-alerts/international/welcome.htm

Slightly lower shipping rates for France Germany and UK

I’ve recently started selling on my square online store. This store allows more freedom in setting up shipping rates. So I’ve set up US, Canada, and rest of world. Except that the rest of the world is subdivided into many shipping regions by the USPS. So starting today I’ve just set up a slightly lower rate for first-class shipping to France, Germany, and the UK. All have very similar rates that you can check here:

https://postcalc.usps.com/

Here is the link to up to 8oz of package (up to 6 adapters) to France as an example:

The USPS has the same rate for 1-8oz and then same rate for 9-16oz.

I needed a slight overhead to cover the transaction cost and currency exchange rate so I added a few dollars to the rate listed at the bottom of the list (First-class).

If you live in a country outside of US and find a cheaper rate on USPS than my “rest of the world” rate, please post a request here to have your country added to the rates. It’s a laborious work to anticipate where the shipments might go but if you make a request, I’ll make sure I do it for you.

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

My own online store is open!

So after some research and putting in some work, I now have my own online store! It’s powered by Square and has a fairly simple interface: A few items that I sell and shipping costs depending on your shipping address. I currently have 3 regions with different shipping costs: within USA, Canada, and rest of world. I will add more regions, I believe up to 6, each with different shipping costs and try my best to get the costs to be more accurate according to the quantity ordered. Anyway, here it is! Please let me know if there’s something I can improve on. If this goes well, I can retire the dated inmojo.com marketplace and the Paypal purchase links.

https://liudr.square.site/