ESP32 Radar Tower (voice announcement edition) recreates an airport tower radar on a 2.16-inch round AMOLED screen. It shows flights within 120 nautical miles overhead in real time, and whenever an aircraft enters the 30 km ring, it automatically announces the flight in a cloned air-traffic-controller voice. The announcement text is generated by MiniCPM5-2B and the speech is synthesized with VoxCPM2 voice cloning.


Full demo video (with audio): docs/demo.mp4
Features
- Phosphor-decay sweep, 40 / 80 / 120 NM range rings, compass ticks, and magnetic-bearing lines for the Hangzhou Xiaoshan Airport runways.
- Aircraft icons rotate to their real heading, with three-color labels (flight number / route / altitude / speed) and velocity vectors.
- Corner indicators: WiFi signal, number of tracked aircraft, time, and radio status (STBY standby, TX transmitting — strictly synchronized with the audio).
- Arriving flights disappear from the radar on touchdown, while overflights cruise straight across — mimicking a real tower radar.
Announcement pipeline
- A flight enters the 30 km ring.
- MiniCPM5-2B writes tower-style announcement text (different wording each time, with a pool of 8 scenario styles).
- Aviation-phraseology post-processing for Chinese digit readings (1→幺, 2→两, 7→拐, 0→洞).
- VoxCPM2 voice cloning, using a real tower-controller recording as the reference voice.
- 0.9× slowdown + 300 Hz–3 kHz band-pass + soft clipping for a radio effect.
- Playback through the ES8311 amplifier, with the TX indicator in the lower-left corner lighting up in sync.
MiniCPM5-2B (2B parameters) and VoxCPM2 are both on-device models from ModelBest, so the whole "data → text → speech" chain can be deployed on your own hardware. The current firmware calls both models through the ModelBest open platform.
Hardware and data sources
- Hardware: Waveshare ESP32-S3-Touch-AMOLED-2.16 (ESP32-S3 + 480×480 round AMOLED + capacitive touch + ES8311 audio codec + amplifier + speaker + Li-battery connector).
- Flight data: VariFlight aviation data MCP service (
https://ai.variflight.com/servers/aviation/mcp). - Text and speech: ModelBest open platform (
https://platform.modelbest.cn). - Demo mode: no network and no API cost — locally simulates arrivals, departures, and overflights at Hangzhou Xiaoshan Airport (
SIM_FLIGHTSinflight_mgr.cpp).
Build and configuration
Build and flash with PlatformIO:
pio run
python3 ~/.platformio/packages/tool-esptoolpy/esptool.py \
--chip esp32s3 --port /dev/cu.usbmodemXXXX -b 460800 \
write_flash 0x10000 .pio/build/esp32-s3-amoled/firmware.bin
- Keys: copy
include/secrets.example.htoinclude/secrets.hand fill in the VariFlight and ModelBest API keys. - Cloned voice (optional): bring a single-speaker reference recording, convert it to 16 kHz mono wav with ffmpeg, turn it into the C header
src/atc_ref.hwithxxd -i, and setATC_REF_TEXTinannounce.cppto the matching transcript to improve similarity. SetANN_USE_REF_VOICEto 0 if you don't need voice cloning. - WiFi and GPS: on first boot (or when WiFi fails), the device opens a
HGH-RADARhotspot. Join it from your phone, visit192.168.4.1, and enter WiFi credentials plus the radar-center GPS coordinates (default: Hangzhou Xiaoshan Airport, 30.2295, 120.4344). The device restarts automatically after saving.
Development notes
Everything — from lighting up the screen and polishing the radar UI to integrating flight data and tuning the cloned voice — was built through conversation with Kimi Code, without writing a single line of code by hand. A video of the full development process is available by searching "电磁波Studio" on Bilibili / X / YouTube.
Radar UI inspiration: micro-radar and ESP32-Plane-Radar.
Links
- GitHub: emwstudio/esp32-radar
