Thursday, January 18, 2018

High-altitude help to prepare for low-altitude* testing

Hi there, Airball fans. Jeremy, here.

This is my "F1RST!!1!one" post on the Airball blog. I recently reached out to Ihab to offer him my help with the Airball project, and he enthusiastically accepted. I am an ex-Googler, currently on the tail-end of a year long sabbatical, mainly teaching kids robotics and working on personal projects. I am an instrument-rated private pilot and I own a DA40. Being an ex-Googler, I learned of Ihab's crazy and awesome project through internal channels, and I have been following it here since. Being an electronics hobbyist, some aspects of it caught my eye, and I've provided bits of advice (and consolation) to Ihab here and there for the past year or so.

I offered to help in whatever ways my skills and experience (or even my dogged determination to blunder my way through things) could be put to use. My first projects are all related to getting a flight-test capable Airball sensor probe up and running; reliably providing (non-glitchy) data for Ihab to continue proving the idea, evaluating designs, and building the Airball display unit. So, enough about me, onwards!

Working through some gremlins...

My first order of business was to understand the hardware Ihab had built so far, the code he had written, and help him work through some gremlins he had been experiencing with the custom circuit boards he had designed and assembled. In our discussions back and forth, I made repeated requests to Ihab for more and more specific zoomed-in steady-hands pictures of his work (and even a flatbed-scanned picture of his boards). It became clear to me that something was "just not right" with the solder mask on the boards he had been having trouble with.

I sent Ihab back this annotated picture of his board where I've called out some problems (manufactured by OSHPark – open for the larger version to make it easier to see):

The problem here is that the solder mask apertures are mis-aligned to the copper layer below it, which is exposing wispy (or substantial) little edges of the copper ground plane next to many (well, nearly all) of the SMD pads and plated through holes. This combined with Ihab's less than steady 😅 hand-soldering mean that it was exceedingly easy to bridge pretty much any connection to ground accidentally. And, so it happened. A few times. This fully explained why a previously-working board could suddenly stop working by the simple addition of an unpopulated socket – the act of soldering it in had bridged some pins to ground.

There were some other issues with the board's design that I had identified (and others that Ihab had run into earlier) so I knew I'd need to re-spin a custom board for the probe. In the meantime, though Ihab built a drive-test capable probe-on-a-stick which I wanted to make sure he could get good data back from.

Building my own breadboard rig for software development

In order to get Ihab up and running with reliable data, I planned to re-write the Arduino code powering his current hardware (and his new probe-on-a-stick), so I first ordered a few parts and built out a compatible hardware rig on a breadboard:

Once I got that up and running I could run Ihab's existing code, and started in re-writing it from scratch, based on a properly modularized codebase for the pressure sensors and the bus multiplexer. To that end, I wrote Open Source-licensed Arduino libraries (now available right in the Arduino IDE!) for the AllSensors DLHR-series pressure sensors and the Texas Instruments TCA9548A I²C multiplexer.

I was then able to make the actual Airball code much smaller, simpler, and easier to follow. I also made the measurement interrupt-driven by a timer so that the data coming from it could be sent at a much more reliable frequency (currently 20 Hz, or sending data every 50 ms). Ihab was able to get this new code up and running on his probe-on-a-stick immediately!

A new custom circuit board for the Airball probe

Once I completed the new code I got started on a redesign of the custom circuit board that goes inside the Airball probe – and hopefully hangs out on a wing soon, sipping some delicious in-flight air.

The previous board had a number of problems which we were looking to address (aside from the manufacturing problems), so the following changes were made:
  • Several mistaken connections (e.g. bridging the unused SCL and SDA pins on the multiplexer) were removed.
  • Some layout improvements were needed to help in assembly; all SMD components were moved to the top side, so that a solder paste stencil could be used, and the parts could be easily hot-air reflowed.
  • Many inconsistencies and errors were fixed in the custom-designed library parts so that the schematics and board designs are easier to work with, and look better.
  • Many more labels were added to the board and the layout was made more consistent overall.
  • The USB micro-B connector was replaced with one for which we have an actual part available, instead of the random footprint that was used previously.
  • The SDA and SCL for the I²C bus lines were re-routed so as to not be parallel to avoid crosstalk (which was actually visible on some oscilloscope captures during debugging).
  • The vias were tented (covered with with solder mask) so that they aren't exposed, the silkscreened text isn't broken, and so that the board looks nicer.
  • The corners were rounded, because all "pro" circuit boards have rounded corners. 😏
The new board however is drop-in compatible with the current design in order to allow Ihab to more quickly move on with physical integration in a flight-ready probe. Future designs will likely adjust the design more (such as integrating the ATmega32u4 microcontroller and other relevant components from the Sparkfun Fio v3 rather than placing it in a socket).

The new design still looks pretty familiar in EAGLE...



I got the boards in yesterday (manufactured by PCBWay) – Ihab made me choose a color scheme, so I went with white solder mask and black silkscreen text, and they look great:

I'll get a few boards assembled and tested soon – more to come on that!

* I live at 5,825 feet elevation, in the Virginia Range mountains southeast of Reno, Nevada. I suspect that most of the Airball flight testing will be done at 2000-3000 feet over the Central Valley, so I'll claim it's "low altitude testing". 😎

1 comment :