SDI-12 miniUART module – perfect for prototyping and embedded projects

Mini in hand

After some requests from customers, I have decided to design a small module that can help everyone prototyping and embedding SDI-12 in their own designs. Enter, mini (rewind! I should have posted this piece last year but forgot it was still in draft mode!)!

This mini module measures only 1″ by 1″ (2.54mm*2.54mm) and is a quarter the size of the regular adapter:

mini vs regular

The immediate advantage is you can easily place it on a breadboard for prototyping like this, with an ESP32 dev board:

mini with ESP32 dev board on breadboard

The size of the mini is designed so that there is one hole on the breadboard for each connection. Some dimensions in mm. Notice there are two mounting holes in case you wish to mount this on your circuit board securely:

mini dimensions

The relative locations of the 6-pin ICSP header, the bottom-right mounting hole, and the top right SDI-12 bus hole are unchanged from the regular board so I can still flash firmware on this board using my existing programmer!

Here is how I connected the module to my ESP32:

breadboard for mini

So I first put my ESP32 on the breadboard, with 5V connected to to top red and gnd to top blue. I also connected 3.3V to bottom red (not used) and gnd to bottom blue.

Then I connected 21 to 5V and 25 to gnd, both to top power strips. I also placed a 0.1″ jumper between 21e and 22e, another one between 24e and 25e. This is to make 22 5V and 24 GND, to match the module, and also keep the 22a-24a available to connect a TRS adapter to connect to an SDI-12 sensor.

Also, I connected 22j to gnd on bottom, and 23j (orange wire) to module TX3 which connects to my ESP32 serial port 1 RX, and 24j (yellow wire) to module RX which connects to my ESP32 serial port 1 TX.

mini with ESP32 dev board hooked up

Notice that because of the 0.1″ jumpers, my 22a is 5V and 24a is GND. The original pin on the module for this pin is NC or not connected, so you can jump GND to it with no issues. That also leaves 23a as SDI-12 signal. I then placed a TRS adapter in pins 22a-24a, with tip connecting to 22a (5V), ring connecting to 23a (SDI-12 signal), and 24a to GND:

mini with ESP32 dev board trs adapter and sensor

You can’t really see which pins I connected to ESP32 because my ESP32 dev board doesn’t have silk screen on top. I was using pin 13 for serial port 1 TX and pin 34 for serial port 1 RX. You can use what fits you.

If you want to use a raspberry pi pico instead of an ESP32, here is how I wired them together.

Here is a screen recording on my computer. You can see how I was reading from the mini module and SDI-12 sensors. It’s very similar with both pico and ESP32 dev boards because I am using micropython on them both.

Here is a link to my online store:

https://liudr.square.site/product/sdi-12-uart-mini-module/73?cs=true&cst=custom

This is the dedicated page for the module including instructions and more updates:

Dimensions:

miniUART module vs regular USB adapter

FloraPulse stem water potential sensor supported

updated20slide20image

After some tests by Dr. Michael Santiago and myself, I can confirm that the FloraPulse stem water potential sensor is supported. One just needs a 1-second delay between SDI-12 commands. Here is a forum post:

https://liudresllc.com/community/supported-sensors/florapulse-stem-water-potential-sensors/#post-5

Read analog voltages, digital ON/OFF, and pulse counts on SDI-12 adapters

If you have read about my SDI-12 USB adapters, you might know that besides connecting SDI-12 sensors to a USB port for PC/raspberry pi, the adapter has an option to read basic 0-5V analog voltages, digital inputs, and count pulses. This extra feature comes as a 12-pole terminal block at the top of the adapter, allowing up to 4 analog inputs, or 4 digital inputs, or 4 pulse counters:

This option has been around for a number of years but has not been widely used. Most people purchase the basic adapter without this $10 option. So is this option useful for you? That depends on what you are planning to do. Say for instance, you have an analog sensor such as a temperature and relative humidity sensor that you want to read besides SDI-12 sensors, if 5mV to 10mV accuracy is good enough for you, then you can read your analog sensor with this option. Do you have a pulse sensor such as a tipping-spoon rain gauge or a flow meter? Then the pulse counter feature would help you integrate these sensors with ease. If you have digital ON/OFF or HIGH/LOW sensors that have 0-5V or 0-3.3V logic, you can read them too.

The easiest way to acquire these sensors is to get the ADI (analog digital input) feature with your purchase. For extra $10, you will have an adapter that comes with a 12-pole terminal with all 4 inputs tested. The best part is, reading these sensors is very easy, just like reading an SDI-12 sensor. This way you can treat an analog temperature sensor just the same way as an SDI-12 sensor. Here is an introductory video:

Here is a link to my online store. To select the option, drop down the selection menu and choose “Analog and digital input header”.

https://liudr.square.site/product/sdi-12-microusb-adapter/50?cs=true&cst=custom

Soldering practice kit

Since many users of my adapters are learning IoT, arduino, raspberry pi, etc. I thought that I could help them learn some basic electronics skills such as soldering. Plus, I have many printed circuit boards that I no longer use. You only need one such board and some male header pins to learn how to solder anyway and you don’t really have random boards just lying around for practice. So here it is, a $2.49 investment in soldering practice:

1. One printed circuit board with many 0.1″ spacing holes

1. One row of 40-oin male break-away headers

1. One small cut sheet of blu-tack putty to hold parts to be soldered (I used a blob in the video but I’ll supply fresh ones cut from a sheet)

Here is a play list of how to solder on a printed circuit board:

The kit is now for sale on my square store:

Forum is online!

After much consideration, I have invested in a wordpress-powered business website and started an online forum. To visit the forum, just click the “FORUM” tab or this address:

You can ask questions and read announcements from the forum. I’ll try to double-post on both forum/announce and blog. I hope the forum will serve both potential and existing users of my adapters so we can share questions/solutions.

Video tutorials on raspberry pi + SDI-12 USB adapter

It’s been a while since I have time to record more videos. So here’s a series of new videos on how to run the python code on a raspberry pi to log data from your SDI-12 sensors, from step 1 assuming a beginner’s skill level. I know that a raspberry pi 4B is hard to get or justify the high prices but you can use any raspberry pi for data logging, such as 3B or 3A, or 0 or 0W. So the point of logging data with a raspberry pi isn’t lost in the face of rpi 4B shortage. Read on if you want to know my trick to get yourself a latest raspberry pi to tinker with or play with your kids.

Here are the videos, in their own playlist:

These videos have been also added to my growing original playlist:

So if you really want your hands on a new raspberry pi so you can start tinkering in the summer but hate the high price, here is a “hack” to get one at a reasonable price. Here is straight from raspberrypi.com, the offerings:

You notice that there is a raspberry pi 400 computer kit? That is a keyboard-form factor raspberry pi 4B with 4GB RAM for 70USD! An equivalent raspberry pi 4B with 4G RAM is priced at 55USD but has been out of stock for 2 years! So grab yourself a raspberry pi 400 instead! You can learn raspberry pi right away! Now that most places selling this kit will sell you a 100USD kit that includes:

  • A power supply
  • A mouse
  • A microHDMI-to-HDMI cable
  • A 16GB microSD card loaded with the raspberry pi OS (may be 2yr old)
  • A printed book of the 4th edition of the beginner’s guide (highly recommend over the .PDF file)

In my opinion, especially if you are starting off with raspberry pi, or have a kid or two at home not knowing what to do with their summer time, grab the 100USD education kit! You may need to help them from time to time because some of the coding content could be hard but it’s a good brain exercise for adults as well! I’ve been doing this with my kid for a week or so and it’s been a blast, drawing snow flakes and regular and regular star polygons etc. using Python turtle from the book. I think I might have a chance to get my kid through Python this summer, finally!

So if you absolutely don’t want the above listed items (have too many of those already?) and just want the bare keyboard computer, go to digikey and get the 70USD module:

https://www.digikey.com/en/products/detail/raspberry-pi/SC0373/13282408

Make sure you get the US keyboard or whatever your native language keyboard is so you aren’t surprised by the extra symbols 😀

Eureka Manta +35 water sensor tested

One of the users of my adapters informed me that they have successfully tested the adapter with this sensor. This is a water sensor that does a lot: “turbidity, temperature, pH, conductivity, and dissolved oxygen sensors, with the option to add ORP and depth sensors” and quite a bit more, according to the manufacturer’s webpage:

https://www.waterprobes.com/product-page/trimeter/product-page/manta-35

Q/A UART version adapters

Q: I plan to integrate your adapters to my own controller, not a PC or raspberry pi USB port. Does your UART version adapter have all necessary resistors and no USB chip to interfere with the UART port? How do you make connection between the UART adapter and my own controller?

A: Yes, all necessary resistors are in place for the UART version of the adapter and the USB chip is not on the chip to interfere.
Here are some of the points:

  1. The adapter has a 6-pin header that is soldered underneath the adapter to avoid making jumper wires from being vertical, which takes extra space, or from going over the optional A/D header.
  2. The adapter requires 5V and GND to be supplied to it since it doesn’t have the 5V and GND from the USB connector. SDI-12 has 5V logic levels so the 5V supply.
  3. The 6-pin header has GND, TX_3V (back of board), 5V, RX, TX_5V, RST from left to right. This is where you power the adapter and connect to its serial port. RST is reset. Unless you want the option to reset the adapter, you can leave it disconnected. Reset is 5V logic.
  4. If your controller is 3.3V logic (ESP32, raspberry pi serial pins, rp2040 etc), connect your controller TX to adapter RX, then your controller RX to adapter TX_3V.
  5. If your controller is 5V logic (Arduino UNO, MEGA2560 etc), connect your controller TX to adapter RX, then your controller RX to adapter TX_5V.

The current states and brief history the SDI-12 USB adapters

Despite the ongoing chip shortage, I’ve secured a batch of processors for more adapters. At the moment I’ve also built enough stock to last for a little while.

So currently I have about 50 qty adapters including a few with analog inputs. I have more boards and ICs but want to conserve my parts. From what I saw, there won’t be a relief of chip shortage until a year from now, i.e. May 2023. I’ve maintained the price of $49 (sometimes $45) for the last decade by absorbing the cost of parts etc. I might be able to continue to do so if I get some help with assembly, such as getting a pick-and-place machine to place surface parts for me. But it’s an expensive machine.

Here is a brief history of my adapters:

In the summer of 2015, I came up with the idea to make a USB adapter that can make reading SDI-12 sensors easier, after having to deal with this protocol in a number of projects. This purple board was the first batch made at oshpark.com. It is a small PCB fab business (they only collect orders and send to actual fab houses) on the west coast. They used to be called dorkbot PDX, a small group of electronics hobbists on the west coast trying to make affordable boards by banding together in their group orders.

First SDI-12 USB adapter prototype in November 2015

This board has the same general layout as the current version, with the miniUSB (maybe my obsession or did I just purchase too many of these connectors?!), USB-UART chip from FTDI, an atmega328p-au, and a programming header. Back then I only had a single terminal for an SDI-12 sensor and had no option to supply external power, well, not easily:

Connecting to external power 2016

Back in the days, I was using a terminal program to talk to the adapter and wrote a macro based of the terminal program to automate data collection. In 2016, I started learning Python more seriously, maybe it’s from raspberry pi, or maybe it was trying to teach physics with some computing elements, or just having to learn it to do projects. So here comes the logging script, in its primitive form in early 2016:

Python script running on Raspberry pi in Feb. 2016

I also started marketing the adapter as compatible with WIN/NIX/MACOS/RPI because back then Python 3.x was able to bring a more consistent programming experience across these systems that Python 2.x was never able to.

Back then, IoT (Internet of Things) was in its very primitive stage and not many places allowed data to be uploaded and presented online. I started with Sparkfun’s Phant server and thingspeak.com, not sure which one first.

Logging data to the internet in April 2016

Later in 2016, I realized there were some need for high precision analog inputs and added the SDI-12 USB + Analog adapter to the lineup. This is the first prototype, in purple as oshpark.com purple. Placing the tiny analog-to-digital adapter used to be nerve wracking. I have since mastered it.

SDI-12 + Analog USB adapter in November 2016

I had a number of interesting projects in 2016-17 and didn’t do a lot on the SDI-12 USB adapters until later in 2017, when I had a project that required collecting GPS data with the sensor so I designed this for the project and general use.

SDI-12 + GPS USB adapter in July 2017

Back then, the basic adapter was still a small half-sized green board with a single SDI-12 terminal. That was able to change:

Full-sized (since then) SDI-12 USB adapter in March 2018

I didn’t market this as a separate adapter because I had high hope that this will replace the more expensive GPS adapter but the hardware didn’t support GPS. So, I started marketing this as a full-sized adapter at the same price point, $49, and gradually retired the half-sized green boards with single terminals. Starting with this version, I added external power connection and a jumper to select between 5V from USB, where most sensors work fine, and the external power terminal, where you can supply your own DC voltage such as 12V. This feature came from the Analog and GPS adapters.

Later in 2018, I redesigned the basic adapter to mostly today’s look and feel. It now has the 4 terminals, power input and selector on the left and right sides, optional basic analog and digital inputs on top, and an extension port in the middle, with an option of UART instead of USB as well.

Very recognizable look of SDI-12 USB adapter in May 2018

Here is a look at two high resolution analog extension boards on top of the basic adapter. I completed updating the code to take inputs and auto scale the inputs, for up to 4 such extension boards:

High resolution analog input extension boards May 2018

I also added extra SDI-12 terminals extension board to help manage the many wires you may have to manage if you want to connect more sensors.

I have also started customizing my adapters to connect to other sensors, such as the following with accelerometers, from special requests.

Customized adapter with accelerometers June 2018

Later that summer, I designed my own data logger! This was based on the idea of having an embedded SDI-12 processing unit, an analog input, and then an ESP32 processor running a new thing called microPython, new and getting traction back then, both the processor and software, now they’ve become major hardware and software players, if not dominating the IoT. This logger is very promising, with WiFi, Xbee, possibility of 4G LTE-M, sd card, real-time clock, and lots of expension!

My own complete WiFi Xbee GSM etc. data logger July 2018

Lots of things have been happening back then and I did a few rounds of firmware development but didn’t end up releasing this logger! Some of you may know that the spirit of this logger lives on and is thriving in a different sector of the industry! The following look may be familiar?

My logger in an SK-16 enclosure August 2018

In early 2019, I added the UART interface adapter to the lineup, based off the same board as USB interfaced adapter, due to an increase of demand to interface with Arduino, ESP32 etc.

UART adapter March 2019

In June, I contemplated using larger terminals based on user feedback. I decided, in order to maintain the same size and look, I can use 0.175″ pitch terminals instead of 0.1″. This makes the terminals accept thicker wires and separate the wires further for installation and prevent short circuits.

Comparison of 0.1″ and 0.175″ pitch terminals July 2019

Now this looks really really like what I’m selling today:

SDI-12 USB Adapter July 2019

I have also been logging data from my own back yard to demonstrate and test my logging scripts:

My backyard sensor run in the summer of 2019

I was even able to determine that after heavy rainfalls I always had power outage on my logger (see long flat blue lines after spikes). It turned out to be a faulty outdoor outlet in my house tripping up the circuit breaker after heavy rain water seeped into it causing short circuit. I later fixed it:

Bad outdoor outlet I replaced in 2019
Good one I installed in 2019

Lots of things were happening later in 2019, besides what you all know, so I didn’t touch my designs until MUCH later, in early 2021. I added a protection diode to fight 12V accidentally damaging the adapter by operators’ errors.

Adapter with protection diode February 2021

As many of use know, IC shortage soon hit the main street manufacturing. Here was a screen grab of the long way, from 2021:

Chip shortage starting showing long lead times, over 1 year, June 2021

Luckily I was well stocked at the year end of 2020! Now it has become a constant thing in the back of my mind, find parts and stock up!

Showing my stock of parts in 2021 to weather the “temporary” shortage in 2021

Over the years, I got a lot of good suggestions from users. Here is one suggestion to try and read data from a phone. This only works on an android and requires a wire between the adapter and the phone, but it’s a good start.

I started experimenting with android phone and my adapter July 2021

Here is another request from users to handle more sensors with easier terminals and combat the environments. I designed this to fit inside a specific enclosure, the same one I used for my own logger, which was now 3-4 yr old and didn’t get an update (I did update it but didn’t build a prototype). I started selling this to a research group for their projects but held back because I didn’t have many chips left (and it may be a lookalike to something else too)!

SDI-12 USB SK-16 adapter February 2022

I was literally counting my chips at this point! Fortunately I found a small batch of the processor in a smaller form factor and decided to take a risk with the supplier. So now we have a new revision. The protection diode has been replaced by a surface mount version but I’ve kept the thruhole part footprint because I bought a batch of the thruhole diodes, just in case. So if you see your board has an orange diode, or no such diode but a small black box on the top right, both are fine!

New design with smaller processor April 2022

The smaller processor takes quite a bit more time to place and I always place it before all other parts so I can turn the board around to see if I placed it perfectly or not. There aren’t any pins on the chip so it’s harder to check. Hopefully when I get a pick and place machine, I don’t have to worry about it.

Size comparison between the two processors April 2022

So there you have it! I forgot I was planning for a brief history. As a closing remark, I’ve seen the gradual shift of users of this adapter from almost entirely academic research to an increasing percentage of applications to more individual users. What’s not changed is that people love simple and inexpensive solutions to their data logging needs and I’m proud that my adapters have met their needs so far! Thanks for your time!

SDI-12 USB adapter family portrait May 2022

SDI-12 USB adapter Apr 2022 revision is out

So the new revision is finally out! The processor is so small it took me extra time to make sure it’s in the right spot. The pitch between the small processor’s pads is 0.45mm or 0.018 inches so I can’t miss by half of that, usually 1/4 of the pitch, thus 0.0044 inches of tolerance, so less than 5 mils. The following shows how small the processor is. Overall it is 4mm (0.16 inches) wide (see E).

Another change is the protection diode. To deal with constant shortage of various parts, I’ve added a surface-mount diode of the same type near the top right terminal block, the little black box. This way if I run out of the big orange diode I can use the surface mount ones. The two diodes are literally the same, just packaged differently, same for the processors. I have about a dozen or less of the current revision (Oct 2021) and will start making the new revisions since I literally will run out of both Oct 2021 revision boards and processors this week. I will have plenty of the new revision boards, enough for this year and maybe even part of next year!

Here is a close-up: