Measuring my Decalage

Decalage, the angular difference between the wing and the horizontal stabilizer incidence. Since I live in Germany I, I called the boxes: EWD-Diff. This project is a 2 (or 3) unit control-surface deflection meter on a pair of M5Stack StickS3. The optional third unit is a Waveshare board I had on the bench.

The project started from an idea by Pierre Rondel. A couple of months ago I had done some work on a similar thing, but my earlier version used a standard ESP32-C-something with a separate display and IMU.
I found it almost impossible to get a good resolution below 0.1 degree with those simple parts. Pierre showed a solution with the StickS3, so I thought: why not give it a try? I already know the limits of the chips, so let’s make things easy.

One thing I keep telling myself: a carpenter looks at a chair and says, “I can make one like that, but mine will have twirly legs.” Is that copying an idea, or is it a good idea cooked into my own version? The world has changed, and our AI tools are now the saw, hammer and chisel. I should stop worrying about whether I copied an idea or created it myself. I use the tools, my version does what I need, and if anyone is interested, they can have my code. Anyone who can understand this setup will have no problem making their own version anyway. It took me an afternoon, from never having used M5 parts to “oh, works nice”. Writing this up already takes me longer than building the thing.

What it does

Each M5Stack StickS3 (ESP32-S3 with a BMI270 IMU) measures the angle of the surface it sits on. It shows the angle in degrees, or in millimetres of deflection at a chord length you set. The two sticks talk to each other over ESP-NOW, so no router or WiFi network is needed. Each stick shows its own value, the other stick’s value, and the difference.

An optional hub (Waveshare ESP32-S3 Touch AMOLED 1.8) shows both units and the difference on one larger screen. Its BOOT button zeroes both sticks. Each stick averages one second of its own reading, so you do not touch the control surfaces. I really wanted this, because pressing “Zero” on the measuring unit always moves it. With the small angles we try to measure, you then never get it right.

The units pair themselves. After power up, they start looking for a friend. (and no, I have no idea what happens when I have a dozen powered on at the same time. Not today, not relevant in my workshop. )

The behavior of a single meter follows the RC Throw Meter firmware by Planet-Soaring.com, available through M5Burner: https://burner.m5stack.com/LG5ZEZ. My firmware is a clean-room build, as they say. It adds the two-unit difference display and the hub.

Status: Works for me, on my bench. No guarantees. This is not a finished product. It is Arduino code for the M5Stack and Waveshare boards, flashed with esptool.

Features compared

FeatureMine (EWD-Diff)Reference (RC Throw Meter)
Units2 sticks, plus an optional hub1 stick
Splash2 s5 s
Orientation pageNone. Always pitch (long axis X, USB end up = positive)VERTICAL (pitch) or HORIZONTAL (roll), chosen with B and confirmed with A
ModesAngle (deg) or chord (mm)Angle (deg) or chord (mm)
Chord range20..200 mm, 1 mm steps20..999 mm, 1 mm steps
Chord entryB tap = +1, hold = fast up. Hold A and press B = -1, hold = fast downB tap = +1, hold = continuous
Setup navigationA starts the measurement. Hold A in chord entry goes back to modeA is next or start. Hold A goes back to MODE
Angle filterComplementary: gyro plus accelerometer, time constant 0.3 s moving and 1.0 s still1 s moving average of the acceleration vector
Zero1 s average of own pitch, on entering the measure page. A re-zerosCaptured from a 1 s window on entering the measure page. A re-zeros
Remote zeroHub BOOT button zeroes both sticks, so nobody touches the control surfacesNone
MAX / MIN peaksNoneYes, reset with A
Sign reversalHold B on the measure page (shows REV)None
Back to modeB clickB
Other unitShows OTHER value and DIFF (own minus other). UNITS? when one stick is in angle mode and the other in chord modeNone
LinkESP-NOW broadcast, channel 1, no routerNone
PairingAutomatic. No MAC entered. Power-cycle to re-pairNone
BatteryVoltage shown on each stick and on the hubNot described
Link diagnosticsrx g l s line: packets, longest gap, longest loop, redraws over 100 msNone
Hub displayUNIT 1 and UNIT 2 (mode, battery, value) and DIFF 1-2. A unit silent for 1 s shows --None

The units have a built in 240 mAh battery, do not expect a long battery life. Probably ok for an hour. So get a cheap power-bank to keep the batteries topped up.

If you are interested in the code, ask. Commercial interests etc: if you want to sell them, with MY code, we can talk. If you just want them for your own workshop: good luck!