Data logging with Wipy and SDI-12 dongle

If you have heard of the Python programming language and its easy-to-learn and easy-to-use fyou’ll be pleasantly surprised that someone has successfully implemented Python on microcontrollers a few years ago, appropriately named MicroPython! He has developed his own MicroPython board and ported the code to a number of similar microcontrollers. Imagine a low-power microcontroller with “lots” of memory (compared with Arduino) happily running Python code that talks to the internet etc. I’ll start writing about MicroPython and how you may use it for DIY electronics and data logging in a number of posts but this post is an announcement related to MicroPython and the SDI-12 serial dongle:

This dongle has a similar set of features as the SDI-12 USB adapters but lacks the USB connectivity, just having serial connection to arduino. Since all MicroPython compatible boards have serial ports and library to run the port, you can connect a MicroPython compatible board to one of these dongles and run almost the same Python data logging code I provide to SDI-12 USB adapters. Here is the first successful attempt that made it happen. Jason is a developer on the Wipy platform, which is a microcontroller supporting MicroPython. He is developing a data logger. In order to talk to SDI-12 sensors, he got one of my SDI-12 dongles. The Wipy board has serial ports but at 3.3V logic. The dongle has 5V logic. I built a simple voltage divider on the dongle for him and he was able to communicate with it using the Wipy board. Here is the code that he wishes to share:

Wipy_logger.py

This script runs on Wipy (or similar MicroPython platforms) and logs data from SDI-12 sensors to the on-board SD card. Here is what a Wipy board V 3.0 looks:

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:

slide2

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!

JLCPCB – A new PCB fabrication house

I was recently approached by a new PCB fabrication house JLCPCB (technically they’ve been in business for some time but just started advertising to USA customers) to write some reviews on their service. Given my experience designing PCB and using PCB fabrication services (batchpcb, seeedstudio, iteadstudio, oshpark etc.) over the past decade, writing a review shouldn’t be too hard. If they are any good, I could use their service myself and recommend them to others in the hobby electronics community. So I sent them two of my designs and got them back relatively fast, with DHL. Since I still have some older versions of one of the boards, I could make a comparison with the two fabrication services. JLCPCB has offered their service free of charge for the exchange of a fair review. So I decide to not mention which competition I pitched JLCPCB against. What I primarily looked at was how accurately each layer of board is printed and how well they are aligned with one another from each fab service. JLCPCB‘s results are very good. Its competition, a long-standing name among DIYers, doesn’t look quite as good.

In case you’re still learning how to design PCBs, especially surface-mount components, here are some terms I’m going to use:

Top layer: this logic layer contains all copper traces, pads, and vias on the top side of the two-sided circuit board. A process is used to protect all aforementioned features specified in this layer when the entire board is etched in acid. If the process isn’t accurate, then your features aren’t exactly where they are supposed to be.

Top solder paste: this logic layer contains only pads for surface-mount components. It is a subset of top layer and is used to generate stencils for reflow soldering. Again if the fabrication isn’t very good, these features tend to not align with other features.

Top solder resist: this logic layer contains similar information to the pads and vias contained in top layer but the sizes of the features in this layer are slightly enlarged to a peel-back amount so they don’t accidentally apply solder resist on top of your pads where solder should go. Solder resist is a lacquer that prevents solder from adhering to the copper traces. They also protect the bare copper from rusting away. You will want them to be applied to all your traces and only leave the pads exposed so later process will cover them with a very thin layer of solder (the shiny looking stuff) and you then reflow solder your components to these pads. If the registration of this layer of lacquer is not well registered with the top layer, you will see visually under a magnifier. This is why fabrication houses usually do quite a bit of peel-back so they leave room for themselves to be less-aligned but still the lacquer won’t cover up the pads.

The following images are from an FTDI chip (FT232RL). The pitch was the finest on my board so I selected these pads for comparison of how well the different layers register with one another on these two service providers.

Top: JLCPCB Bottom: competition


They look similar. I’ve unfortunately scratched the pads on the competition’s board. I applied solder paste to that board and later cleaned the paste off so I could photograph its pads. My bad.
On a closer look there is a difference:

SMD pads (SSOP 0.65mm pitch):

Top: JLCPCB Bottom: competition
You can see that JLCPCB‘s boards (top) have SMD pads (shiny metal pads) that are very symmetrically situated inside the solder-resist masks (slightly larger dark rectangle). The solder resist also goes closer to the board than its competition. These are manufactured from the same designs! The engineers at the competition must have increased the peel-off (sizes of feature not covered by solder resists) to offset their less-perfect layer registrations and/or accuracy on each layer. As you can see, not all pads and their solder resist have the same offset. Some look better than others. This is clear with the second to the last pad and the last pad. The pads are not centered at all. This is very consistent across the board made by competition. JLCPCB has better overall registration than competition. Better registration translates into better chance to prevent solder bridges and less chances to reworking on your boards after you reflow them, that means time and money saved.

Thru-hole pads (o.1″ spacing):

Top: JLCPCB Bottom: competition

The top one has less size solder resist layer, the edges of the red lacquer surrounding the shiny pads (almost same size as the thru-hole pads) and very symmetrical. The competition has again increased the solder resist layer and couldn’t keep the layer registered well with the pad.

The via to the right of the bottom right through hole pin hole will be compared next. On JLCPCB‘s board, its solder resist has 2.8mm diameter when displayed on my computer monitor. On the competition board, it is 3.1mm. The images were taken under a high-magnification lens and I checked the images to be exactly the same zoom, measuring the same across the same features on screen. What this means is that if you have a lot of vias in one area, very close to one another, you may get some solder bridges between the vias if there is not enough solder resist to separate them. Not a problem on this board but a problem if you happen to have vias very close and also close to thru-hole components. You solder the thru-hole and inevitably fill the adjacent vias with some solder. This could short vias.

Overlay (white texts):

The quality of the white overlay texts are about the same between the two fabricators, although at some places you see one board having better quality than the other board while at different places the quality is reversed. This is not a crucial feature to look at though.

JLCPCB: top, Competition: bottom

With the explanation above, you can easily distinguish these two photos. The bottom one has so much space between the edges of the shiny pads and the red lacquer (less qualty). The top one has so much less and so symmetric.

So the results are clear. JLCPCB is a pretty decent PCB fab house and I will order my next batch from them. The shipping cost is also slightly less than competition if you use DHL. I always use DHL. They do a good job delivering to small cities like the one I live in!

Here is a link to JLCPCB’s website:

www.jlcpcb.com

I am not getting any commissions for your purchases. The link has no “trackers” 🙂

P.S.: I had a research student hand solder this board (yes, every single chip resistor and the FTDI chip) as a good test of his skills and it turned out fine. This is a proof that having the right size solder resist helps, really. This is what the board looks like after assembly: