Friday, April 21, 2023

Flakey flakes

It's hilarious how much of a project like this is about debugging random flakes, rather than the presumed creative and exhilarating stuff that some might imagine it to be.

I've been steadily working on getting a decent display, with an adjustment knob, installed in our airplane and also working for Jimmy. This is the state of affairs on our plane, when it's working:

Notice the nice knob on the panel, behind which there is a little power supply and a USB "volume and play/pause" knob.

So, I figured out the problem with the knob. I think. The problem is a combination of CircuitPython on the microcontroller, and a Raspberry Pi 3A+ (not 3B+ -- I mean 3A+, the stubby one with only one USB connector). Somehow, this combination is flakey. Now that I know, I am using Arduino to program my "volume and play/pause" and it works. Imagine that. The life lost that I will never get back. :)

Today I went off to fly with the setup. It was brilliant. Everything worked great. Until ... it didn't. All of a sudden, the display started blinking off, like it was losing power. I cycled power unsuccessfully a few times, but that didn't fix it. Oh well.

Back home, I put the display and its electronics box in a cardboard box, with a room heater pointed at it, a sex toy rubber banded to it (to simulate vibrations), and a full 14V on the input to the power supply. I also wiggled the connectors. Wouldn't you know -- nothing repro'd. :)

 

I'm suspecting maybe the power wiring I put in on the airplane end is flakey. Gotta check that out tomorrow. Fingers crossed.

I got my new probe parts in the mail. We have a basic bringup of the main PCB. Stay tuned!

Meanwhile, my friend Jimmy is killing it at Outlaw STOL. Hey what's that weird thing on his wing?

https://www.youtube.com/watch?v=Yc8d2U2jvNY&t=5264s

https://www.youtube.com/watch?v=Yc8d2U2jvNY&t=6169s

Sunday, March 12, 2023

Shenanigans with Jimmy

I think this is the first time I mention my friend Jimmy O'Neal on this blog. Jimmy is an Airball early adopter and development partner, has been an absolute joy to work with. He is a stupendous backcountry pilot, outdoors and motorsports enthusiast, and overall great dude, and over the past 6-9 months has really helped get Airball to the next level. He was the one who asked for a mini-display on the glareshield, and in so doing put us on the path to a really awesome product vision.

Last month, I did my longest XC yet, flying from San Jose to Camarillo to hang out with Jimmy, go flying, and try things out on his RANS S-20. Here's are a few interesting workshop photos:



In particular, note that we mounted the Airball probe on a wingtip pole. We were hoping to get even farther out of the propwash, and also into a more convenient location for a "wired-in" installation since most wingtips have some wiring going to them already.

We found out that the airflow about a foot to a foot and a half ahead of his wingtip is moving spanwise outboard a bit, such that the relative wind points outboard by about 5 or 6 degrees. We scratched our heads and could not figure it out....

One go-to explanation is that this is the upstream effect of the wingtip vortices. Which makes sense, right? In a subsonic flow, we expect upstream effects, so why not? Except that we would then expect the magnitude of this effect to change with the amount of circulation produced by the wing, i.e., the angle of attack. And yet Jimmy observes no such effect (or if it's there, it's too small to notice). I am totally weirded out, and the usual "call a scientist" response has yet to yield a comprehensive explanation.

There was a lot of lovely scenery on my XC! I'm hoping to visit again soon and do more aviation experimenting!





The display, and the saga of the recalcitrant USB

I have been refactoring the display code quite extensively, as I mentioned before. Well so now I have support for an "adjustment knob" that acts as a USB HID device, and I'm using the Adafruit Rotary Trinkey for its compactness (even though any USB "volume and play/pause" product would work too).

The current thrown-together prototype of this setup looks like this:

The idea is that the little controller sits inline on the USB cord powering the RPi and also acts as its USB peripheral. This means that the USB-A socket on the RPi acts as both a Downward Facing Port (to connect to its USB HID peripheral) and an Upward Facing Port (to receive power). This is not "legal" except with USB-C and USB-PD, but luckily, the RPi just connects its +5V rail directly to the USB VBUS and so it doesn't know the difference.

Luckily, I say....

Now the problem was, when the whole thing is powered up all at once, the RPi would not connect properly to the USB peripheral. It would see it, and produce the correct device files in /dev/input/, but no Linux input events would show up. The only way to get things to work was to:

  • Turn on the RPi;then
  • Connect the USB HID peripheral.

As you might imagine, this is not the nicest UX. I tried and tried. I posted on forums. I debugged like the wind. Oh my gosh this soaked up so much freaking time. And eventually I realized, this is just not going to get solved. There are rumblings that this may be a problem with the SAMD series of processors and their hardware USB implementation, but this is not going to help anyone.

My first cut was to use a 555 timer to make a delayed power-on circuit. This was valuable simply because it taught me how to make 555 circuits; I had never done that before (imagine that!). Also, when setting the RC values for the delay, I ended up choosing "impossibly" high resistor values, meaning that I could not even measure the behavior of my circuit because my multimeter would interfere with it! Lesson learned; welcome to the real world. I ended up with something that would actually turn on the USB peripheral after about 10 seconds, using a reed relay:

This is great except -- it did not work. Why I have no idea. but it was time to cut my losses, and so I just added a switch to my "controller" module. The user can just turn it on after the display, and we can hope for the best.

The result, anyway, is that now we have something where all the settings are available using a multi-function knob. Check out this video on the bench:

https://photos.app.goo.gl/ArszEDoMNh4jueAG9

and this one on a bumpy flight where my poor wife Melissa got airsick, but was a total trooper and continued to work as the test flight engineer while I kept the greasy side of the plane pointed downward:

https://photos.app.goo.gl/oWr9kvYxjYEYKVmQ8

This is probably as far as I'm going to go with the RPi 3A+ for my displays. I'm told that RPi CM4's are going to be available again soon. Compared to the heartache and pain of dealing with all this nonsense, I'm sure I could build a CM4 carrier board without too much trouble. Stay tuned for that. If / when I do, it will be super compact and wonderful!




More about next-gen probe

Lots has been going on, which I'll try to talk about here. One of the important aspects is the development of a new probe, as you have seen before. The existing design is large and heavy but -- most importantly -- it requires a lot of labor to build! Without further ado, let's talk about what I'm planning.

 Electronics

 The core of the probe is this very simple "main board" PCB, containing an ESP32-C3 (chosen for its small size) and some power electronics.

I'm using the integrated antenna on the ESP32 to save space; I'll see how that works out, and I can always switch to a model with a U.Fl connector and an external antenna.

Note that I am trying to plan for 12-28V input, and adding CANBus capability. I am not sure how much of that I will use right away, but it can be depopulated if I don't need it yet.

For programming, I added a header to match an Adafruit pogo pin clip to save on parts count and cost. All the USB/serial and "board reset" functions can be on a separate programmer board.

The first thing this connects to is a small I2C board with a thermometer and a barometer:

The second is a board holding the three SPI pressure sensors, with an 8-pin JST-SH connector for power, the SPI signals, and chip selects:

All this is done using 2-layer PCBs. All but the barometer / thermometer board could probably be hand assembled; the baro and thermometer chips are super tiny and would be frustrating to do at home. In practice, I'm probably going to have PCBWay send me boards populated with everything but the expensive Honeywell pressure sensors, and take it from there.

The cables are easy to get ready-made, which is important because the tiny JST SH connectors are very hard to crimp at home. The I2C cable is intended to be a 50mm QWIIC cable. The cable for the SPI sensor board is a 30mm cable used by FPV enthusiasts.

I am assuming the JST SH connectors are vibration resistant. If this turns out to be wrong, I can re-tool. For example, I could move to positively locked ZIF connectors and FPC cables.

Mechanical

This is all packaged up in the usual combination of 3D printed parts and a polycarbonate tube. This is held together by four #4-40 screws (not shown here). All the 3D printed parts you see are intended to be made by SLS, MJF, or some other "pro" process, not on a Prusa. The parts that support and mount all this can be made on a Prusa. The total cost of one set of the parts you see here, at Shapeways, at Qty=1, is about $50.

This is a series of sections through the stackup showing how the pieces form a series of manifolds.

And this is a view from the back showing how the populated side  of the main board looks:



Monday, January 16, 2023

Mockup of next-gen probe

Today, I put together a mockup of the next-gen probe design. This was to determine the ergonomics of how things would go together, and generally get a feel for what the finished result will be like.

First, I installed threaded inserts and brass nipples in the nose, and attached the tubing from a mock PCB with mock pressure sensors. The 1/16" holes in the ball nose were pretty clogged up from the Shapeways production process and needed to be cleaned out with a drill (previously, I could just flush them out with water). This tells me that any future probe noses should be designed with "drill accessible" holes -- i.e., there should be no sections of the holes which cannot be cleaned out by a drill. This also means, as a side benefit, that these designs could be machined.



The next step is to assemble the back. The temperature sensor is sandwiched between two layers, and there is a detail allowing the power cable to be threaded through then clamped. This step would require sealant to be applied to the faying surfaces.








Now the power cable from the outside, and the QWIIC cable from the temperature sensor to the PCB, need to be attached to the PCB. Imagine in the following picture that they are attached.


I then added four 1.25" long #4 socket head cap screws, added rubber spaces to hold the PCB in securely, and clamped up the whole assembly.

Getting the tubes scrunched in there was a total pain. Conversely, if I had made the tubes shorter, it would have been hard to get everything together properly. Along with the labor to create and attach the hose nipples and attach the tubes, I think this proved to me that the tube-less design is really important.

The polycarbonate tube seemed not to fit perfectly, implying I need to work on tolerancing a bit more. It is possible that, with this shorter design, a probe body made completely of 3D printed parts is more feasible.





And now with the parts together, we can think about installation. As per the renderings you may have seen previously on this blog, I used a 1/2" diameter tube with a yoke -- here 3D printed, but to be made of aluminum in a flight article.

The first photo shows it with a flashlight body attached, and the second without. The first case would be for battery powered use -- the flashlight body gives us a "free" secure battery holder and on/off switch. These are sold as flashlight hosts online. In the second case, the wire would snake into the airplane via the wingtip, for example:


This would integrate with our mounts directly. Here I have used some spare mount parts to illustrate the idea. Our mounts have 2 jaws running on 2 1/2" tubes. The probe tube would serve as the top one, and the bottom one would be for stability. The probe tube would have to be a bit longer to allow the mount jaws to open and fit over the wing strut, but you get the general idea:


Overall, I learned a bunch from this. At a high level, I am convinced that a smaller probe of these dimensions is necessary in order to make Airball accessible to more people. And again: Tubeless is the way to go! Stay tuned for more news!

Friday, January 13, 2023

Thoughts about simplified probe build

I have been thinking about ways to further simplify the build of the probes. You may recall that the probes have a lot of hoses inside them to transfer pressure from one place to the other. The hoses, and their fittings, end up being one of the main things that take up room and require hours and hours of labor to fit. You'd think a few hoses would be easy, but these things are tiny, and they need to be super secure or else they pop off while the probes are in use. So I put my mind to seeing if we can eliminate these entirely.

The Honeywell pressure sensors I use look like this:


Note how they have little barbed fittings for hoses. Theoretically, Honeywell makes the same parts with barbless tapered fittings, which look something like this:


These would be really cool to use since they seem perfect to "slot into" some kind of one-piece manifold with no plumbing required -- only a seal of some sort, or a dab of sealant. Wouldn't it be great if I could get these?

Except no. Honeywell does not talk to small timers like me. We are left picking at table scraps from the stock that the electronics suppliers happen to have on hand. Which is primarily the ones with barbed connectors. Sigh.

The design I am tossing around in my mind looks like this:

This is a fitting onto which the pressure sensors, on a small daughterboard, are attached. Basically, the realization is: It is easier to route electrical signals around your design than it is to route pneumatic pressure. So put the pneumatic stuff in a convenient location, and run a wire to your electronics as needed.

In this case, the pressure sensor daughterboard has a tiny JST connector on it carrying the 7 signals I need. Since these are SPI sensors, the signals are 3V3, GND, MISO, SCLK, and 3 chip-select signals.

The fitting would be designed so that the barbed tips of the pressure sensors fit into it, surrounded by a soft sealing tube. In a cross section, it would look like this:

 

The sealing parts are basically short pieces of tubing, perhaps dabbed with sealant on the outside and then stuck into the holes. The tubing can then be trimmed flush with the surface with a razor blade, and then the daughterboard with the sensors can be mounted.

I tried this out briefly with some scrap plastic and a piece of soft silicone tubing, and it seemed to work out pretty well. If we take this to its logical conclusion, we can have a daughterboard for the barometer (a tiny chip) and the thermometer (also a tiny chip). Both of these are I2C devices, so we need a 4-pin connector:

A key part of this design is the back side of the manifold. It would contain a sort of "anthill" of small grooves going hither and yon to route the pressure:


These would in turn be sealed by layers of gaskets:



The whole assembly would be pulled tight by thru-bolts as with previous designs.

It turns out (nothing in this world is new...) that I have thought these thoughts before, in http://www.airball.aero/2018/02/probe-nose-progress.html. This was in the context of making probes with hoses, though; I was not thinking about using this technique to do away with hoses.

Given the relative ease of snaking wires around and moving SPI signals, it is possible -- extreme, but possible -- to put each of the 3 pressure sensors on its own separate board, and it would still not take up a lot of room, because the 1mm-pitch JST PH connectors I would use are still super small; this is what the 6-pin ones look like.

I'm still bouncing this around so all the ideas above are super preliminary, and the actual CAD work is hacky and contains a bunch of errors. That's fine. I am a very visual thinker, so I usually need to draw something in 3D to appreciate all the details and think of alternatives.