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

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