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.
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):
Arduino Nano 33 BLE ($20.20 - Seems to be out of stock most of the time)
-OR-
Arduino Nano 33 IoT ($18.40 - Seems to be out of stock most of the time)
-OR-
Arduino Nano RP2040 Connect ($29.40 - Seems to be IN stock most of the time)
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:
AS5600 Magnetic Encoder ($15.29 for three of them)
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:
12mm Latching Pushbutton Switch ($12.99 for a pack of 6)
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).
12mm Latching Push Button Switch ($6.49 ea)
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:
Battery Holder w/9V Snap Leads ($7.49 for a 3pk)
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.
1/8 Inch (3.2mm)Heat Shrink Tubing with Adhesive ($7.99 for a 10 foot length)
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.
Hardware Parts List
Apart from the electronics above, you will also need some hardware parts to enable friction-free movement of the wind vane.
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.
1x - 5mm Stainless Steel Rod
The main rotating part of the sensor is a 5mm hobbyist rod. It's important to use a non-ferrous (e.g. not magnetic) rod for this. Stainless Steel is non-ferrous and works well for this project. Additionally, as part of the rod is exposed to the elements, a non-rusting rod is important.
5mm Stainless Steel Rod ($7.99 for 5 of them)
2x - 5mm x 11mm x 4mm Sealed Ball Bearings
The stainless steel rod needs something to rotate on and the sensor enclosure is designed to use bearings with the following dimmensions:
5mm inside diameter
11mm outside diameter
4mm depth
Link to Amazon:
Sealed Ball Bearings ($13.49 for 10 of them)
1x - 5mm Rigid Flange
A flange typically used as a motor mount in an RC car is used as a connection point for the wind vane. These are the ones I used (and what the 3D printed parts are designed for):
5mm Rigid Flange ($9.99 for 2 of them)
1x - 5mm Coupler
This coupler is typically used to extend a shaft on an RC car, but on this project it is used as a place to connect the 5mm shaft to the rotating magnet that hovers over the rotary encoder sensor (AS5600). These are the ones I used:
5mm Rigid Coupler ($7.19 for 2 of them)
1x - 4mm x 4mm Carbon Fiber Tube
This 4mm x 4mm square carbon fiber tubing is used to assemble the windvane. You will connect the printed counterweight enclosure (two of them) on one end and the two-parts of the Wind Wedge on the other end. Then you can slide this tube fore and aft in the Wind Wedge Hub until it balances properly.
The tubing is pretty long, so you'll want to cut it down in length. Tape around it a few times with painters tape and use a Dremmel with a diamond cutting disc to cut it (use eye and respiratory protection). You can probably also use a sharp box knife and several swipes. I recommend against using a hacksaw as the carbon strands will likely fray.
4mm x 4mm Square Carbon Fiber Tube ($9.66 for 4 of them)
2x - Counter Weights (Motorcycle Wheel Weights or a couple of short lengths of 1/8" steel bar)
To balance the wind vane, I used two of these motorcycle wheel weights. Just peel off the adhesive and they should fit inside the little enclosure that connects to the end of the carbon fiber tube. I happened to have a box of these in my garage, which is why I used them. You could also cut a couple of small rectangles from 1/8" steel sheeting or a 1/8" x 1/2" steel bar.
Motion Pro Motorcycle Wheel Weights ($16.10 for 72 of them - more than you'll ever need)
Lots of Assorted M3 Screws
All of the holes are designed around M3 screws. You'll need quite a few of varying lengths. Here's a kit that will cover everything you need for a couple of sensors.
Assorted M3 Screws ($17.99 for a box of more than you'll ever need)
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
Sensor Module Assembly
In this video, I demonstrate how to assemble the Angle of Attack Sensor module.
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.
Flight Testing
Time to test everything out ...