Disclaimer

This blog is for entertainment purposes only, and is not meant to teach you how to build anything. The author is not responsible for any accident, injury, or loss that occurs as a result of reading this blog. Read this blog at your own risk.

Sunday, September 04, 2016

Voltage regulator (aka Pitot power) - part 6

OLED display
I decided to use an OLED (Organic Light-Emitting Diode) screen for displaying Pitot probe and nose foam temperatures. OLEDs have a few advantages over regular LED displays among which is not needing to be backlit, which improves the depth of the black color, reduces power consumption, and eliminates additional sources of light in the cockpit.

The 1.5” unit I purchased (3.8 cm) came from Adafruit Industries, and was probably originally intended to be used on some older cell phone. The good news for me is that I should be able to wire it to the Arduino's digital outputs, and program its behavior via software (C++).


SSD1351 color OLED display

To answer your next likely question… “No, I have never done this before”, but then again, I also have never built a plane before, so we shouldn’t let a little challenge slow us down.

Back to the screen… 

I only intended the screen to be used during the initial testing phase to verify my expectations of the Pitot tube effectiveness, and make appropriate changes to the power supply unit, but it could be left in the cockpit if one wished.

The main purpose of course would be to display the actual Pitot temperature, and also the temperature of the foam surrounding the Pitot installation. The foam being the weakest thermal link of this installation.

The display arrived with the pins not connected, so some soldering was required.


Back side of the SSD1351 as it came in the mail

With those in place, it was time to make the connection with the Arduino, and make sure I could get the screen to work.


The serial connection only takes 7 wires, and it's just fast enough for this project.

There are two different ways to hook this screen up, I had to go for the slower connection because most of my Arduino digital output pins were already spoken for. It’s still plenty fast for what I will use it for, but I also lost the ability to use the micro SD port on the back side of the screen. 

With a little more work I was able to make the Arduino write some text on the display. The fist time you do this is very exciting.





Getting the screen to show something




When I went to integrate the OLED into the Pitot heating circuitry, I had barely enough digital output ports to connect it, so I ended up connecting the air/ground logic switch input to an analog port. Turns out you can use analog ports as digital, but not the other way around.

Here’s the “spaghetti diagram” of the working Pitot heating system with the OLED…


In case you were wondering how it all fit together

Because I needed a custom enclosure for the display, I decided to design one myself, then 3D print it in ABS on the Zortrax M200.

Of course I had to recreate the OLED in CAD first. 

Virtual OLED drawn in Fusion360
Actual OLED

Yes, the bent pins and the soldered tips were a pain to draw.

With that done, I designed a small enclosure for the cockpit.


The base of the enclosure...

... with the OLED installed...

3D printed enclosure
... and the top cover on.

One thing that bothered me about having such a big screen, was using it to display just two numbers, so I started thinking about adding a graphing window for the probe temperature in the bottom section of the screen.

This is the part that took the most to get right, because I had to develop the code to control every pixel of the graph individually and continuously.  For example, in order to represent the passage of time, I needed to shift the graph to the left, and to do that every pixel needed to be deleted individually (read "overwritten in black"), and redrawn one pixel to the left at every measuring cycle, while the new temperature reading would be added on the far right of the screen.

It all took some time to get right, but this gave me the ability to monitor the temperature trends in real time, all the while  being able to look back at a couple of minutes of historical data as well.

I bet you’ll like the results.





Testing the newly developed graphing software




This almost creates a TMI (Too Much Information) situation, but it’s perfect for testing purposes, where you want to know everything that is going on with your installation.

Talking about TMI, I wanted to show Wade how the air/ground logic switch would affect the Pitot, so I shot a quick video for him that ended up being too long to sent, so I threw it on YouTube.





Testing the code for the air/ground logic




In the video I am doing the switching by hand, but on the final airplane installation an air pressure activated switch will automate this task.

The only thing left to do was to rig up my car and go collect some actual data on the road.


Official "EZ shop research/test vehicle"

Needless to say, this did attract a lot of attention on the highway

A view from the inside

After quite a few runs with marginal to disappointing results, I diagnosed a weak battery, and replaced it with a known good one. Things improved immediately, but it was too late in the day to run all the previous experiments again, tough I was able to run a static ice melting test.





"Severe icing" condition encounter




At this point, I am comfortable saying that I might be on the right path to cracking this "nut" once and for all. More testing will be necessary to confirm my expectations, but I feel like I am getting really close to a final solution.


Stay tuned…


3 comments:

  1. Nice job on the display! I've done a bunch of Arduino projects controlling temperature (the epoxy hot box and a wine refrigerator, among others) and I've found that one thing that really helps get good control is to include feedforward terms for effects you can model. Like for your pitot tube, it's expected that the heater would have to work harder if the ambient temperature is lower or the airspeed higher, so by feeding those variables into the controller it doesn't have to wait until the temperature deviates and then try to correct but can start adjusting the output as soon as the input variables change.

    Implementing a feedforward term isn't particularly difficult. If you're interested, check out my PID code at https://bitbucket.org/lutorm/arduino/src/72a2aa996d6e33987c9a7cd61fec110d79eb6685/libraries/PID/?at=master

    ReplyDelete
    Replies
    1. Thanks Lutorm, it has been challenging, but well worth the effort. I appreciate your suggestion very much as well, I'll take a look at your code. Ciao.

      Delete