Simple Diy Aoa Sensor v1
Simple Diy Aoa Sensor v1
Simple Diy Aoa Sensor v1
Basic Principle
The sensor is of a vane and rotary encoder type. A microcontroller board reads data from a
rotary encoder and transfers it as a NMEA type serial stream over a Bluetooth connection.
The serial stream can be used to display angle of attack on a dedicated AoA indicator gauge,
or on a PDA already available in most gliders.
The Chip
The AoA sensor is built around rotary encoder chip made by www.ams.com. You can see the
whole product family at Magnetic-Position-Sensors/Magnetic-Rotary-Position-Sensors. It
evaluates the magnetic field of a small rare earth magnet over or under the chip and
determines its angular position. There is no mechanical contact between the magnet and the
chip, and hence no mechanical friction (other than from the ball bearing we are going to use).
The Indicator
There is no dedicated indicator available yet. The sensor mimics the NMEA sentence of a LX
variometer, and transfers data as a pretended lift or sink. This allows us to watch the sensor
output on the vario gauge implemented in popular open source XCSoar gliding software.
You need
- Arduino Mini Pro 3.3V / 8MHz
- Bluetooth module (this one is a Chinese HC-05 from Ebay)
- AS5045 chip and rare earth magnet
- Ball bearing for the magnet
- Some kind of carrier plate for everything (part between BT module and coin). I made
it on a CNC router with recesses for bearing and chip, but some part cut with a jigsaw
will do fine also)
- 100nF capacitor
- 2mm carbon or steel rod, approx. 100mm long
- 5mm carbon tube, 5mm long (or some other way to mount the rod to the magnet)
- Material for the wind vane, I used a small length of a model aircraft trailing edge
- Weight to counter-balance the vane
- Some small stuff like wires, connectors, tin, adhesive tape, heat shrink, maybe a LiIo
cell and other stuff depending on your preferences
We start by bonding the ball bearing to the carrier with fast curing epoxy. Bond between the
bearing outer diameter and the carrier and make sure that the bearing does not get clogged by
resin. A wooden tooth pick worked well for me for application of the resin.
The chip has 16 pins and is really tiny. Fortunately, we only need five of its pins, so I
removed the rest of them by bending and breaking them off with a pair of tweezers.
Considering my soldering skills this looks much better now. Your local chip designer may
disagree ;-)
With most of its pins removed, the chip is bonded to the carrier in a dead bug style, lying on
its back and legs up.
Solder the capacitor and wires to the pins of the chip. When done, secure everything with a
drop of medium cure cyano glue and cover it with a few drops of fast curing epoxi.
Bond the short carbon tube to the magnet with epoxy. Be careful not to get any resin on the
outer diameter of the magnet. The 2mm bore for the carbon is best made before you cut the
short length of 5mm tube. The wind vane and the counterweight are drilled and bonded to the
carbon rod with cyano. Note that the vane is not drilled in its symmetry axis, but slightly
offset, to give a vane that is symmetric about the carrier plate.
Let the magnet snap in the bearing, and you are done with the sensor!
All assembled with two brass tubes, ready for mounting on the TE probe.
For basic operation, we only need three wires going to the BT module. UART RX on pin2
(yellow), 3.3V on pin 12 (red) and GND on pin 13 (brown).
I decided to also add UART-TX on pin 1 (green), Reset on pin 11 (orange) and AT command
mode select on pin 34 (blue) to have some more options for controlling the BT module from
the Arduino. This also allows programming of the Arduino over Bluetooth (Thank you Hari &
Kimmo!).
Before you proceed, make sure that the BT module is configured and working properly. My
settings are module operates as slave, 57600bd, 1 stop bit, no parity, name and password for
pairing according to your taste.
It may also make sense to program the Arduino over the socket header before you go on and
connect the BT module, so you have lower chances to do something wrong. You can
download the software for the Arduino here. It reads the pulse length output from the AS5045
chip, calculates AoA from it and sends it as NMEA data over the serial port to the BT
module. The program it is made from code snippets found in the net, adapted and glued
together without real programming knowledge. If you can do it better, please let me know.
A socket header is soldered to the narrow sider of the Arduino for programming. Sensor Vcc
(red) connects to pin 7, sensor PWM signal (orange) to pin 8. Sensor and power supply GND
(brown and black) are soldered to one of the Arduinos ground pins.
Bond the BT module to the Arduino board with double sided sticky tape. Use thick tape or a
spacer to make sure that there is some gap between the boards.
If you want to use your AoA sensor on different gliders, you may want to build a nice selfcontained module with battery, on-off switch and charging socket. This is the most portable
solution, allowing use even with club gliders.
I suggest using a LiIo battery with an integrated protection PCB to avoid overcharging and
deep discharging of the battery. The battery shown lasts for more than 12h of continuous
operation, which should be enough for most pilots.
For optimal power consumption control the sensor can also be switched on and off, even
remote by the Bluetooth master. The micro controller software allows also the auto-zero in
flight.
The PCB can be connected to any power supply in the glider. Anyway the plan is to keep
complete independency for optimal aerodynamic placement either at the TE-probe or on a
pole mounted to the glider wing-nose (Test-Flights tbd.).
Figure 5 Independent power supply used also for simple mounting to the TE probe
or other aerodynamic optimal placement (e.g. in Front of the wing-nose)
Wind Vane
Note that the two wind vanes shown are interchangeable, each vane can be used on each
version of the sensor. Two additional forms for the wind vane are proposed by Siegfried
Piontkowski, see below.
Contact
If you have ideas for improvement or want to help with testing or implementation in XCSoar,
please send a mail to [email protected]