Build your own Angle of Attack Sensor and Indicator

Introduction

I built my own Angle of Attack (AoA) sensor from over the shelf electronics, some 3D printed parts; and quite a bit of time drafting parts, printing them, testing lots of different sensor technologies, and writing code to make it all work together.

The device is not built as a permanent installation; rather, it attaches to a wing strut and uses batteries to read sensor data and publish it over a Bluetooth connection to an Android phone or tablet. If used properly, it can increase situational awareness in the cockpit, and thereby improve safety by reducing the risk of an unintentional stall.

WARNING: If you decide to make your own, you do so at your own risk!

If you're ready to start making your own AoA Sensor and Indicator, you can find project files and code on my GitHub repository (https://github.com/danderflieger). There you will find five sub-repositories:

  • 3d Models - e.g. Solidworks and .3mf files that you can download and either edit for your own use or slice for printing on your 3D printer

  • Wiring Schematics - information regarding the wiring in the Sensor

  • Android Code - the full open source code base that you, as a developer, can start from and update to your liking

  • Android APKs - if you're not a developer, you can simply download a pre-compiled APK file that you can install on your Android device

  • Arduino Code - the open source code that you can update (or not) and install on your Arduino Nano 33 BLE or Arduino Nano 33 IoT board

If you're not ready to start, no problem. Here's an introductory video:

What is Angle of Attack?

An Angle of Attack sensor is only really helpful when you understand what Angle of Attack is. In this video, I attempt to explain what it is and what happens when you exceed the Critical Angle of Attack (hint: the aircraft stalls). Knowing when your wing is approaching this critical angle can help you avoid an unintentional stall and could potentially save your life.

Homemade Angle of Attack Sensor Electronics Parts List

Now that we understand how an Angle of Attack indicator can help improve situational awareness in the cockpit, let's get started building one of our own.

Here's a list of parts that you will need to complete the electronics portion of the device. There are more parts to buy, but I'll add other sections for those parts as we come to that part of the build. I've included links to where you can buy each part online as of this writing, but those links may eventually become stale. I'll do my best to update links, but I make no promises.

To see a short description of each part and to get access to a link where you can buy it online, click the item to open a collapsible description. This is my attempt at making this tutorial more readable.

Choose one of the following:

1x - Arduino Nano 33 BLE

- OR -

1x - Arduino Nano 33 IoT Board

- OR -

1x - Arduino Nano RP2040 Connect Board (new and tested with this project)

The Arduino board is the brains of the sensor. If you're not familiar, Arduino is an Open Source electronics platform that allows you to easily build interactive projects. For more info, check out https://www.arduino.cc/

For this project you will need one (1) of the following two options (both have been tested and both work without modification to code or assembly for this project):

-OR-

-OR-

We'll get into how to program the board later, but they are fairly easy to work with and very well documented

1x - AS5600 Rotary Encoder with Magnet

This is a precision sensor that measures an angle called an absolute rotary encoder. It requires a special circular magnet that is magnetized diametrically (e.g. its north and south poles are like a pie cut in half rather than the top/bottom). I recommend buying a few of these sensors because soldering the leads to them is kind of a pain and you may want to have a couple to work with:

When I was prototyping, I was only able to find these specific ones on AliExpress and it took a couple of weeks to arrive. The link above is where you can now purchase them on Amazon (as of this writing).

Note: you can buy them from anywhere, but for the sensor to fit in the 3D printed parts correctly, you need to purchase the ones that look exactly like the one in this picture (with the white circuit board and labeled exactly as in the picture). There are other variants of the AS5600 that look different (green and different shape) that will not work.

Also, for your own sanity, make sure you purchase the sensor(s) with magnets included. I think you can buy them without, but finding a diametric magnet that is the correct size for this project is going to be frustrating. They're cheap enough to just buy them with the magnet and save yourself some headache.

1x - 12mm Latching Push Button Switch

I designed the 3D printable sensor body to be mostly watertight, so to power the sensor on and off, you will need a waterproof bulkhead power switch that keeps the body sealed. This specific button switch, which is supposedly waterproof (untested), fits the design:

I couldn't find the particular one above in smaller quantities, but a six pack is a good choice.

If you don't want a pack of 6 of them, the link below may also work. It's not specifically listed as waterproof, but they're so similar I'm pretty sure it's just as waterproof as the one above.

While I have purchased and tested the one below for fit in the sensor body as well, I don't recommend it. The one above includes lead wires that make it stupidly easy to integrate into your sensor. The one below, however, does not include those leads, so you'll need to figure out another way to connect the switch to your wiring harness (perhaps by soldering the wires to the switch, which will make it difficult to disassemble later if you want to do so).

Another benefit of purchasing the first option is that you have a few of them as a cushion in case you mess up the first one (or five), and, as mentioned before, they also come with slide-on leads that make installation simpler. So I suggest the first option.

1x Battery Holder w/ 9V Snap Leads

These will hold 4 AA batteries in a series circuit (to output 6V). The handy 9V type snap lead is integrated into the 3D printed sensor body so you can quickly remove the batteries with the plastic holder to insert new/recharged AA batteries without stressing the power leads each time:

1x - 3mm LED (3-3.3V)


If you buy the pack linked below, it comes with 100 LEDs of varying colors (Green, Blue, White, Yellow, and Red). If you select a Green, a Blue, or a White one for your project, they are rated for 3.0-3.2V, which is perfect for the Arduino that we're using (the 33 portion of the Arduino name signifies that its logic is 3.3V).

If you opt to use a Red or Yellow one (rated 2.0-2.2V), you'll need to add a resistor or risk burning out the LED:

The sensor lid is designed for 3mm LEDs, so you'd be wise to stick with them. I've written the code to save battery life by only flashing momentarily every second-and-a-half to let you know that the device is actually powered on and doing something.

1x - Solid Wire Kit with Tinned Copper Core (tinned is optional, but highly recommended)

While you're likely to have some wire laying around your house, I recommend this Solid Wire Kit with a tinned, solid copper core:

Because it's pre-tinned and has a solid copper core, this wire is easy to work with while soldering. The multiple colors match the wiring diagram in a the next section (Electronics Assembly). Using the same colors as the diagram will simplify the assembly.

Adhesive Heat Shrink Tube

To seal up all of your soldered wires, I highly recommend some heat shrink tubing. This particular one has an adhesive coating on the inside diameter of the tubing, which melts and seals your soldered joint, making it waterproof. Think of the adhesive as a thin layer of hot glue that seals the tubing around your wire.

You could technically use electrical tape, but I don't recommend it. Over time the adhesive tends to weaken and it will eventually come unraveled, which may cause a short in your wiring harness down the road. Just spend the money and have a bunch on the shelf for future projects.

Electronics Assembly

In this video, I demonstrate how to assemble/wire the electronics of the Angle of Attack Sensor. Here's the link to the wiring diagram mentioned in the video: LINK

Installing the Software

Are you ready to start working with the code? In this video, I demonstrate how to get the software from my GitHub profile (https://github.com/danderflieger) and install it onto both the Arduino board and on the Android device.