Skip to main content
Back to Showcase

ESP32 AI Radar Tower: A Desk Radar That Speaks in an ATC Voice

Author:emwstudio (电磁波Studio)Model:MiniCPM5-2B、VoxCPM2

A round-AMOLED tower radar announcing flights in a cloned ATC voice

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.

Demo animation

Photo of the device

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​

  1. A flight enters the 30 km ring.
  2. MiniCPM5-2B writes tower-style announcement text (different wording each time, with a pool of 8 scenario styles).
  3. Aviation-phraseology post-processing for Chinese digit readings (1→幺, 2→两, 7→拐, 0→洞).
  4. VoxCPM2 voice cloning, using a real tower-controller recording as the reference voice.
  5. 0.9× slowdown + 300 Hz–3 kHz band-pass + soft clipping for a radio effect.
  6. 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_FLIGHTS in flight_mgr.cpp).

Build and configuration​

Build and flash with PlatformIO:

Bash
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.h to include/secrets.h and 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.h with xxd -i, and set ATC_REF_TEXT in announce.cpp to the matching transcript to improve similarity. Set ANN_USE_REF_VOICE to 0 if you don't need voice cloning.
  • WiFi and GPS: on first boot (or when WiFi fails), the device opens a HGH-RADAR hotspot. Join it from your phone, visit 192.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.

Project info

Author
emwstudio (电磁波Studio)