Skip to content

04Teledyne FLIR (Aeryon Labs)Sept – Dec 2025

Sonar and failure analysis

A 61 Hz sonar fault, STM32 bring‑up and a crash root cause

Co-op

~61 Hz supply ripple traced as the sonar fault

SONAR BOARDSONAR TRIGGERRECEIVER THRESHOLDANALOG 3.3 V RAILBATTERY RAILCH1 · SONAR TRIGGERCH2 · RECEIVER THRESHOLDCH3 · ANALOG 3.3 V RAILCH4 · BATTERY RAILONE PERIOD, ~61 HzFINE AT 3,000 RPM · BAD AT 4,000 TO 4,500 RPMSYSTEM LEVEL · GENERIC

Fig. 00Four channels on the sonar. Where the scope was connected, and what it showed.

At Teledyne FLIR I worked on drones already in customers' hands. The job was to find out why something failed in the field and prove a fix before it shipped.

Sonar that broke above 4,000 RPM

The sonar read correctly up to 3,000 RPM and badly at 4,000 to 4,500. I put four scope channels on the sonar trigger, the receiver threshold, the analog 3.3 V rail and the battery rail. A ripple near 61 Hz showed up on the supply and on the threshold, which shifts when the echo is detected. Adding an RC filter made it worse, which told us the supply and ground were moving under load.

01,0002,0003,0004,0005,000READS CORRECTLYREADS BADLYMOTOR SPEED, RPM
Fig. 01Where it broke. Correct up to 3,000 RPM, wrong at 4,000 to 4,500.

The fix I proposed

Swap the op-amp for one with 20 to 30 dB better supply rejection at low frequency, give the analog rail its own filtered feed and filter the battery input. Then test one modified arm against a stock arm, measuring ripple and range jitter before changing anything else.

BATTERYINPUT FILTERANALOG RAILits own filtered feed3.3 VOP-AMP+20 to 30 dB supply rejectionRECEIVER THRESHOLDsteadyA/B TESTone modified arm against one stock arm: ripple and range jitterAMBER: PROPOSED CHANGES · SYSTEM LEVEL
Fig. 02The proposed fix. Three changes, then one modified arm against one stock arm.

Sonar firmware on an STM32

The sonar board was moving from an AVR to an STM32F0. I got the Docker build running on Linux, added timer and interrupt pins, flashed and stepped through the code with J-Link and GDB, and checked for ranging messages on the CAN bus. When a newer build stopped ranging, a clean checkout and rebuild brought it back.

Why a drone fell

During a crash investigation, CAN logs showed one arm's motor controller dropping off the bus mid-flight. On the bench its microcontroller pulled about 0.3 A at 5 V and got hot, while the rest of the drone tested fine. It was a shorted chip on that one arm, not a fault in the whole system.

CAN BUSFLIGHT COMPUTERARM 1motor controllerARM 2motor controllerARM 3motor controllerARM 4motor controllerDROPS OFF MID-FLIGHTBENCH: ~0.3 A AT 5 V, HOTARMS SHOWN GENERICALLY
Fig. 03Why a drone fell. One arm's motor controller left the bus mid-flight.

Thrust stand automation

I wrote a Python script that drives a motor thrust stand over gRPC. It runs throttle schedules on absolute time, keeps the connection alive with a heartbeat thread, retries failed exports, and logs what was sent next to what was applied, which explained an RPM mismatch.

PYTHON SCRIPTschedule on absolute timegRPCheartbeat · retriesTHRUST STANDLOGcommanded vs appliedCOMMANDEDAPPLIEDSCHEMATIC, NO VALUES
Fig. 04Thrust stand automation. Timed schedules, a heartbeat, retries and a log of commanded against applied throttle.

Write-ups

Each test went into Jira and Confluence with the setup, serial numbers, steps, file paths and plots, so the next co-op could carry on.