After years of patchy FM reception in my kitchen I built a little internet radio around an ESP32 and it's been playing daily for months now. A few things tripped me up early on, so here's what actually mattered in the end. First, the power supply. A cheap phone charger made the speaker buzz constantly and I nearly blamed the amp board for it. Swapped in a proper 5V supply and the noise vanished. Keeping the audio path digital right up to the amp helps too. For streams, test every URL in VLC on your laptop before putting it in the code, because plenty of station links that look alive are actually dead or just plain wrong. The knob part is easier than it looks. A basic rotary encoder works fine but it bounces, so add a short delay in the loop or one click will skip three stations. I set mine so twisting changes volume and pushing jumps to the next preset, and honestly that's all the control I've ever wanted. One last tip, print the case with a grille big enough for the speaker to breathe, mine sounded muffled til I opened it up. Next on my list is making it remember the last station after a power cut.
How I finally got my Wi-Fi internet radio working - steps that actually worked
Nov 08, 2026
Last reply: 18 hours ago
4 Replies
First reply
Mine has been running on a kitchen shelf for about a year now, built around the older ESP32 with an I2S DAC board from AliExpress. The power supply thing is so true, I chased a hum for two evenings before realizing my no-name 5V brick was the culprit. I also learned the hard…
Read the full replyMine has been running on a kitchen shelf for about a year now, built around the older ESP32 with an I2S DAC board from AliExpress. The power supply thing is so true, I chased a hum for two evenings before realizing my no-name 5V brick was the culprit. I also learned the hard way to test streams in VLC first, lost a good hour to a station URL that returned silence instead of an error. One thing that helped me was putting the preset list in a separate header file so my wife could edit it without touching the main code, she manages the stations and I never get asked to fix it. For the encoder, I ended up using an interrupt with a small counter instead of delays in the loop, since delays made the audio stutter on mine. Still no memory of last station after power loss either, saving it to NVS is on my list too but I keep putting it off. Mine does volume on twist and press pauses, wich sounds similar to how yours works.
Curious how yours handles a wifi dropout, mine used to just sit there in silence until I restarted it. I added a check that reconnects and jumps back to the same stream after a few seconds and it's been solid since. Also if the stream stutters now and then, a bigger buffer in the audio library ussually sorts it, took me a while to figure that out. I stuck a little OLED on mine to show the station name, probaly overkill for a kitchen radio but I like it. Saving the last station to NVS relly is only a handful of lines, you might as well knock it out one evening.
For the remember-last-station bit, just make sure you only write to NVS when the preset actually changes, not every time through the loop. I got that wrong on my first attempt and was hammering the flash constantly. Mine has been saving on change only for over a year now with no issues. Also I capped mine at 12 presets, which is honestly more stations than I ever rotate through anyway. If you want, add a long press to save the current stream as a preset, that way you never have to open the code again once it's set up.
On the encoder bounce, I went with a small capacitor across the switch pins instead of a delay, and it cleaned up the false clicks without ever touching the loop timing. Took a bit of experimenting to pick the right value but it has been rock solid for ages. Also worth checking how the encoder is mounted, mine had a slightly loose nut on the front panel and every twist registered twice until I snugged it up properly.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required