Building a Custom PCB for an ESP32 Internet Radio
Key Moment
- 0:00 Introduction – Building a Free Internet Radio
- 0:21 Components Overview (XIAO ESP32S3, Display, Encoder)
- 0:56 Breadboard Testing
- 1:14 Assembling on Custom PCB
- 1:25 AIVON PCB Sponsorship
- 2:30 Final Hardware Assembly
- 3:33 Uploading Code & Wi-Fi Setup
- 4:10 Radio Browser API & Country/Genre Filters
- 5:31 Device Complete – First Power On
- 6:04 How to Use (Volume, Stations, Country, Keywords)
- 7:09 Outro & Call for Comments
Project Background
Makers often start with a simple idea that works on the bench but struggles to become a daily-use product. TechTalkies wanted a free internet radio that streamed over 30,000 stations via the open Radio Browser API, controlled by one rotary encoder, with no subscriptions or cloud lock-in. The XIAO ESP32S3 provided the dual-core power and compact size needed, paired with a MAX98357A amplifier, ST7735 display, and KY-040 encoder. The breadboard version proved the concept and attracted strong interest, yet the tangle of wires, dual power inputs, and noise sensitivity made it feel temporary. The real goal was a clean, reliable device that could sit on a desk permanently—something only a purpose-designed PCB can deliver.
What This Video Covers
The video shows the complete path from modular prototype to finished custom board. It covers the dual-core software architecture that keeps audio and UI independent, the single-knob user experience with live metadata, the practical noise and mechanical issues that appear once wires are removed, and how a carefully engineered 4-layer PCB solved them. Viewers see the before-and-after difference in audio cleanliness, encoder feel, and overall usability when the hardware finally matches the software quality.
Project Highlights and Key Features
- Dual-core FreeRTOS split keeps audio streaming smooth while the UI stays responsive.
- Double-buffered display updates station names and track info without flicker.
- One rotary encoder handles volume, browsing, and filter menus with reliable decoding.
- On-device country and genre filtering across 30,000+ stations.
- Automatic skipping of dead or silent streams.
- Live ICY metadata shown in real time.
- Compact 4-layer PCB with short I2S paths, solid ground plane, and ENIG finish for quiet audio and easy assembly.
- Enclosure-ready mounting and edge connectors for a clean final product.
Together these choices turn a typical maker build into something that feels finished and reliable for everyday use.
Challenges Encountered During Development
The modular version worked well on the bench, but real-world use quickly revealed limits. Shared power and long jumper wires introduced noise that affected the Class-D amplifier, sometimes causing silent or intermittent audio even when Wi-Fi and display functioned. The encoder became less precise with extended wiring, leading to missed steps or double counts. Mechanically, the loose modules and dual power barrels made the radio hard to case or leave on a desk. These are the classic next-step problems that appear when a successful prototype is asked to become a permanent object—and exactly where a proper PCB design makes the difference.
How AIVON PCB Helps
AIVON reviewed the modular layout and focused on the points that matter most for quiet audio and easy assembly. A 4-layer stackup with continuous ground under the I2S section and a solid 5 V pour for the amplifier removed the noise that plagued the wire version. Local filtering on the encoder, proper decoupling, and length-matched clock lines kept signals clean. Mechanical details—mounting holes, USB-C placement, and FPC routing—were adjusted so the board drops straight into a 3D-printed enclosure. ENIG finish and clear silkscreen made small-batch hand assembly straightforward.
The result is a single compact board that delivers consistent audio, precise control, and a finished look without any flying wires. AIVON's DFM support, rapid turnaround, and practical manufacturing feedback help makers move from working prototype to reliable product quickly and with confidence.
Conclusion
A working breadboard proves an idea. A well-designed custom PCB lets that idea live as a finished product people actually keep using. Clean power distribution, short signal paths, and thoughtful mechanical integration are what close the gap.
FAQ
Q1: Why is a 4-layer board recommended for an ESP32 radio with Class-D audio?
A1: A continuous ground plane under the I2S and SPI lines is the most effective low-cost way to keep switching noise out of the audio path. Two-layer boards force longer return paths and more compromises on power distribution.
Q2: What surface finish works best with a rotary encoder and FPC display?
A2: ENIG provides a flat, corrosion-resistant surface that stays reliable after repeated mating and is easier to solder cleanly by hand than HASL.
Q3: Do I2S and SPI clock lines need impedance control on a small radio board?
A3: Full differential pairs are not required, but keeping the single-ended clocks length-matched and controlled prevents occasional glitches and flicker under real Wi-Fi load.
Q4: What are the most common DFM issues when moving from modular ESP32 + MAX98357A to a single PCB?
A4: Shared amplifier and digital grounds without enough stitching vias, decoupling capacitors placed too far from power pins, and speaker traces that are too narrow for peak current.
Q5: How should 3.3 V and 5 V power be handled on a compact radio board?
A5: Keep the domains separate until a single star-point ground near the power entry. Use a solid 5 V pour for the amplifier and never let speaker return current share the digital ground path.
Call me old-fashioned, but I like listening to the radio. I find it relaxing. So, I made this — my very own internet radio which can tune into radio stations from around the world.
I designed this 3D printed enclosure for the radio and it runs on a Xiao ESP32S3. It is the smallest board I have. A MAX98357A amplifier and a speaker. I'm using an 8 ohm 2 watt speaker. A rotary encoder module. A TFT display. This one is 1.8 inch. A 4x6 inch PCB and some wires.
I have made all the connections on a breadboard to check if everything works. The connection diagram link is in the description. Everything works. The UI is responding well to the rotary encoder. So I went ahead and made all the connections on the PCB.
And if you need a custom PCB for a project, Aivon is a one-stop PCB manufacturing and assembly service. So you can go from design to fully assembled board without juggling multiple vendors. Ordering is also pretty straightforward. You can go to their website, upload your Gerber files, select your board specs like thickness, layers, and quantity, and you'll get an instant quote. From there, you can place your order, track the progress online, and they handle the rest, including fabrication and even assembly if needed. They support everything from quick prototypes to full production ones. If you want to try it out, I have left the links in the description. Go check them out.
Let's upload the code before adding the ESP32 to the setup. The code link is also in the description. In the project, select the secrets tab and update your Wi-Fi name and password here. And the program is ready to upload. But if you want to make changes to the program, you can do that too.
So the radio works using the Radio Browser API. This is the free API URL. Do not change it. Next, you can add or remove countries in this list here. And if you want specific search terms like jazz, you can add that here.
And the device is complete.
Normally rotating the knob lets you control the volume and if you press and hold you can change the channels. Here there are three options which you can switch using the knob. Here you can select the currently playing station. And next you can change the country. And after that, you can change the keyword. For now, I've only set up music, news, and all. You can add more terms in the code like I showed you before.
I cannot show you any real music stations because of the copyright issues. But this is how it works.
Comment if you have any ideas for improvement or if you're making your own radio.