Second update on the new SDI-12 USB adapter

I found sometime to assemble a batch of the new boards. I populated the 12-pole terminal block on top and a row of headers on this one board for firmware development. Since not everyone will need these new features, the 12-pole block and the header for extension board or UART serial port will be optional and you can specify with your order that you need them. Adding these components adds more cost due to parts cost, assembly, and testing time. You could solder these headers yourself if you have some basic soldering skills. The UART serial port header is soldered on the underside of the board with a right-angle header to avoid the extension board and keep wires tidy.

If you need to use these boards over UART serial port such as connecting them to an Arduino or MicroPython board, please let me know with your order. I will place a solder blob between two pins on the USB serial IC so that it is placed in RESET mode to not interfere with UART serial communication with your microcontroller off board.

Here is the high-precision analog input extension board:

I assembled two extension boards, stacked them on top of the adapter, and set them to address 0 and address 1. These extension boards with come with a stacking header soldered on and four M3 standoffs, washers, and nuts. This ensures the proper spacing between boards to prevent short circuiting. I also need to trimming 20 pins on the underside of the board so that the underside of one extension board won’t touch the top side of another extension board below it. If you want, you can buy a set of 4 3-pole terminal blocks and populate them on the extension board to connect to more SDI-12 sensors, although I don’t recommend more than about 8 SDI-12 sensors from any vendor on the same adapter and extension board. A basic test running the SDI-12 + Analog USB adapter firmware on this adapter and extension board was successful, which was how I tested the extension board’s assembling quality.

My next steps are:

Extension board:

  • Expend the firmware to talk to as many as 4 such extension boards for a total of 16 high-precision analog inputs
  • Test address-setting jumpers (don’t expect any issues)
  • Populate SDI-12 headers on one extension board and test it (don’t expect any issues)

With one extension board and its address set to 0, getting high-precision analog readings is the same as using the SDI-12 + Analog USB adapter, by sending zM! and zM1! (differential reading), then using zD0! to retrieve data. With more extension boards, reading the 4 channels on board with address 1 will be zM2! and zM3! (differential reading) then the same zD0! to retrieve data. Board address 2 will have zM4! and zM5!, while board address 3 will have zM6! and zM7!. Then zM8! is reserved for the on-board basic analog channel read, while zM9! retrieves number of pulses from these channels.

Main adapter:

  • Develop firmware to read analog channels on the adapter itself (for basic analog signals at around 5mV precision).
  • Develop firmware to read pulses from the analog channels on the adapter itself (for rain gauges, flow meters etc. that output pulses).

Then I’ll test everything with a test rig. Stay tuned!

Upgrades to the SDI-12 USB adapter

I have been working on some updates to the SDI-12 USB adapter so that it would add more features to a data logging system. So far, I’ve updated the PCB (left board) to include additional connectors. The top of the board will have 4 analog channels. This is not as accurate as the red SDI-12 + Analog USB adapter boards. The SDI-12 + Analog USB adapter has practical accuracy of 20 microvolts and has differential input channels. The 4 channels on the basic SDI-12 USB adapter have accuracy of about 5 millivolts. Also there is not a voltage reference so the measurement will be affected by the USB voltage, which is only nominally 5V. Nevertheless, if there are some sensors that output voltages in 0-5V range you want to log with moderate accuracy, such as a potentiometer, or a thermistor for approximate temperature calculation, you can use these channels. The breakout looks the same as the SDI-12 + Analog USB adapter. There are no serial resistors so you have to add yours if you want to convert resistance to voltage.

I will release a new firmware version on these newer boards. At the same time, I am considering adding digital counting features to these analog channels so if someone wants to count pulses such as flow meters or rain gauges, they can use these channels for such purpose. I plan to develop this part in the summer.

Another connector (bottom one on left board) I have added will connect the adapter to an analog extension board (right board), which sports the same 20 microvolt accuracy as the SDI-12 + Analog USB adapter, in case you want to add these channels say for pyronometers or other low voltage and high precision measurements after initially getting the basic adapter. You can stack up to 4 such analog extension boards. Each board has an address jumper (right board, white rectangle) for one of the four addresses the analog-to-digital converter supports. That gives you a total of 16 high-precision analog input channels. Each extension board also comes with a few additional connectors for SDI-12 sensors as an option. You can more easily wire up more SDI-12 sensors to the adapter. I don’t recommend wiring up more than 6-8 SDI-12 sensors to the same adapter. Some sensors come with strong pull-down resistors. When too many of them are wired to the same adapter, they may prevent some other sensors from correctly communicating on the bus.

The last connector (left board middle) I have added will help developers using MicroPython platforms easily connect to it via serial ports, since most MicroPython boards don’t have USB hosts. I will start shipping these newer SDI-12 USB adapter boards soon although new firmware that makes use of these features will have to wait until later.

Will this affect your existing projects? Very unlikely. The new adapter has all the features of the old adapter. The SDI-12 + Analog adapter will still be around since it is a nice compact form factor. The new SDI-12 adapter plus the analog extension board will be approximately the same price as as the SDI-12 + Analog adapter.

More SDI-12 sensors tested with the adapters

As more researchers and developers are using my SDI-12 USB adapters, more sensors have been tested to run with the adapter. Here are some of the new additions recently:

Gill Instruments:

  • WindSonic Ultrasonic Wind Sensor (Thanks MG!)


  • HydraSCOUT multi-sensor soil moisture and temperature probe (Thanks Bertrand!)


  • Accubar SDI-12 Barometric Pressure Sensor, Model 5600-0120-3 (Thanks Meidad!)


  • Starflow QSD Ultrasonic Doppler Velocity And Depth sensor (Thanks Yiren!)

Since Decagon has merged with a German company UMS into METER Group, some of their product lines are renamed and other products are added to these new lines. Here is a list of tested sensors from them:

METER group (formally Decagon and UMS):

  • Atmos 22 (DS-2) (Sonic Anemometer)
  • Atmos 14 (VP-4) (temperature, vapor pressure, relative humidity sensor)
  • Atmos 41 weather station (solar radiation, precipitation, vapor pressure, relative humidity, air temperature, barometric pressor, horizontal wind speed, wind gust, wind direction, compass heading, tilt, lightning strike count, lightning average distance) (Thanks CD!)
  • PRI (spectral reflectance sensor)
  • NDVI SRS (spectral reflectance sensor)
  • GS3 (Ruggedized Soil Moisture, Temperature, and Electrical Conductivity Sensor)
  • TEROS 21 (MPS-6) (Calibrated Water Potential Sensor)
  • ECH2O 5TE (5TE) (Volumetric Water Content, Electrical Conductivity, and Temperature)
  • ECH2O 5TM (5TM) (Soil Moisture and Temperature Sensor)

If you are using the SDI-12 USB adapters, I’d love to include your SDI-12 sensors on my list of tested sensors. Leave me a message.

Interesting indoor temperature data

As a demonstration for my SDI-12 USB adapter, I have a raspberry pi zero-w log temperature from a Decagon (METER group) 5TM soil temperature probe using the adapter. The probe is not buried in soil so it is just sensing the indoor temperature. The sensor is located away from direct sun light, just in case you wonder. Here are two snapshots of the data stream:



Except for the daily dip-and-rise combinations (why?), the temperature of my home is rather constant near 21.5 Degree Celsius. That is good to know that there is no issue with my thermostat in stabilizing temperature. So why the daily dip-and-rise combinations? The top graph was from Sunday. Notice two dip-and-rise combinations on the plot instead of one? The lowest points occurred around 2:30pm and 8:30pm but that’s not important. What’s important are when the dips started, around 1pm and 7pm. Those were the times we were cooking! The extra heat from the kitchen must have triggered the thermostat to turn off the heater, which made the room temperature drop before it kicked back in and heated the room back up. Without the heater on, the room drops steadily by 0.3 degC per hour. When heat is turned back on, the heater raises temperature at 0.5 degC per hour. You can also see that we were cooking dinner every night. Who would have thought that by posting room temperature online they are giving up a lot of privacy? 🙂

SDI-12 USB adapter and manual updates

If you have been looking at the SDI-12 USB adapters lately, you may have noticed that the manual got updated a bunch of times between February and March (latest version being 3/19/2018). I’ve been updating the manual to:

1. Introduce the newer SDI-12 USB adapter (black) that replaced the original adapter (green).

Original SDI-12 USB adapter since 2015:


Updated SDI-12 USB adapter:

SDI-12 USB + adapter

Notice that now the updated adapter is the same size as the other flavors of the adapters, such as the SDI-12 + Analog adapter and the SDI-12 + GPS adapter. These are the features the updated adapter has:

  • Four SDI-12 sensor connectors
  • External power connection and sensor power selector (5V USB or external)

2. I updated several sections of the manual to make the manual easier to understand.

  • Bookmarks in the .PDF file
  • More detailed description of the updated adapter
  • Details of how to configure an SDI-12 adapter
  • Other places have been tidied up as well

By the way, did I mention that I reduced all my adapters by $5 to $10?

  • SDI-12 USB adapter (updated) $45 ($5 cheaper)
  • SDI-12 + GPS USB adapter $60 ($10 cheaper)
  • SDI-12 + Analog USB adapter $80 ($10 cheaper)
  • There will be discounts for bulk purchases, such as 10, 20, 50 etc. Please contact me if you intend to buy more adapters so I can send you an accurate quote of prices with discounts and shipping cost.
  • If you still need the green adapter for its simplicity or form factor, you can contact me to do bulk orders, 10 adapters or more.
  • If you need something else to be on your adapter to connect to a particular sensor, contact me to see how I can help you achieve that. The sensor would definitely not be SDI-12 but I’ll make it so that reading from it is just like reading from any other SDI-12 sensor so your program needs little to no change.

Since I am assembling and testing these adapters myself and use trustworthy US parts vendors, I will have to get more efficient in my work to make up the difference. I made some improvements on a reflow oven that I will be using for new batches of adapters. I hope the effort pays off. I would be able to assemble a batch, load into the reflow oven, and assemble the next batch or do cleanup or soldering thru-hole components such as the screw terminal blocks while the oven reflows automatically. I’ve been using a manual control (Variac transformer) for reflow for the past several years, which requires constant attention.

One negative impact from the US postal service, since the end of January 2018, USPS will no longer ship merchandise via international first-class letter. The only alternative is first-class package, which is a much more expensive service. A package containing one adapter that used to cost less than $4 will now cost $9 to ship to Canada (come on!) or $14 to most of the rest of the world. I felt that I’m being squeezed out of the international market by the postal service. The only upside is that now the package seems to come with complete tracking in both countries. I made a small change to the first-item shipping cost and additional item shipping cost.

I am also considering designing a complete low-cost data-logging system so it would be more integrated than the adapters. The adapters have proved to be very successful indeed. It shows up as number-1 search for keywords “SDI-12 adapter” or “SDI-12 USB adapter”. I didn’t pay google anything for the free advertisement. Everyone that searched and read my blog helped spread the word! Thank you!

I plan to keep improving the adapters so that anyone that is integrating SDI-12 sensors will find it easy to just get an adapter and add SDI-12 sensors. For anyone else that is interested in low-cost data logging solutions but are more interested in a turn-key solution instead of investing time and effort in learning python programming or raspberry pi, this logger will make things easy for you!

Any comments, suggestions, your use case, including what sensors and telemetry solutions you want that you would like to share? Leave a comment! The design of the data logger is still very fluid so that your opinions WILL influence its development!

The development of a turn-key solution WILL positively affect the adapter development as well. I expect to have a 3-prone approach ultimately: USB adapters to add SDI-12 sensors to existing logger projects that use computers/raspberry pi, serial dongles/shields to do the same for Arduino-based existing logger projects, and a complete logger for those seeking turn-key solutions.

Have a nice spring/fall day!

SDI-12 USB adapter manual and logging script updated

Due to the discontinuation of, I moved data logging to

I have other updates that I rolled up in the manual, such as more details on telemetry. New manual is posted on SDI-12 USB adapter page as well as the updated data logging code. Here is a snapshot of data I logged to

The full data stream is here:

Upload data to ThingSpeak

I have been using sparkfun’s Phant server for data upload and retrieval for a few years since they started the service. The service was easy to use and was free. Several months back they discontinued the service, unfortunately. I started looking for suitable alternatives.

Sparkfun recommended three, ThingSpeak, Cayenne, and Blynk. I went ahead and did some research on these services. My goal is to be able to log data online and later retrieve them and possibly visualize them using google charts, like before. I am not at the moment interested in automating my home with actuators or smart phone apps to turn on and off my hall lights. Here are my findings and why I decided that ThingSpeak was the best fit. If you are logging data for later processing or visualization, read on.

This service is provided by the company behind Matlab. I am not a fan of expensive commercial data manipulation tools such as Matlab but they do have a fair amount of business between universities and industry so their service might be a safer way to go against sudden discontinuation of service such as sparkfun. Basically you create a data stream and send data to the stream. It’s very similar to sparkfun. You can also retrieve your data, possibly good for running your data through google chart. They also provide some basic graphs and matlab analysis tools that I have yet tried.

There are two types of application programming interfaces (APIs) you can use: a REST API, and an MQTT API.

The REST API is based on HTTP so it’s very similar to existing services elsewhere. You use HTTP GET or POST command to send data using an API key, like a private key with sparkfun. Your data are limited to up eight values per data point. If you need more, then you need to create more streams. They also have a bulk update feature that you can use to send multiple sets of data instead of one set of data. This method allows a device to collect data and sleep in between data points. Then when it collects a fair amount of data, it connects to the Internet and sends all data in one shot. It saves power and network bandwidth. You can also create and modify the properties of streams with this API.

With the MQTT API, the underlying protocol is TCP/IP. There is no acknowledgement of data received and it is intended for low-powered devices to just wake up, take data, send it out, and go back to sleep. From my tests, data sent via this method were lost over 50% of the time. Unless future holds differently, I am not recommending this API.

Getting start is easy with ThingSpeak. Just set up an account and follow their tutorial to create a new data stream. Then the following bash code should get you started posting code:

curl ""

You can post any number of field values between 1 and 8. You will receive a zero as a positive response. Then you will see your results like the plot on the top of this page.

I have updated my Python data logging code to use instead of the now discontinued The plot in this post is from Here is a link to the data stream:

SDI-12 + GPS USB adapter

After a final revision, I am happy to release the SDI-12 GPS USB adapter! This adapter is the latest one to add to the line of SDI-12 USB adapters. In August 2015, I released my first SDI-12 USB adapter with this post. It was an idea that I thought about while traveling. I was working on data logger designs that use SDI-12 sensors and felt that interacting with SDI-12 sensors is not easy for agricultural or water resource researchers. Having an adapter that connects a computer to an SDI-12 sensor and reads measurements directly from the sensor would be very useful. So I made the adapter to simplify lab tests and data logger deployments. Since then, I’ve written free Python scripts for basic data logging (read the SDI-12 USB adapter main page). The demand for the adapter since then has been high enough to support my continued update on the data logging script, expanding from PC/Mac/Linux to single-board computers such as Raspberry Pi and Beagle Bone Bone. I have also expanded the adapter with an SDI-12 + Analog USB adapter that includes four high-precision analog inputs.

Later I found some need to add GPS modules to the existing SDI-12 USB adapter so that mobile data loggers such as those mounted on tractors will be able to produce with Geo-tagged data that can be made into maps. After some initial struggle using the new ATMEGA328PB processor that sports two hardware serial ports (one to talk to PC and the other with GPS), I realized that the GPS module actually interfered with the processor and caused program freeze-up. Then I made some hardware revisions and was able to prevent interference. It turned out that the new ATMEGA328PB processor that I used in my initial prototype was especially susceptible to interference when I used its second hardware serial port that have the same pins as the SPI pins that program the processor. So I switched to the ATMEGA1284P processor that I have been using on my open source physics laboratory design.

After extensive tests, I am happy to add this adapter to the product line. You can purchase (small quantity at the moment) at or on my blog (in the middle of the page). The adapter requires a separate purchase of the GPS module that Adafruit makes and sells, the Ultimate GPS module part number 746. You only need to solder four pins on the GPS module, the TX, RX, GND, and VIN, and the same pins on the adapter. Since the GPS module is relatively expensive, I can’t stock them up. But if you really need it assembled, you may have a GPS unit sent to me and a few extra dollars for assembly and testing. Just contact me once you make a purchase if you want assembly.

Free assistance on data logger projects

Summer is finally coming to my backyard and my spring semester is coming to an end. Thinking ahead (skipping over all the final papers to grade), with the whole summer ahead of me, starting 5/15/17, I can provide some free assistance to those that are working on your data logger projects using my devices, such as the SDI-12 data logging shield and SDI-12 USB adapters.

My goal is to get you started so you can quickly work on your own after my help. I’ve used Teamviewer to remotely help people install software, test their adapters with their own sensors, and modified my Python data logging code in the past. As long as I have some time to spare, I am willing to keep providing help. I appreciate it if you could help me spread the word. I might ask you to provide a blurb such as what sensors you use and what type of project you are working on etc. as a form of exchange for my free help.

SDi-12 + GPS USB adapter test

I was able to perform some tests on the new SDI-12 + GPS USB adapter. I don’t have the GPS module but do have an arduino shield that features the same GolbalTol GPS module so I used some jumper wires to connect the GPS to the adapter. I did tests last night and overnight. Things are looking good. Here are some results:


To get longitude and latitude, you will issue “zM!”. The return values are z(long)(lat)\r\n. The longitude and latitude are both in standard NMEA format of 100*(degree.minute). For instance, a longitude of -9412.3411 means -(94 degrees 12.3411 minutes).

To get day, month, and year, you will issue “zM1!”. The return value is again in standard NMEA format of +DDMMYY. For example, a date of +190317 means the 19th of March, 2017.

To get hour, minute, and second, you will issue “zM2!”. The return value is also in standard NMEA format of +hhmmss. For example, a time of +123507 means 12:35:07 in 24hr style so it is 12:35:07 PM for those that use 12hr style.

Sample commands (in red) and returns (in green):

Single-sensor measurement:


Concurrent measurement:


%d bloggers like this: