Сосредоточен на разработке решений ESP32.

Социальные сети :

Как спроектировать печатную плату для IoT-продуктов ESP32 (Полный инженерный рабочий процесс)

he PCB for ESP32 IoT products usually uses2‑layer or 4‑layer stack‑up, board thickness1.6мм, copper weight1oz (Следы мощности могут составлять 2 унции). Для антенны Wi‑Fi 2,4 ГГц, тот50Ω impedance trace width on 1.6mm FR‑4 is approximately0.8–1.0mm (в зависимости от толщины диэлектрика и диэлектрической проницаемости).

Poor PCB design leads to weak Wi‑Fi signals (packet loss increases 20–50%), excessive power ripple (ADC noise, degraded RF performance), and even EMI failures during certification. Fixing these issues in mass production costs 10‑100× more than fixing them in the design stage, potentially causing project delays or product recalls.

This article provides a complete engineering workflow from schematic review → PCB layout → routing rules → impedance control → antenna design → Gerber output, включая industry benchmark data and a 10‑point design checklist to help you get your first prototype right.

  • 2‑layer is for simple IoT devices; 4‑layer is the recommended starting point for Wi‑Fi/BLE products. A 4‑layer board provides solid ground and power planes, significantly improving signal integrity for only 30–50% higher cost.
  • 50Ω impedance control is mandatory for the antenna feed line and RF traces. Within ±10% tolerance is acceptable; beyond ±15% causes return loss >10dB and power loss >20%.
  • Decoupling capacitors must be placed very close to the chip’s power pins. Use 0.1μF + 10μF combination within 2mm of each ESP32 VDD pin; otherwise high‑frequency noise is not filtered.
  • No traces or copper under the crystal. ESP32 uses a 40MHz crystal; keep a 3mm keep‑out area under and around it (no metal), otherwise parasitic capacitance causes frequency drift > ±50ppm.
  • Antenna keep‑out area: at least 15mm × 10mm. All copper layers must be removed under and around an on‑board PCB antenna or IPEX connector. For external antennas, keep the cable as short as possible (<100мм).
  • Power trace width at least 1mm. ESP32 peak current can reach 500mA (Wi‑Fi TX). A trace that is too narrow (например, 0.2мм) will cause >0.2V drop and trigger undervoltage resets.
  • DRC must be zero errors before sending to fabrication. Unrouted nets, overlapping silkscreen, and clearance violations account for 70% of rework.
ESP32 PCB DESIGN SECRETS

ESP32 IoT PCB design is the complete engineering process of placing and routing the ESP32 chip and its peripheral circuits (power, кристалл, антенна, датчики, и т. д.) onto a printed circuit board

В отличие от обычной конструкции печатной платы, При проектировании печатной платы ESP32 следует уделять особое внимание целостность РФ, целостность власти, и согласование антенны. Потому что ESP32 объединяет Wi-Fi 2,4 ГГц и Bluetooth., любая паразитная емкость, разрыв импеданса, или шум земли напрямую ухудшает производительность беспроводной связи. Результаты проектирования включают файлы Gerber. (для изготовления), спецификация (на закупку комплектующих), и выбери-&-поместить файлы (для сборки SMT).

Простой IoT-продукт с датчиком температуры/влажности: плата с модулем ESP32‑WROOM, Датчик SHT30, LDO-регулятор, разъем батареи, и разъем антенны IPEX. Конструкция должна держать следы I²C вдали от кристалла и радиочастотной секции., поместите выходной конденсатор LDO рядом с контактом 3,3 В ESP32., и установите сопротивление фидерной линии антенны на 50 Ом.

Шаг 1: Define system requirements and select ESP32 model

  • ESP32‑C3 (RISC‑V, Wi‑Fi/BLE 5.0): самая низкая стоимость, sufficient for many tasks.
  • ESP32‑S3 (AI accelerator, more I/O): for camera, отображать, or complex products.
  • ESP32‑WROOM module (flash and crystal built‑in): recommended for most IoT products – simplifies antenna matching and certification.
  • ESP32‑PICO (SiP package): for extreme miniaturization.

For most IoT products, тотESP32‑WROOM‑32E module is the safest choice.

Шаг 2: Design the schematic and add necessary peripheral circuits

Must include:

  • 3.3V power supply (LDO such as AMS1117‑3.3 or RT9080, input caps 10μF+0.1μF, output caps 10μF+0.1μF)
  • USB‑to‑UART bridge (CP2102 or CH340 for programming/debugging – may keep or omit in final product)
  • EN pin 10kΩ pull‑up + 0.1конденсатор мкФ (prevents reset glitches)
  • IO0 pin 10kΩ pull‑up + button to GND (for programming mode)
  • Развязывающие конденсаторы: one 0.1μF near each power pin (ВДДА, ВДД3П3, и т. д.)

Шаг 3: Create PCB footprint and import netlist

  • Download official ESP32 module footprints (Altium/KiCad/EAGLE) from the Espressif GitHub repository – do not draw your own to avoid pad size errors.
  • Verify that the thermal pad (center pad) is connected to ground and has vias for heat dissipation.
  • After importing the netlist, check that all power nets (3.3В, Земля) are complete and no pins are left floating.

Шаг 4: Choose PCB stack‑up

LayersThicknessCopper weightApplication
2‑layer1.6мм1ozUltra‑low cost, non‑RF (Wi‑Fi is possible but tricky)
4‑layer1.6мм1oz outer / 0.5oz innerRecommended – solid GND and power planes, impedance controllable
6‑layer1.2мм1oz outerHigh density, many peripherals, sensitive signal shielding

Typical 4‑layer stack‑up: TOP (signal) → ЗАЗЕМЛЕНИЕ → 3,3 В → НИЗ (signal)

Шаг 5: Размещение компонентов (критический шаг)

Приоритет 1 – РЧ и антенна

  • Установите разъем IPEX или антенну на печатной плате. у края доски, защитная зона под антенной для всех слоев.
  • Сохраняйте линию питания антенны как можно короче (<30мм) с заземляющими отверстиями с обеих сторон.

Приоритет 2 - Власть

  • Разместите LDO рядом с контактами 3,3 В ESP32.; выходные крышки плотно прилегают к чипу.
  • Изолировать аналоговое питание (ВДДА) и цифровая власть (ВДД3П3) с ферритовым шариком (100Ох @ 100 МГц).

Приоритет 3 – Кристалл

  • Поместите кристалл 40 МГц. в пределах 5 мм контактов ESP32.
  • Никакой маршрутизации или медного кабеля (включая заземление) под кристаллом.

Приоритет 4 – Разъемы

  • USB, датчики, кнопки и т. д.. возле края доски.
  • Подтягивающие резисторы I²C возле конца датчика.

Шаг 6: Маршрутизация (критические правила)

  • 50Контроль импеданса Ом: Используйте калькулятор импеданса (например, Набор инструментов для печатных плат Saturn). Для 1,6 мм FR‑4 (εr≈4,6, толщина 1,6 мм, 1унция меди, микрополосковая), 50Ω trace width ≈ 0.8–0.9mm.
  • Differential pairs (USB D+/D‑): length matched (±0.5mm), spacing 0.2mm, continuous reference ground plane.
  • Power traces: width ≥ 1mm (or use polygon pours); rule of thumb: 1mm ≈ 1A capability.
  • Clock lines (crystal output): very short, ты не видишь, surrounded by ground.
  • Trace spacing: signal‑to‑signal ≥ 0.2mm, avoid long parallel runs (crosstalk).

Шаг 7: Copper pour and vias

  • Top and bottom layers – pour GND where possible, but keep‑out under antenna.
  • Vias: signal vias 0.3mm drill / 0.6mm pad; power vias can be larger (0.4/0.8мм). For RF, place ground vias every 1–2mm (spacing < λ/20 ≈ 6mm).
  • Stitching vias: place a ring of vias every 2–3mm along the board edge to connect top and bottom ground, reducing edge radiation.

Шаг 8: DRC and verification

  • Run DRC – zero errors, zero unrouted nets.
  • Check silkscreen: component labels clear, orientation consistent, not overlapping pads.
  • Generate 3D view to verify mechanical fit.
  • Export Гербер-файлы (RS‑274X format) and review them in a third‑party Gerber viewer.

Шаг 9: Output production files and order

  • Gerber package (copper top/bottom, silkscreen top/bottom, solder mask top/bottom, drill files, drill drawing)
  • Спецификация материалов (part number, упаковка, quantity, manufacturer)
  • Pick & place coordinate file
  • When ordering, select flying probe test (100% open/short test)
ESP32 PCB Design Flowchart

Пример случая:
A company producingESP32‑based smart irrigation controllers experienced30% Wi‑Fi connection failures in field tests. After redesigning the PCB with the following methods, they reduced connection failures toпод 2%:

  • Method 1: Upgraded from 2‑layer to 4‑layer, adding solid ground and power planes. RF return path improved, spurious radiation reduced by ≈15dB.
  • Method 2: Изменена линия питания антенны со случайной маршрутизации на 50Микрополосковая полоска с контролируемым сопротивлением Ом (0.85ширина мм, шлифованные отверстия каждые 1 мм). Обратные потери улучшены с -8 дБ до -18 дБ..
  • Method 3: Все развязывающие конденсаторы перемещены с расстояния 12 мм в пределах 1,5 мм от модуля ESP32.. Пульсации мощности снизились со 120 мВ до 25 мВ..

Результат: Процент успешных подключений к Wi-Fi вырос с 70% к >98%. Продукт прошел сертификацию FCC/CE, а возвраты на местах сократились на 80%.

Фактор 1: Контроль импеданса

Линия питания антенны и радиочастотные трассы должны иметь сопротивление 50 Ом ± 10 %.. Изменение зависит от допуска травления производителя печатной платы. (±0,02 мм) и изменение толщины диэлектрика. Решение: Заранее обсудите схему импеданса с вашим производителем и добавьте купоны импеданса в Gerber..

Фактор 2: Целостность заземления

The ground plane under the ESP32 must not be split. Any trace (I²C, УАРТ) crossing a split ground plane destroys the return path and increases common‑mode radiation. Решение: ensure every signal layer is adjacent to a solid ground plane.

Фактор 3: Power decoupling

When ESP32 transmits Wi‑Fi, current jumps from a few tens of mA to 500mA with rise time <10ns. If decoupling capacitors are insufficient or too far, VDD drops and triggers brown‑out resets. Решение: place 0.1μF + 10μF on each power pin and ensure total capacitance ≥47μF.

Фактор 4: Crystal layout

The 40MHz crystal’s load capacitors (typically 10–20pF) must match the crystal specification. No copper, traces or vias under or within 3mm of the crystal.

Фактор 5: Antenna keep‑out area

A PCB antenna needs a copper‑free area of at least 15×10mm. Nearby metal‑coated plastic housings, large capacitors or batteries degrade performance. For metal enclosures, an external antenna is required.

Фактор 6: Via parasitics

Vias on RF traces introduce ~0.5‑1pF parasitic capacitance and a few nH of inductance, causing impedance discontinuities. Решение: avoid vias on RF traces if possible, or simulate with proper RF via models.

Фактор 7: Управление температурным режимом

Under sustained high load, the ESP32 module temperature can rise by 40°C (from 25°C ambient to 65°C), affecting RF performance. Решение: place at least 9 vias under the thermal pad connecting to the ground plane for heat dissipation.

Фактор 8: PCB material

Standard FR‑4 has a loss tangent (tanδ) of ≈0.02 at 2.4GHz. For long RF traces (>50мм), this adds 0.5‑1dB insertion loss. For high‑performance designs, Rogers 4350B hybrid stack‑ups can be used but cost 3‑5× more.

Typical Industry Range for ESP32 PCB Design Parameters:

ПараметрБюджетный / 2‑LayerСтандартный / 4‑LayerВысокая производительность / 4‑Layer+
Board thickness1.6мм1.6мм1.2–1.6mm
Copper weight1oz (outer only)1oz outer / 0.5oz inner2oz power / 1oz others
50Ω trace width (1.6mm FR4)N/A (no control)0.85mm ±0.05mm0.80mm ±0.02mm + impedance coupon
Impedance toleranceNot specified±15%±10%
Minimum trace/space0.2mm/0.2mm0.15mm/0.15mm0.1mm/0.1mm
Vias (drill/pad)0.4mm/0.8mm0.3mm/0.6mm0.2mm/0.45mm
Antenna keep‑outНикто10×8mm15×10mm
Decoupling cap distanceAnywhere<5мм<2мм
PCB cost (for 100pcs, доллар США)$1–2$3–5$6–10+

Примечание: Costs are estimates and vary with board size and fabricator.

2-Layer PCB vs. 4-Layer
2-Layer PCB vs. 4-Слой
  • 1. Schematic completeness – Check that every power pin has a decoupling cap, EN pin has pull‑up and cap, IO0 has pull‑up and button. Does USB‑UART include auto‑programming (необязательный)?
  • 2. Power integrity – Are LDO input/output caps placed close to the LDO? Power trace width ≥1mm? Analog and digital power separated by ferrite bead?
  • 3. Crystal layout – Crystal within 5mm of ESP32? No traces/copper under it? Load capacitor values correct and grounded?
  • 4. Antenna and RF – Antenna feed line 50Ω impedance controlled? Ground vias on both sides? Keep‑out area clear on all layers? IPEX connector at board edge?
  • 5. Ground plane check – Is there a continuous ground plane (at least one full layer)? Do signal traces have an uninterrupted return reference plane?
  • 6. Vias and thermal – Thermal pad has ≥6 vias to ground plane? Are there unnecessary vias on RF traces?
  • 7. Trace spacing and crosstalk – Distance between RF trace and digital signals ≥0.5mm? Crystal output trace far from other signals? I²C SDA/SCL length matched and parallel run <50мм?
  • 8. Silkscreen and assembly – Component labels clear, orientation consistent (diode, IC pin‑1 marks). Board name, revision, date included? Board dimensions match enclosure?
  • 9. DRC and ERC – DRC zero errors, zero unrouted nets. ERC has no floating pins or duplicate references.
  • 10. Production files ready – Gerber includes all layers (drill files, drill drawing). BOM has complete part numbers and packages. Pick‑&‑place file provided.
  • Method 1: Add ground stitching vias – Place ground vias every 2‑3mm along the board edge and between power islands to reduce common‑mode radiation by 30–40%.
  • Method 2: Use common‑mode chokes – Add a common‑mode choke (например, Würth 744232261) on USB D+/D‑ or long I²C lines to suppress conducted EMI.
  • Method 3: Optimize antenna matching – Reserve a π‑matching network (2 caps + 1 inductor) near the IPEX connector. Use a network analyzer to tune for VSWR <1.5.
  • Method 4: Add a shielding can – Solder a metal shielding can (with windows) over the ESP32 and RF area to reduce radiated emissions by >20dB and protect from external noise.
  • Method 5: Perform signal integrity simulation – Use HyperLynx or ADS to pre‑simulate critical signals (RF trace, clock lines) and adjust impedance/length matching before routing.
  • Ошибка 1: Copper pour under the antennaПоследствие: Antenna severely detuned, effective radiated power drops 10‑20dB (90%+ range loss).
    Correct approach: Keep‑out area under antenna for all layers.
  • Ошибка 2: Crystal trace too long or with viasПоследствие: Added parasitic capacitance causes frequency drift ±50ppm, possible startup failure or Wi‑Fi clock error.
    Correct approach: Crystal within 5mm, ты не видишь.
  • Ошибка 3: Ignoring decoupling capacitor placementПоследствие: Caps more than 10mm away from IC pins have >5nH ESL, ineffective for high‑frequency noise.
    Correct approach: Capacitor ground directly to GND plane; positive trace <2mm to power pin.
  • Ошибка 4: No impedance control on RF traceПоследствие: Reflections increase return loss, transmit power drops 30–40%.
    Correct approach: Use impedance calculator, specify impedance requirement in Gerber.
  • Ошибка 5: Blindly copying reference design without adaptationПоследствие: Reference layout may be tuned for a different enclosure or evaluation board, causing antenna mismatch or noise pick‑up.
    Correct approach: Start from the reference schematic but re‑layout according to your mechanical constraints, and always build at least one prototype.

Typical 50Ω Microstrip Design Table (FR‑4, εr≈4,6, 1унция меди)

Board thickness (мм)Distance to reference (мм)Trace width (мм)Impedance (Ω)Practical?
1.60.3 (сверху к внутреннему GND)0.4550±2Да (4‑layer)
1.61.5 (сверху вниз GND)2.6502‑layer, слишком широкий
1.60.40.6504‑layer, общий
1.20.30.45504— многослойная тонкая доска
0.80.20.35506‑layer

Примечание: Для двухслойных плат толщиной 1,6 мм., базовая плоскость — это нижняя сторона, требуется ширина дорожки 2,6 мм для 50 Ом – непрактично.. Вот почему двухслойные платы не рекомендуются для ВЧ.Настоятельно рассмотрите 4‑слойный вариант – ширина дорожки становится ~0,5 мм.

Энергопотребление ESP32 & Требования к поставкам

Режим работыТипичный токПиковый токТребование к поставке
Глубокий сон (РТК)6–10 мкААккумулятор в порядке, никаких дополнительных шапок
Легкий сон0.8мА
Модемный сон (Wi‑Fi выключен)20мАLDO достаточно
Станция Wi‑Fi подключена80мА350мАВыходная емкость ≥47 мкФ, LDO или DCDC
Wi‑Fi TX220мА500мАDCDC рекомендуется, LDO требует теплоотвода
Wi-Fi + BLE одновременный300мА650мАDCDC обязателен, входной колпачок ≥100 мкФ

Основная логика: Успех дизайна печатной платы продукта ESP32 IoT зависит отцелостность властиКонтроль радиочастотного импеданса, инепрерывность заземления. By choosing a 4‑layer stack‑up, tightly controlling 50Ω impedance traces, optimizing decoupling capacitor placement, respecting antenna keep‑out areas, and following the 10‑point checklist, you can achieve>90% first‑pass success.

Decision criteria:

  • Cost‑sensitive, non‑critical RF performance → 2‑layer + external antenna, but expect multiple tuning iterations.
  • Standard IoT products (экологический мониторинг, умный дом) → 4‑layer + ESP32‑WROOM module + PCB antenna.
  • High‑performance or stringent certification (medical, автомобильный) → 4‑ or 6‑layer + external high‑gain antenna + shielding can + pre‑certified module.

Final advice: Even if your budget is tightdo not skip the 4‑layer board. The field return rate of 4‑layer designs is 5‑10× lower than 2‑layer, making total cost of ownership lower. Investing two extra days in impedance simulation and layout optimization can save two months of debugging later.

1 квартал: Do I need a 4‑layer PCB for ESP32?
А: Not strictly required. For prototyping or extremely lenient Wi‑Fi performance, a 2‑layer board can work, but range will be reduced and interference susceptibility higher. For any commercial product, 4‑layer is strongly recommended.

2 квартал: How to calculate 50‑ohm trace width?
А: Use an online tool like Saturn PCB Toolkit. Input board thickness, dielectric constant (FR‑4 ≈ 4.6), copper weight, trace layer, and reference layer. For a typical 4‑layer board, trace width is around 0.45–0.6mm.

Q3: Can I use a PCB antenna instead of an external one?
А: Да. PCB antennas (например, IFA) are low‑cost and need no extra component, но они требуют точного сдерживания и контроля импеданса.. Внешние антенны (ИПЕКС + резиновая утка) работают лучше и их легче настроить.

Q4: Почему мой ESP32 сбрасывается при передаче по Wi-Fi?
А: Скорее всего пропало питание. Убедитесь, что выходной конденсатор LDO имеет емкость не менее 47 мкФ., следы питания достаточно широкие, и батарея не стареет с высоким внутренним сопротивлением.

Q5: Каков типичный зазор антенны на печатной плате??
А: Не менее 15×10 мм свободной от меди зоны под и вокруг антенны. Нет компонентов, нет меди. Если пластиковый корпус черный (углеродосодержащий), он поглощает радиочастоты — либо выдвиньте антенну, либо используйте внешнюю антенну.

Q6: Нужна ли мне защита от электростатического разряда??
А: Для открытых разъемов (USB, кнопки, разъемы датчиков), добавить ESD диоды (например, USBLC6‑2). Входы/выходы ESP32 имеют лишь ограниченную внутреннюю защиту от электростатического разряда. (±2кВ НБМ), so external interfaces are vulnerable.

Q7: Can I power ESP32 directly from a 3.7V Li‑ion battery?
А: Нет, a fully charged Li‑ion battery reaches 4.2V, exceeding the ESP32 absolute maximum (3.6В). You must use an LDO (например, RT9080‑33) or a DCDC to regulate down to 3.3V.

Q8: How can I help my PCB pass FCC/CE?
А: Use a pre‑certified ESP32 module (например, ESP32‑WROOM‑32E) to reduce effort. Кроме того, design with good power filtering, a shielding can, common‑mode chokes, and a solid ground plane. Pre‑test before final tooling.

Изображение Берг Чжоу

Берг Чжоу

Берг Чжоу сосредоточен на разработке схемы ESP32, Разводка печатной платы, разработка прошивки и массовое производство печатных плат. Умеете заниматься схемотехникой, выбор компонентов, тестирование прототипов и комплексные решения OEM/ODM. Обеспечить стабильную, надежные и экономичные функциональные модули и платы управления ESP32 для клиентов по всему миру, поддержка индивидуальных разработок и серийного производства.

Последние сообщения

Перевод
Сделать основным языком
WhatsApp
WhatsApp
Электронная почта
Электронная почта
Вичат
Вичат
Вичат

Получить предложение

Наши эксперты по продуктам и технические специалисты ответят на ваши вопросы в течение 24 часы.

Мы используем файлы cookie, чтобы обеспечить вам максимальное удобство использования нашего веб-сайта..