SDI-12 USB adapter manual updated

It’s been a year since I last released an update to the manual. There has been a lot of updates since last year. I finally finished it and here is the file:

Manual 2019-06-18

I included detailed descriptions of how the optional analog and digital inputs and addon boards work on the basic adapters. There are also two one-page descriptions to easily print out and refer to. Photos were added and updated. More information about deploying your logger has been added. I’ll make an effort to update my manuals twice a year to reflect changes more frequently.

SDI-12 USB adapter with larger terminals

I have recently received a few comments regarding the SDI-12 USB adapter’s terminals being too small. As a matter of fact, they are not big. They are 2.54mm (0.1″) pitch terminals. On the other hand, they can comfortable accept wires as thick as 18 AWG. I’ve rarely seen sensor cables having wires thicker than 20 AWG. Larger gauges are thinner so 18>20>22>24, AWG-wise. Also, if you have wire leads that are not tinned, you should twist the wire strands and tin the leads before inserting them into terminal blocks.

Still, having wider pitch makes it easier to insert the wire leads, including power and ground for the external power if you need that. So I made an update with 3.5mm (0.1385″) pitch terminals. I really like the size of the board and the mounting hole positions have not been changed since I made these square boards. I would like to keep them unchanged for past customers who may rely on the size to make more loggers. So here is an updated version board view (top) vs. current version (bottom):

The new 3.5mm pitch terminals will hang over the edge of the board a bit but fit the same board, after I moved the external power jumper a bit. To save space, I used a 2-pole terminal for the external power connector instead of 3-pole. The 3.5mm terminals can accept up t o16 AWG wires. I will print this board out during my next board order, which is probably a month from now. If you care to give me your opinion, please use the poll below, leave me a message, or write me a private email to zliudr@gmail.com. I will print this board on paper and make a mock-up to compare side-by-side with the current version. There is no reason both versions can’t coexist.

I also considered 5.07mm (0.2″) pitch terminals but they are just way too big to secure sensors with thinner wires. Let me know if you are interested in having this 3.5mm terminal version and why. If there is enough interest, I’ll make a batch or two.

I have a photo of 2.54mm vs. 3.5mm vs 5.07mm terminals:

2.54mm terminals are narrower than 3.5mm terminals. 5.07mm terminals are both wider and taller than the smaller versions. These are the most common terminal sizes on circuit boards.

 

 

Conversion table

2019 demo logger started on 6/3/2019

Last year’s demo logger data stream was very successful. It demonstrated the stability of my SDI-12 adapters for long-term data logging. It ran between June and October (Minnesota is cold) for 124 days. Except for occasional power outage at my house, the logger was running without a problem using the 1.5.0 logging script. This year I updated the logging script to 1.6.0 and have got a CCTV power bank to use as a backup power supply in case of power outage.

Here is a battery similar to mine that is sold on amazon.com:

The nice thing about this battery is that it gets charged via the 12V power barrel and discharged via the USB connector while it is charged. Most power banks can only be charged or discharged but not both. This one does them simultaneously. It is always charged to full when there is power in the AC. The USB port always has 5V power either from the AC or from its internal battery. Essentially this is a cheap Uninterruptible Power Supply. There is no surge protection except if your power strip has it. It is also very compact. I’ll embed it in an enclosure for a more complete enclosed logger later this month.

I expect to see next to zero down time due to this battery. This is also great for the raspberry pi since every time it loses power it could corrupt the SD card a little.

Here is the first day of data. We had some rain in the afternoon.

You can visit the live stream by clicking here.

Summer consulting projects

The summer is finally coming! This year we had a lot of snow and I was busy during the semesters. I anticipate to do some travel this summer and further develop my data logger solution but still I have the bulk of May to August open for consulting projects. Let me know if you need my help!

Update to SDI-12 USB adapters

I recently got a request to add bidirectional transceivers to my SDI-12 USB adapters to handle very long SDI-12 bus wires (result of long wires for each sensor and a large number of sensors). Currently a couple of these adapters are being tested by one customer who requested this feature but I am pretty confident with its functions and will conduct my own testing with long wires. If this is what you have in mind, I have a handful of them I’ve built as prototypes. You can go ahead and purchase a regular SDI-12 USB adapter and request one with a transceiver. I don’t have a lot of them so I can only send you one or two. If you really need more of these, I’ll need to order boards and components.

The added transceiver will not affect any program code such as my Python data logging script. It is operated transparently. When the adapter receives a complete SDI-12 command, it will turn on the transceiver and transmit the command to the SDI-12 bus. Once done with transmission, it turns the transceiver off and returns to listening mode. The transceiver in the following photo is located just to the left of the top-right 3-pole terminal block (small black rectangle with 6 pins).

Additionally, I have received several requests to use my USB adapter as a TTL/serial adapter, such as connecting to arduino or MicroPython boards, either at 5V or 3.3V. I’ve updated my board design to make those requests easier to fulfill. This option is now added to inmojo marketplace as well as to Tindie marketplace (options used to cost $2.5 and now is free).

First, if you purchase a TTL/serial only adapter, you will not get USB connection anymore (notice the missing long black chip to the right of the empty USB connector pattern). You can’t really have both active simultaneously since there is only one TTL/serial port on the processor. It’s either connected to the breakout pins for TTL/serial use, or connected to the USB chip to communicate to PC/raspberry pi. The use cases of USB vs. TTL/serial also don’t overlap. One is for those who want to use PC or raspberry pi to log data, and another who want to use MicroPython boards or Arduino boards to log data. What you will get is a 6-pin connector on the bottom of the board, at 90 degrees so it’s not pointing straight down, rather sideways. See how the wires are under the board, running along the board and the next photo for the underside. This makes it possible to stack expansion boards or have optional analog/digital input headers (12-pole block on top edge). You still need a 5V supply even if you want a 3.3V TTL/serial interface. The following photo shows a 3.3V version. Note the solder blob on the top right to the immediate left of the text “TX3”. Then the TX3 on the serial port (marked JP9 on left and Serial Port on right) is outputting 3.3V logic. Remember that the adapter’s TX or TX3 should be connected to your other board’s RX pin since the adapter’s transmit (T) goes to your other board’s receive (R).

Simple Python SDI-12 logging scrip

In case you wish to integrate the SDI-12 USB adapter into your existing Python script, here I provide a simple script to demonstrate how to get data. You can also use this script as a spring board to establish serial port communication in Python for anything else, such as talking to Arduino.

The goal is to not complicate things with the full-feature data logger script. You’ll see that the actual data logging only needs a few lines of code:

Simple sensor detection and reading (2018-12-03)

This script demonstrates how to integrate SDI-12 sensors into your existing Python data logging system by providing the minimal necessary features. It MUST run with a single sensor on the bus. For full-featured logging script, download the Data Logger script.

I’ll keep this script together with all my other scripts and provide updates to it when necessary. I’m also considering writing simple scripts for other programming languages. Do you wish to use the SDI-12 USB adapter with a programming language other than Python? Leave me a message here.

2018 5-month SDI-12 USB adapter run

I conducted a long run (5 months) on an SDI-12 sensor with a raspberry pi zero in the months of June to October to test the long-term stability of my data logging solution. I was using a regular SDI-12 USB adapter, a Decagon/METER Group soil sensor model 5TM with dielectric constant and temperature sensors and I buried it in my back yard. Over 100K data points later, the ground was freezing and I unearthed my sensor and stopped the feed. Here is an overview of the data feed. Please click the plot to see a full-size screen grab.

The top plot is dielectric constant. Each spike represents a major rainfall in my area that made the electrical conductivity of the soil shoot up and then gradually die down. Each small step is when I turned on my sprinkler system to water my lawn (smaller than the spikes but still significant within a range of a few days).

The bottom plot is ground temperature, about 20 cm in the soil. The diurnal temperature variation is greater during the summer than during the fall, as represented by the larger amplitude oscillations of temperature at the beginning of the graph and the gradual reduction of oscillation amplitudes towards the end of October.

Despite of a number of power outages (can you even see them from the graphs?), the system worked flawlessly, restarting when power was restored. In retrospect, I should have invested in a backup battery such as this one:

https://www.amazon.com/gp/product/B01M7Z9Z1N/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1

It is charged by a 12V ac adapter and provides 5V power on its USB port. When the ac power is out, it uses its internal battery to continue to provide 5V power. For a small system such as raspberry pi zero, it could power it for hours.

If you wish to see the complete data set, here is the link to download:

https://www.dropbox.com/s/4sry1pqwp9hdxuo/2018%20summer%20fall%20lawn%20data%20feeds.xlsx?dl=0

For more information on the SDI-12 adapter and data logging scripts, go to their dedicated page here:

https://liudr.wordpress.com/gadget/sdi-12-usb-adapter/

Selling my gadgets at Tindie.com

I have been looking for more market places to sell my gadgets. Recently a fellow maker recommended tindie.com. I decided to give it a try. There are more sellers and items for sale on tindie.com than inmojo market place and tindie is better maintained (by charging 4% seller fees). For now I only have 4 items listed on tindie for sale:

Tindie

It seems to work alright, although the fees have more than doubled from just the 2%-4% paypal fee for inmojo or my blog sales to 5% Tindie selling fee + 2%-4% paypal fee. I decided to not change the selling prices to compensate. Hopefully if you’re able to use inmojo market place or my sales links on my blog page, you will use them to help me save some fees and keep prices reasonable.

The tindie market place is global and has a fair amount of interesting gadgets for sale. I sometimes just browse the site looking for interesting products and inspirations from fellow makers. Check it out!

Here is a clickable badge to take you to my tindie store:
I sell on Tindie

Only 4 orders so far, a long way to build up the popularity that I have on inmojo.

More about the data logger

Enclosed logger

Now that the logger prototype is enclosed, it is a lot easier to use. I have a METER group 5TM soil sensor connected to it from the left side and 12V power to it from the bottom. Without a heavy enclosure, these cables will make it hard to set the logger flat and connect an adapter to it. Plus, I’ve started using Telnet to connect to it wirelessly so I don’t need an adapter to connect to it most of the time.

Here is the adapter I modified to use on the logger:

2018-07-26 22.33.25

I bought it from moderndevices.com (Not shown on this photo) Later I had to short a resistor and a capacitor in order to actually make it work, due to the fact that the adapter was designed for Arduino boards.

Besides Telnet, I can also upload Python sketches via FTP. I later installed a couple of jumpers to easily reset the logger since I am still developing the logging script and need to reset the logger when I make changes. I’ll install a push button instead of the jumpers when I have some time.

Everything is coming along nicely. Soon I’ll start testing 4G LTE-M connectivity of the logger. 4G LTE-M has a lower bandwidth than the regular 4G LTE on smartphones so the modem would consume less power and data plans would cost less (in Megabytes instead of in Gigabytes). The Digi XBee3 LTE-M modem is rather expensive, at $100, or $150 for a dev kit. Anyway, if you are deploying the logger in a research field close to your lab/office or really don’t mind regularly visiting remote areas to collect data logs, you may skip the modem.

Data logger is here!

After months of planning and designing, I’m excited to announce that the all-in-one SDI-12 data logger is here! I got the board printed and assembled one for testing last week. Been testing its features for several days now. I’m putting it in a nice IP66-rated enclosure for more tests and development.

This device is meant to be a one-stop-shop for data logging needs with minimal setup and learning time while my SDI-12 USB adapters are meant to add SDI-12 and other sensors to your existing datalogging PC or Raspberry Pi (assuming you’re willing to learn some Linux and the Pi).

For now, here are a couple of photos of just the board:

Board in my hand

Board with a 4-channel hi-res analog input extension board

Here is a list of features:

  • Open-source full-feature Python data logging script
  • SDI-12 translator with 4 SDI-12 sensor connectors¬†(more can be added)
  • 4 analog auto-scaling single-ended analog inputs up to 20uV precision
  • 2 analog auto-scaling differential analog inputs up to 20uV precision (alt. to 4-chn single-end)
  • Socket for optional 2G/3G/4G LTE/ZigBee/Digimesh RF modules
  • Resistance sensing with optional precision 1K or 10K pull-up resistors (0.1% 20ppm/degC)
  • Extension port allows up to 12 more precision analog and resistance sensors
  • Micro-SD card slot (up to 32GB of non-volatile program and data storage)
  • Data file download via FTP (Wi-Fi)
  • Hi-precision temperature-compensated Real Time Clock for time keeping (2-4 ppm)
  • Power cycle SDI-12 sensors to reset problematic SDI-12 sensors
  • Wi-Fi connection to upload data to servers (requires a Wi-Fi hotspot/router)
  • 4 analog single-ended analog inputs up to 5mV precision where less precision is acceptable
  • 4 digital on/off inputs (alt. to 4 5mV analog chn)
  • 4 digital pulse counters for rain gauges, anemometers etc. (alt. to 4 5vV analog chn)
  • Device temperature monitoring
  • Starter MicroSD card with logging script included
  • Xbee sleep to conserve power
  • Interactive sensor and logger setup interface
  • Optional water-proof enclosure
  • Optional wired adapter for more software development

I will add more details later.

%d bloggers like this: