The PCB layout mistakes that most often ruin a first IoT board are an antenna sitting over copper, power traces that are too thin, decoupling capacitors placed far from the chip, a weak ground under the chip, a crystal placed too close to noisy parts, slots cut through the ground plane, power and ground routed far apart, and, on battery-powered boards, a regulator that wastes current while the device sleeps. Each one is cheap to fix in the design file and expensive to find on a board that has already been made. The chip maker's hardware guide usually states the exact rule, so read it before you route.
The figures below come from Espressif's ESP32 PCB layout guidelines and Texas Instruments' application note PCB Design Guidelines for Reduced EMI. If your board uses a different chip, find the same section in its maker's guide, because the numbers change from part to part.
1. The antenna sits over copper or inside the board
A Wi-Fi or Bluetooth antenna needs empty space around it. Copper underneath or nearby detunes it, and the result is a device that connects on the bench and drops out in a real building.
For a module with a PCB antenna, Espressif suggests placing the antenna outside the base board, with its feed point as close to the board edge as possible. For an external antenna connector, it recommends keeping all layers clear of copper under the connector. It also recommends a clearance of at least 15 mm around the antenna in all directions inside the enclosure.
Check the enclosure drawing as well as the board. A metal case or a battery placed over the antenna area undoes a correct layout.
2. Power traces are too thin
A trace that is too narrow drops voltage when the radio transmits and draws a burst of current. The chip may reset only at full transmit power, which makes the fault hard to reproduce.
For the ESP32, Espressif's guidelines say the main power traces should be no less than 25 mil wide, the VDD3P3 power traces no less than 20 mil, and other power traces 12 to 15 mil. TI's note adds that power and ground should run directly over each other, which "reduces impedance and minimizes loop area."
3. Decoupling capacitors are far from the power pins
A decoupling capacitor only helps if the current loop between it and the pin is short. Placed a few centimetres away, it is mostly decoration.
Espressif recommends a decoupling capacitor at each power pin and a 10 µF capacitor before the power trace enters the chip. It also recommends ground vias close to each capacitor's ground pad, so the return path stays short. When you review the layout, trace the loop from the capacitor to the pin and back to ground with your finger. If the loop is long, move the capacitor.
4. The ground under the chip is weak
Many wireless chips and modules have a large ground pad underneath. It carries return current and heat, and a pad tied to ground through one or two vias does neither job well.
For the ESP32, Espressif states the ground pad at the bottom of the chip should connect to the ground plane through at least nine ground vias. Count them in the design file before you send it.
5. The crystal is too close to noisy parts
The crystal sets the chip's clock. Noise coupled into it shows up as unstable radio performance or failures that change with temperature.
Espressif's guidelines put the crystal at least 2.7 mm from the chip's clock pin. TI's note explains why spacing matters more generally: if the crystal and its circuit are kept apart from other components and traces, and loop areas are kept small, the crystal should not cause problems, while parts placed close to it can couple its harmonics into the rest of the board.
6. Slots and splits are cut through the ground plane
Current returns along the path of lowest impedance, which on a solid plane runs directly under the signal trace. Cut a slot across that path and the return current has to go around it, forming a loop that radiates.
TI's note gives two rules. When a plane has to be broken up by a row of component pins, "breaking up the plane with a row of holes is much better than having a long slot." When a ground is split, for example into digital and power ground, signals connected to the processor should stay entirely over the digital ground.
7. A two-layer board is routed like a four-layer one
A four-layer board with solid power and ground layers forgives a lot. A two-layer board does not, and many first prototypes are two-layer to save cost.
TI's note states that a two-layer board can reach 95% of the effectiveness of a four-layer board by copying what makes the four-layer board better: route ground directly underneath power, and grid the power and ground traces so they behave like planes. If you choose two layers, plan the ground pattern before routing signals.
8. The regulator's idle draw was never checked
On a battery-powered board, the part that decides battery life is often not the radio. Once a device sleeps most of the time, small constant drains add up, and the voltage regulator is usually the biggest one.
We worked through the numbers for an ESP32 sensor in our IoT prototype guide, using the chip's datasheet figures and our own stated assumptions: a 2,000 mAh battery and one Wi-Fi report an hour. Adding a regulator that draws 50 µA while doing nothing cut the estimated battery life from about 758 days to about 521, roughly a third, which is more than the chip's own sleep current costs. The same regulator on a device reporting every 15 minutes cost far less, because the radio dominates there.
Choose the regulator for its quiescent current as well as its output, check the figure in its datasheet at your actual load, and measure the whole board's sleep current with a meter before you order the production run.
A checklist to run before you order
- Antenna area is clear of copper on every layer, and the enclosure keeps the recommended clearance
- Power trace widths meet the chip maker's minimums
- Every power pin has its decoupling capacitor next to it, with a ground via beside the capacitor
- The chip's ground pad has the recommended number of vias
- The crystal is spaced from the clock pin and from noisy parts as the guide specifies
- No long slots in the ground plane under signal traces
- On two-layer boards, ground runs under power along its whole length
- Footprints match the datasheets of the exact parts you are buying
- On battery-powered boards, the regulator's quiescent current is checked and the board's sleep current measured
- Test points exist for power rails and programming pins
- The design passes a design-rule check set to your board house's own limits
Frequently asked questions
What are the most common PCB layout mistakes on IoT boards?
Antenna keep-out violations, thin power traces, decoupling capacitors placed far from the pins, too few ground vias under the chip, and poor crystal placement. All five are covered with exact figures in most wireless chip makers' hardware design guides.
Is a two-layer PCB good enough for an IoT prototype?
Often, yes, if you route ground under power and grid the power and ground traces. TI's EMI layout note puts a well-designed two-layer board at 95% of the effectiveness of a four-layer one.
How many ground vias does an ESP32 need under the chip?
Espressif's guidelines call for at least nine ground vias connecting the chip's bottom ground pad to the ground plane.
Should I follow the chip maker's layout guide or a general guide?
Start with the chip maker's guide for the parts you use, because its figures are specific to that chip. Use general guidance, like TI's note, for the rest of the board.
Hardware is part of what we build, from DeskBuddy to Edge Node Tech. If you are preparing a first board and want a second pair of eyes, you can tell us about the project.
