Lab Overview
In this lab you’ll be starting the layout of your PCB. The goal is to use the content we presented in lecture 3 to properly place and orient components on the board, and connect them with traces, vias, pours, planes and other connectivity components. Your goal will be to get familiar with the layout process.
The easiest way to learn is just to DO.
General Tips for this Specific Layout
DAC Layout Considerations
The PCM5102APWR is a DAC or Digital-Analog Converter. It takes digital audio signals from the ESP32 and converts them to analog audio for the speaker driver chip (the TPA3116D2).
USB + Programming Header
The CP2104-F03-GM is a USB-Serial Adapter that allows us to communicate with the ESP32.
0-Ohm resistors + the Audio Jack
Note resistors R39 and R40 are 0-Ohm resistors. These resistors are use to selectively connect and disconnect the 35RAPC3BH3 Audio Jack for debugging purposes. While we won’t use the audio jack after the rest of the speaker is working, we will use it for initially testing the amplifier.
Considerations for Trace Sizing
Power Considerations
Mechanical Considerations
Note there are some components like the battery holders and the audio jack that go through the board. Make sure you leave space for this. Where do you want the battery holders? On the top or on the bottom?
ESP 32 Layout Guidelines
Note the ESP32 has a large metal case around the outside that acts as a faraday cage to block noise, as such it’s placement near power converters is not as much of a problem as other microcontrollers. However, it’s a Bluetooth-enabled and connected device which means it has an antenna, and that requires additional layout considerations.
This is a really good guide on guidelines for laying out ESP32 chips from Espressif.
Here’s a longer-format guideline on the Espressif ESP32 Layout Guidelines.
Audio Engineering Tips
Here’s a fun tutorial from Hackster on layout of an Audio Amplifier.
Check out this video from texas instruments on laying out Audio systems.
Check out this Application Note from TI on power supply layout for audio amplifiers (specifically the TPA3116D2 we are using).
Check out this guide on managing EMI also for the TPA3116D2 from TI.
More details on the amplifier can be found here.
And here are some layout techniques for a DIFFERENT TI Class-D amplifier.
List of Relevant Altium Tutorials
Component Placement
Rotating and Positioning Components
Layers
Creating Full Power + Ground Planes
Routing, Traces, Pours
Routing + Connectivity, Traces, + Trace Width
Mechanical
An easy way to change the board shape is to go to “View–>Board Planning Mode” or by hitting the “1” key as a shortcut. That will let you modify the board shape if you go to “Design–>Redfined Board Shape.”
Dimensioning Mechanical Components
Why is there a big red box on my layout and why do my components turn green when I drag my components outside it?
Note that you can also just delete the rooms as well, but we reccomend you lay out your components in rooms first.
My Pads are GREEN
Green is bad in Altium.
Yes, I know, it’s strange.
So for many smaller chip footprints Altium gets mad because it thinks YOU have drawn traces too close together when in reality it’s fine. Most of the time Altium just sets very conservative limits to the pad clearances.
Go to Design –> Rules
Then Clearance Checks and follow ALL the drop downs until you get here:
Then select “Ignore Pad-to-Pad Clearences within a Footprint,” hit Apply and then OK.
Additional Resources to Look @
Look at the last few lecture slides from lecture 3 to see some examples of good and bad layout.
A fun instructables on PCB Layout for microcontrollers from beginning to end.