SDI-12 USB adapter with larger terminals

After some design and prototyping, now I have a newer version of the SDI-12 USB adapter that features larger 3.5mm terminals. The original 2.54mm terminals can accommodate 18AWG wires and the new 3.5mm terminals can accommodate 16AWG wires. I’ve never seen sensor wires that thick although you could get some really thick wires from AC adapters. The bigger terminals makes installing wires easier with the additional spacing between pins, besides they accept slightly thicker wires. The screws are also slightly bigger, making the terminals sturdier. I have to make the terminals overhang a millimeter or so to fit them on the same board edges. I’ve kept the 2.54mm terminals for the optional analog and digital input terminals on the top edge. I moved the power selector to fit the larger terminals on the left. Otherwise, the height of the terminals is the same as before and you won’t notice a difference unless you look carefully. For example, I no longer have a 3-pole terminal for the external power. Instead, I have a 2-pole terminal to save space. Here are some photos:

The new prototype held diagonally in my hand. I had the board printed in black matte instead of regular black glossy. This has made part placement and inspection easier since there is no longer a glare from the glossy surface. Besides the terminals, I also added a footprint for the transceiver and a solder jumper. Most people will not need a transceiver. I’ve tested my adapters without this added transceiver with cable up to 100ft (30m) without visible signal degradation. You only need it if you have a total data cable length significantly greater than 100ft(30m).

Here is a side view photo of the prototype:

Here are some comparisons between the current version (top) and the new prototype (bottom):

Since the spacing is no longer 2.54mm, like the pin headers, I will have to make a header for testing with SDI-12 sensors after assembly. I also need to find proper source to buy the larger terminals in quantity, and print out more than a handful of boards. It will take a while before I am ready to sell these in my stores.

I have also designed a 3.5mm version of the SDI-12 + Analog USB adapter but haven’t built a prototype yet. It should look the same as the basic adapter though.

2019 summer run update

The 2019 summer SDI-12 USB adapter data logging run has been relatively smoothly but there were a few issues that are worth mentioning.

1. Battery

The battery that I recommended as a backup battery for raspberry pi (see photo below) needs to be used with some consideration:

I have not tested how long the charge lasts when it is powering a raspberry pi 3B (I used a raspberry pi zero last year but had to use some USB OTG adapter and a USB hub with Ethernet dongle etc. so I decided to throw my 3B in since I have a 3B+ now). What I thought should happen is that the battery will eventually drain completely after hours of power outage but once power is back on, it should turn on the raspberry pi right away. That turned out to be not the case. The battery seems to need about half an hour of charge time after it has been drained before it can power the raspberry pi 3B with enough stability that it would run normally. Within the first half hours of initial charging after a power outage, the raspberry pi was not stable and I couldn’t log in to it. The logging script didn’t run either. I ended up unplugging the pi and let the battery charge for 30 minutes and plugged the pi back in.

In case you want to prevent this issue, which may or may not affect the integrity of the pi’s operating system, you need to buy a backup battery with proper capacity. Mine is only 3000mAh, since I have the logger in my garage, only expecting at most hours of power outage:

https://www.amazon.com/TalentCell-Rechargeable-Amplifier-Multi-led-Indicator/dp/B00MHNQIR2/

There are 6000mAh and 12000mAh versions that will definitely address longer periods of power outage. If I was only expecting up to a few hours of power outage, then how come my logger drained the battery, twice?

The issue was actually with the power outlet it was plugged in, which is protected by an upstream Ground Fault Circuit Interrupter (GFCI) outlet. When I bought the house, there was no GFCI outlet in the garage! I wonder how those previous owners never thought about installing one. So I replaced the outlet in the garage with a GFCI outlet, which protects all downstream outlets. The outlet my logger is plugged in is downstream of the GFCI outlet thus is protected against ground fault, which means shorting the hot with the ground. It was the right move but unfortunately not enough. Outside my garage there is an outdoor outlet with some “outdoorish” cover. We had some VERY heavy downpours in the past month.

As you can see on the plot below, the two high spikes on soil dielectric constant correspond to two heavy rain falls:

The vertical blue lines simply indicate how quickly the rain fall caused soil’s dielectric constant to first rise then later drop (exponentially). The two almost horizontal blue lines immediately following the spikes were periods of power loss. I didn’t check my online plots and was surprised to find that the plot stopped. I guess I could use the spikes to estimate my battery’s run time to be between 4 hours and 13 hours, probably 4 hours. The following soil temperature plot during the same period shows the power outages more clearly:

So what caused the GFCI outlet to trip? It turned out to be the outdoor outlet. I took it apart. Here is what it looks like:

The gasket on the left wasn’t doing enough to protect the outlet. You can see the outlet’s rusted top side (the outlet was mounted horizontally). This must have been caused by rain water seeping into the outlet, causing ground fault.

I do recall a couple of times after bad weather our garage lost power (circuit breaker). That must have been before I installed the GFCI outlet. So in order to address the real issue that the outdoor outlet is causing, I purchased a better cover and installed a separate GFCI outlet in the power box. To be honest, the brick veneer didn’t help. It was harder to seal against due to its rough surface but the new cover with a new gasket hopefully will work better. I’ll later apply some ready-to-use cement on the top of the cover to seal any possible leaks. With this new GFCI outlet, hopefully even when it is shorted, it would act before the upstream one acts and prevents the logger from losing power for extended time again. Here is how it looks:

Next time I will write about my experience running the logging script automatically with the latest raspbian distribution.

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!

Video extension cables and standoffs

If you ever opened up a computer tower, you know that there are many different size screws. You also may realize that some screws aren’t even imperial or English, which is what we use in USA. Same situation outside a computer. A video cable such as VGA or DVI for instance, usually has two screws on the connectors so you can screw the end to your computer. What happens if you use an extension cable? You get screws on both the regular cable and extension cable, hardly any use when both sides are screws. I recently had to extend a VGA cable and was faced with this nonsense. The connectors on the regular cable and extension cable will easily get loose unless I tape them together. So I started looking for standoffs that can bridge two screws together. It turns out that these screws aren’t imperial either. They are M3! Good thing I grabbed a few M3 standoffs with threads on both sides so I just used two of those. Next time you want a perfectly secure extension cable, look for M3 standoffs. The bronze standoffs are in between two VGA connectors, both of which feature screws.

2019-02-12 10.53.44

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).

Raspberry pi data logging sd card image updated

To help people getting started using raspberry pi to log data with my SDI-12 USB adapters, I’ve been offering ready-to-go MicroSD cards with raspberry pi system image. You can pop it into your raspberry pi and get started with all the necessary tools installed, including the python logging script. Every few months, I update the image so you get the most recent operating system and the python logging script. This time I updated the image in late December. I just recently tested it on a raspberry pi 3A+ model and it works. I guess it’s no surprise. My image works on 3B and 3B+, Zero and ZeroW. The 3A+ has the same processor as 3B+ so it worked right away. I remember when Zero came out, the image I had didn’t work on it since it has a different processor than 3B (latest model then). I had to put the image in a 3B and run updates. After that it worked. It’s been a while since the raspberry pi folks designed the 3B model. I wonder if they are ready to release a model 4B later this year. I am hoping to see better performance but also hoping to see programmatic ways to dial back the performance for battery operation so the pi can enter a low-power mode while collecting data and spring back to full-throttle if it needs to crunch data (program controls power mode) or handle a user remote login (user select power mode). Anyway, if you’re stuck with an sd card having a working older image, all you have to do is to update:

sudo apt-get update
sudo apt-get upgrade

In case you need more details regarding updating your raspberry pi, here is the official post:

https://www.raspberrypi.org/documentation/raspbian/updating.md

 

Raspberry pi boards comparison

In a previous post, I explained the most recent model of raspberry pi board, the 3B+ board, and my take on why you want a raspberry pi. This post is about comparing the different models. Again, if you are taking on the raspberry pi hobby, get the 3B+ with quad-core 1.4GHz processor, 1GB memory, and most recent Wi-Fi/Bluetooth on board. It’s easy and fun to use. Other boards are made for specific reasons or tasks.

The following is the most popular one of all, the model 3B+:

Next, let’s see the most recent model, the model 3A+:

If you compare them side by side, you’ll notice that 3A+ is almost the same as the 3A+ except it is missing the stuff on top of the photo:

Here is zero W. It is only about a third of the size of the 3B+ or half the size of the 3A+:

How do these boards compare?

A VS. B VS. Zero

There are three models of raspberry pi boards at the time of this post A, B, and Zero. Please don’t attempt to buy the Compute modules. They are out of the general discussion and only are relevant to circuit designers with enough skill levels to integrate into their products.

Originally there were only two models, the model A, the cheaper with less features and the model B, the full-feature one. There are three generations of them already, gen 1, 2, and 3. Major improvements were made between generations, such as doubling memory and using a quad-core in gen 2 or adding wifi/BT in gen 3. When they make smaller improvements to their designs, such as using a faster processor or better Wi-Fi module, they will put a “+” after the model, such as 3B is superseded by 3B+ with faster processor, faster ethernet, more recent Wi-Fi and Bluetooth connectivity, and more power-hungry than ever.

The model B boards are the main stream boards. The model A boards have less memory, single USB port and no Ethernet, and at times not offered to contrast every model B offering. They have always kept the $35 price tag for B and less for A, such as $20 or $25. The intent of model A is to have it run a project that doesn’t need all the USB ports or Ethernet. Say you want to run some slides on a big screen, you don’t really need more than just the processor and sd card. USB ports or Ethernet are optional. You can save money with model A. Last time I visited Minnesota Institute of Art, I took a peak behind their big screens. They were mostly using model B (probably gen 2 or gen 3, not the plus with metal heat sinks)! I couldn’t take a photo or investigate more though. It’s an art museum any. People go there to see art, not raspberry pi?! Anyway, that would be a use case for model A.

Now (in 2015) the raspberry pi folks wanted to challenge themselves to come up with a computer as cheap as $5 (again accessories count as extra), possibly because many other folks started spinning their own boards with similar specs to raspberry pi and many advertised for low prices. So they did it with model Zero, cramming all that raspberry pi goodness on a board only a third the size of a regular pi. Apparently it is not a prequel to gen 1. They slapped the same processor their gen 1 was using and did away with USB or Ethernet, resulting in a much smaller (only on the look) board that they are selling for $5. Is it really that cheap? I’ll never know. They only sell you limited quantities, such as 1 per customer.

Apparently their successfully answered the challenge to themselves and the community was clamoring about it. They designed a sequel, the Zero-W, with a Wi-Fi/BT on board, same as the Wi-F-/BT on their 3B+, for $10 each. This is better than the Zero, since you can’t really interact with the Zero easily. You first need a mini-HDMI to HDMI adapter to bring out the video. Then you need a USB-otg adapter to hook up a keyboard/mouse combo. If you have the Zero, you have no network! You can install nothing or update nothing. You need to get a USB hub and a USB-Ethernet dongle, for another $10 or more. This newer model is again on limited stock. You can buy more than one if you wish to pay a premium of $15 each, or $20 each if you wish to get more than half a dozen. Definitely these Zero models are NOT for any practical projects that need to be deployed at more than a few locations.

Performance

If you wish to use a raspberry pi as a desktop computer, definitely go with 3B+. 1A and 1B are both obsolete, having single-core sub GHz processors. My oldest raspberry pi is a 1B. It’s painfully slow as a general-purpose computer. I was disappointed at it since the original goal of this device is to teach kids computing. The two mounting holes that were haphazardly placed on the board like an afterthought also bothered me. I did a few projects on it. But nowadays it is sitting idling in its case, inside my box of raspberry pi stuff. In 2014, they cleaned up the board and pushed out 1B+. It’s much easier on the look, and to use, since it comes with 4 USB ports and 4 symmetric mounting holes. This footprint has become the standard for the rest of their models A and B boards. The mounting holes and connectors would be at the same location across multiple generations, and they don’t plan to change. Same processor is used on the model Zero series so far, with a single-core processor now overclocked to 1GHz and 512 MB ram. I do use one of them, the one without Wi-Fi, as a data logger. I had to tether all the wires, USB-otg, to a USB hub, then a USB-Ethernet dongle and a sensor on USB. But since it’s sitting in my garage headless (no keyboard or monitor), I don’t need HDMI or keyboards. I could use the Zero W but still have to have the same stuff due to the sensor on a USB port. Gen 2 only has 2B, no 2A. It’s obsolete as well although you can still buy them. They are better in desktop performance already but would require Wi-Fi dongle to connect to home network. I used to tether my 2B to an Ethernet port on my home Wi-Fi router. Now it’s sitting inside another box with a preloaded program that I might run as a demo. 3B gives you pretty decent desktop performance, comparable to a netbook with Atom processors. I got a retropie running on it, emulating old video game consoles. It has no problem running those emulations. The 3B+ is pretty nice. I use it when I need to get some work done on it. I now have a 3A+, which sports the same processor as the 3B+, with half the memory. It runs fine. I just want one for my small collection and in case I need it for something (probably never, other than blogging about it).

Projects

There are some projects that you need the smaller footprints and you don’t mind soldering/desoldering, you go with ZeroW. Performance is low, as space is premium for your project. You can add more USB ports with custom extension boards but the size and price both go up. You can connect a camera to it too. If you rely on adapter wires to get to the USB port for instance, then your project size will likely double due to the difficulty of bending that adapter to fit in place. Trust me, trying to organize cables with “huge” connectors such as Micro-USB is no fun.

If your project is not limited by size as much, but doesn’t benefit from having more than one USB port, such as a big TV slide show/display case/kiosk, and you potentially want to deploy a number of them, go with model A (3A+). You don’t need the added USB port, Ethernet, or double memory for those tasks.

If you want more flexibility for your project, go with the model B (3B+). You won’t be disappointed. There is a chance you can trim down the requirements into 3A+ in case you deploy your project in many locations.

Note: all photo credits to raspberrypi.org or myself 🙂

%d bloggers like this: