After testing the first prototype of my ESP32-based PCB (see my blog post), I identified several areas for improvement. This iterative improvement process is critical in PCB design, as in any engineering effort. Every prototype reveals issues that aren’t always obvious during the initial design phase. To address these findings, I’ve made a series of changes and recorded updated lectures to guide you through the process. These updates are now available in my KiCad 9 and ESP32 PCB design course. If you are enrolled in this course, you will find the new lectures in a new section at the end of the course.
What’s new and changed?
The second prototype incorporates both functional fixes and optimizations based on my testing results. One of the most significant changes involves the microphone connection. In the first prototype, the microphone output was connected to GPIO5, which was problematic because this pin is unavailable for analog-to-digital conversion when Wi-Fi is active. To resolve this, I swapped the microphone output with the CSSD pin, reassigning the microphone to GPIO0—a more suitable choice for ADC1. This change allows the microphone to function without disabling Wi-Fi.
I’ve also introduced a variable gain control for the microphone amplifier. The first prototype had a fixed gain, which wasn’t ideal for all use cases. By adding a trimmer potentiometer and adjusting the values of key resistors and capacitors, you can now set the gain anywhere between 25x and 125x, offering greater flexibility in signal amplification.
Another issue I encountered involved the photosensor. The initial design incorrectly routed its output, leading to suboptimal performance. I corrected this by properly wiring the output to pin 1, as specified in the sensor’s datasheet. Additionally, I added signal-conditioning capacitors, including C25, positioned near GPIO1, to filter noise and improve signal integrity.
Usability is just as important as circuit performance, so I made a few adjustments to improve the physical design of the board. The first prototype had small buttons for boot and reset, which were difficult to press. In the second prototype, I’ve replaced these with larger, more ergonomic buttons, making them easier to use.
To further refine the board, I added a ferrite bead at the output of the MCP73871 battery management IC. This component helps reduce high-frequency noise from the switching charger, which can interfere with sensitive analog and RF circuitry.
With these changes implemented in the schematic, I also updated the 3D model and PCB layout. This ensures that the physical board accurately reflects the new components and modifications. Since some of the new components, such as the ferrite bead and trimmer potentiometer, did not have pre-made 3D models, I manually adjusted their sizes and positions for a realistic visualization.
Before finalizing the layout, I conducted a last round of checks to improve track routing and component placement. Although I am not sending this second prototype for manufacturing just yet, I wanted to ensure the design is as refined as possible before committing to another round of fabrication. Prototyping can be expensive, so careful design validation is key to minimizing unnecessary costs.
What You Will Learn
This course update gives you firsthand experience in refining a real-world PCB design. You will learn how to:
- Identify and correct issues discovered during prototype testing.
- Reassign ESP32 GPIO pins to optimize functionality.
- Implement variable gain control for audio signals.
- Improve sensor performance through proper wiring and signal conditioning.
- Enhance the user experience by selecting and positioning better components.
- Reduce noise and improve power management with ferrite beads.
- Update 3D models and PCB layouts to reflect design changes.
- Conduct schematic and layout checks to ensure a robust final design.
Enroll or Continue Learning
If you’re already enrolled in the KiCad 9 and ESP32 PCB design course or have a Tech Explorations subscription, these new lectures are now available to you (login here to access your courses). If you haven’t joined yet, this is a great opportunity to learn modern PCB design with KiCad 9, using a real-world ESP32 project as a case study (or subscribe to get instant access to all our courses).
This update is not just about fixing mistakes—it’s about improving your design skills and understanding the iterative nature of hardware development and gain valuable insights into how to refine and optimize a prototype before moving to production.
I look forward to hearing your thoughts and feedback. If you have any questions or suggestions for further improvements, feel free to reach out via the comments section below.