Sensor Board Schematic and Layout
Sensor Board Schematic and Layout
Overview
Section titled “Overview”Between “I can build it on a breadboard” and “I can draw a fabable ESP32 sensor board” sit schematic discipline and layout rules. Using a minimal board — an ESP32 module plus one I²C sensor plus power — this section walks KiCad schematic capture, ERC, footprint binding, and the PCB layout essentials, turning the Chapter 25 selection into a real board. By the end you will be able to:
- Draw a clear, reviewable ESP32 sensor-board schematic
- Keep connection errors out of layout with ERC and net labels
- Bind schematic to footprint and verify the pin map
- Lay out the PCB along four lines: power, RF, ground, decoupling
- Do a pre-fab DFM self-check (silk, clearance, board edge, panelisation)
Prerequisites
Section titled “Prerequisites”- Completed Chapter 22 Section 3 (tool choice) with KiCad installed
- Completed the Chapter 25 selection; module part and sensor interface fixed
- The chosen ESP32 module’s official schematic/footprint (module-vendor reference design)
Key Concepts
Section titled “Key Concepts”Schematic: block first, then wire
Section titled “Schematic: block first, then wire”- Blocks: power in → regulator → ESP32 module → sensor → interface/debug, arranged left-to-right, top-to-bottom along signal flow
- Copy the module reference design: the module’s mandatory support (EN pull-up, BOOT pull-down, decoupling, antenna matching) goes exactly as the official reference, not reinvented
- Net naming: readable labels (
SENSOR_SDA,3V3,GND) overNet-$(L123), with global labels for cross-sheet links - Power symbols: every GND tied to a power port, not “should be connected” by eye
ERC and footprint binding: clear errors before layout
Section titled “ERC and footprint binding: clear errors before layout”- Run ERC: unconnected pins, multiple-driver conflicts, missing power ports — all resolved at schematic stage
- Verify the pin map: the symbol’s pin numbers must match the real footprint one-to-one — line up the schematic pin table against the datasheet pin table (the most common fatal error)
- Footprint source: prefer the module vendor’s
.kicad_mod; if you draw one, measure the part or use the dimensional drawing (matches the Chapter 24 stencil work)
Four PCB layout lines
Section titled “Four PCB layout lines”- Power: regulator close to the module supply pin, minimal power-loop area, widened traces or a ground plane
- RF: keep the ESP32 antenna zone clear — a no-copper, no-trace keep-out below and around the antenna per the reference design; never bury the antenna under metal, a battery, or the enclosure
- Ground: an explicit single-point or solid-plane strategy; do not chop the ground plane between analogue sensing and digital return
- Decoupling: a capacitor at each IC supply pin, smallest values nearest the pin, vias straight to the ground plane
Pre-fab DFM checklist
Section titled “Pre-fab DFM checklist”| Item | Check |
|---|---|
| Min trace/gap | Within the fab’s capability (typically 0.10/0.10 mm floor) |
| Via aspect/drill | Hole and annular ring meet fab limits |
| Silk | Reference designators off pads, in-bounds, not conflicting with mask |
| Edge and mounting | Parts clear of the edge, screw holes short-free |
| Panelisation | V-cut/tabs sensible, SMT conveyor margin kept |
| Polarity | Diode/electrolytic/connector silk matches the footprint orientation |
[Needs board cross-check] Specific minimum fabrication parameters and antenna keep-out figures depend on fab and module; verify against the returned board. RF performance must be measured on real hardware (Chapter 25 already warned that simulation is not trustworthy for RF).
Verification
Section titled “Verification”| Check | Expected result | Verified |
|---|---|---|
| ERC clean / no unconnected | Any waivers are intentional and commented | |
| Pin table line-by-line | Schematic ↔ footprint ↔ datasheet agree | |
| Antenna keep-out | Reference net area met, no copper/trace | |
| Decoupling at the pin | A cap sits at each IC supply pin, close | |
| DFM list all pass | Fab rule check / self-check shows no red | |
| First board lights up | Power on, module boots, I²C reads the device |
Troubleshooting
Section titled “Troubleshooting”Issue 1: module does not boot, EN pin level wrong
Section titled “Issue 1: module does not boot, EN pin level wrong”Cause: EN pull-up/pull-down or decoupling not per the reference design, or a pin-map error.
Action: recheck the EN net and pin number against the official reference design.
Issue 2: Wi-Fi is weak or unstable
Section titled “Issue 2: Wi-Fi is weak or unstable”Cause: copper/trace/enclosure/battery over the antenna, or insufficient keep-out.
Action: inspect the antenna keep-out and plane handling, follow the module’s antenna guide; RF conclusions must be taken on the real board.
Issue 3: sensor not answering on I²C
Section titled “Issue 3: sensor not answering on I²C”Cause: SDA/SCL swapped, missing pull-ups, wrong address, or footprint pin misalignment.
Action: check pull-ups and address against the Chapter 25 digital-interface notes, meter the idle bus level, verify the pin map.
Best Practices
Section titled “Best Practices”- Do: copy the module’s mandatory support from the official reference design
- Do: clear ERC and line-by-line check the pin table before layout
- Do: follow the four layout rules for power / RF / ground / decoupling
- Do: run the DFM list before fab to save a respin
- Don’t: bury the antenna under metal, battery, or enclosure
- Don’t: judge ground continuity by eye instead of by net check
Summary
Section titled “Summary”Key points of this section:
- Schematic blocks first then wires; copy the module’s mandatory support, name nets readably
- Clear errors before layout: ERC plus a line-by-line pin-map check, footprints from the vendor
- Four layout lines: minimal power loop, RF keep-out, solid ground, decoupling at the pin
- A DFM self-check saves a respin: trace/gap/silk/edge/panel/polarity
- RF and real parameters settle on the returned board: simulation gives trend, measurement gives performance
We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.
💡 Mention tutorial.imagrove.com in your Alibaba chat with us — get 10% off your custom project quote.
First published attutorial.imagrove.com/kicad-hardware-design/04-sensor-board-schematic-and-layout/Please credit Imagrove and link back to this page when quoting or republishing.
Questions or issues with this tutorial?
Sign in with GitHub to leave a comment. If a step fails for you, tell us — we verify it and update the tutorial.
© Imagrove · ESP32 IoT Tutorial