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 🙂

Raspberry Pi 3A+ vs. 3B+ and all those other models

This post is intended for those that are considering starting their journeys with raspberry pis or just want to know a bit more about what raspberry pi boards offer which features. If you are a raspberry pi history buff, or raspberry pi advocate (me too but for different reasons than yours), read on as well. Leave me some comments! Not only are specifications of raspberry pi board explained, but also my take on the question “why you want a raspberry pi”. If you wish to know more about the differences between different raspberry pi boards, read my next post.

The raspberry pi folks have released another version of raspberry pi, this time, the 3A+ version. I grabbed one right away when my local electronics store got these boards in stock. While I was browsing accessories (believe me you can never have enough raspberry pi accessories), trying to find the official white/raspberry 2-color case, I overhead a couple of people talking about raspberry pi. They were just reading off the labels and that was already confusing enough for them, 3B, 3A+, 3B+, zero-W etc. I know from their voices that they were not being sarcastic, just genuinely confused what’s what. They walked away before I could strike a conversation with them. I thought, if you are just starting with raspberry pi, then what are all these designations and more importantly which board should you get?

The second question is simple, beginners should get the best model, the 3B+ model with the fastest processor + most memory + most USB ports etc. The prices only differ as little as $10. The cheaper ones are meant for more specific applications.

What you get for a rapsberry pi 3B+ is the following features for $35 (extra for required accessories I’ll talk about later). Every feature has my comments for beginners:

Raspberry Pi 3B+:

  • Quad-core 1.4GHz processor: This is a fairly decent processor not too different from the processor of a netbook around $200 (Broadcom BCM2837B0, Cortex-A53 (ARMv8) if you want the details)
  • 1GB memory: This is not a huge amount of memory but the Linux OS is not a memory hog that windows is. (LPDDR2 SDRAM to be exact)
  • Most recent version of Wi-Fi and Bluetooth: you can connect to your home Wi-Fi in seconds although Bluetooth connection can be a struggle just because Bluetooth itself is such a struggle to use (2.4GHz and 5GHz IEEE 802.11.b/g/n/ac wireless LAN, Bluetooth 4.2, BLE if you want to know)
  • Ethernet: connect to your router with a CAT-6 cable for network if you don’t want to use Wi-Fi (Gigabit Ethernet over USB 2.0 (maximum throughput 300 Mbps) to be exact)
  • Extended 40-pin GPIO header: for tinkering with electronics, such as blinking an LED or controlling motors to your custom robot (most accessories sold for raspberry pi are compatible with this pin layout)
  • Full-size HDMI: this is nice so no adapters needed, just straight HDMI cable
  • 4 USB 2.0 ports: minimally you need a keyboard-mouse combo dongle, maybe a flash drive and other devices such as a gamepad, or Arduino etc.
  • CSI camera port for connecting a Raspberry Pi camera: this connects to a camera with special interface for future projects. The camera, which is a $25 separate official accessory, comes with no enclosure or mount. You need an enclosure or separate stand to make it useful. It is also a nice thing since you can make your own design where the camera goes on your own enclosure.
  • DSI display port for connecting a Raspberry Pi touchscreen display: this connects to an official display with special interface for future projects. The display is rather expensive at $60 and needs some assembly. Again it comes without a stand, just the display and an exposed driver board. You need to buy a stand or make your own so the pro of flexibility and con of not a complete solution.
  • 4-pole stereo output and composite video port: probably not useful for most people and projects unless you want your old TVs for display.
  • Micro SD port for loading your operating system and storing data: you need a MicroSD card at least 16GB since raspberry pi has no storage, costing you extra $10.
  • 5V/2.5A DC power input: this is just a MicroUSB socket. You need a USB-to-Micro USB cable (aka Android charging cable) and a phone charger. The required power is rather high so you can’t use your old Android phone charger. I have a couple of generic AmazonBasics chargers with 2A current. Make sure you get a short fast charging cable with thick conductors. Those generic Micro-USB cables have very thin wires that drop too much voltage on themselves so what they deliver to your raspberry pi is often insufficient, causing all sorts of problems.
  • Power-over-Ethernet (PoE) support (requires separate PoE HAT): probably not a beginner’s feature. With the official accessory (a HAT), you can deliver both internet and power through a single CAT-6 cable to your raspberry pi, de-cluttering cables by a great degree. The accessory is “expensive” considering it is $20 extra dollars just to get rid off the Micro-USB charging cable. That’s not the end of it. The other side of the CAT-6 cable, the router, needs to support PoE and has PoE injector. The HAT also covers all your 40-pin headers, so no more tinkering with electronics.

So let’s see, you get a netbook-level computer for $35. Add the following accessories that you may already have:

  • $10 for 16GB+ MicroSD card
  • $10 for USB charger
  • $5 for charging cable
  • $20 for the cheapest keyboard and mouse combo
  • $5 cheap HDMI cable
  • $5 cheap case (official version is $9)

This isn’t everything. If you don’t have a monitor, that’s extra $$$. So the minimal equipment cost is $35. A realistic cost is maybe $75. If you want to set up everything from scratch, it’s $100 plus whatever the cost of a monitor. By this time, you should realize that buying a raspberry pi is not going to save you much money from buying a new PC. A PC laptop with the same if not better spec can be bought for less than $200. You can take said laptop anywhere you want and use it for hours between charges. Raspberry pi can’t do any of that! There are kits you can buy and assemble yourself to make a raspberry pi into a clumsy laptop if you wish to dish out $300+.

So apparently a raspberry pi is NOT a cheap PC replacement! You will NOT save money buy purchasing a raspberry pi! Should you still get it? If you’re deciding between a cheap computer for school and rent, you should just go with a cheap computer. If you have $100 extra money you saved up for “new cool tech things”, you should buy a raspberry pi. That’s right! Raspberry pi is a HOBBY! I don’t remember having hobbies when I was poor. That’s OK. Unless you’re really struggling to support a family, you can find money for this one hobby. Raspberry pi is not an expensive hobby. If you are interested in technology, this hobby will pay you back in many ways that exceed your already-moderate and low-risk investment. Delay that “smart phone” upgrade! All of a sudden, you have extra money! Make yourself sandwiches or some real food, use a few coupons at supermarkets, bring fruit and soda to work/school, come early and find free on-street parking.

Anyway, the real “specs” that I would like to say, are not measured in Gigabytes or GigaHertz. They are measured in more qualitative and subtle things:

  • Take a journey in popular computing technology, with millions of stops depending on what your interests are
  • Become a maker and have computers, sensors, motors, the internet do things for you, not just what you can buy from the stores
  • Be part of an extremely creative global maker community with people from all walks of life with all backgrounds that all share the love for computers and innovation

 

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.

%d bloggers like this: