ESP32FMRadio — turn one GPIO into a pocket-sized FM station
This project shows how an off-the-shelf ESP32 module becomes a fully-digital FM transmitter.
No DAC, no RF IC, no filters at the start—just GPIO 0 and 30 cm of wire.
The ESP32’s Audio-PLL (APLL) is forced to lock at 100 MHz, we route that clock out through the I²S master-clock (MCLK) line, giving a stable RF carrier straight from the pin.
An 8-bit PCM audio clip (Rick Astley, of course) is stored in flash every 125 µs an ISR nudges the APLL’s 16-bit fractional divider up or down, swinging the carrier ±75 kHz in perfect sync with the music.
The project is a PoC, you can change the audio sample to 16khz for better quality, and it's mandatory to add a band pass filter on the output to suppress harmonics, for a simple test you all you need is a wire soldered on GPIO0 pin.
It's a amazing project, is there any firmware code shared, I want try it