RF and Antenna Layout for the ESP32 Module
The module's certification assumes a layout. Break the assumption and you get neither the range nor the certificate.
🎯 By the end you'll understand
What a pre-certified radio module actually promises and what it silently requires of your board in return. The three integration rules Espressif states for the ESP32-C3-MINI-1 — module at the board edge, antenna region clear of copper on every layer, clearance from metal and from the battery — and the physics behind each, including the part that surprises people: the antenna needs the ground plane under the module body and must have none under the antenna itself. How to spend Beacon's link budget deliberately, why fade margin rather than nominal range predicts field behaviour, and what a walk test can and cannot tell you without an anechoic chamber.
KEY INSIGHTYou did not buy an antenna; you bought half of one
The board was beautiful. Ground pour on all four layers, stitched every three millimetres, not a bare patch anywhere — including under the antenna. It worked at two metres.
A module like the ESP32-C3-MINI-1 arrives with a radio, a matching network and a printed antenna already tuned, already tested, already certified. That bundle is enormously valuable: it removes the hardest part of RF design from your project. What it does not remove is your responsibility for the antenna's environment, because a printed antenna is a resonant structure that only resonates where you put it. Espressif tuned that antenna sitting at the edge of a host board with a specific relationship to ground and to free space, and everything about its performance — resonant frequency, radiation efficiency, pattern — is a statement about that arrangement.
Which means the module ships with conditions attached, and they are conditions on your copper. Pour ground under the antenna and you have not violated a guideline; you have built a different antenna, one nobody tuned, resonating somewhere other than 2.4 GHz. The same applies to the paperwork: modular approval covers a module integrated according to the manufacturer's instructions, and the antenna keep-out is one of those instructions. Violate it and both the range and the compliance claim quietly stop being true — quietly being the operative word, because nothing in your tools will say a single thing about it.
The antenna region is the one part of the board where the correct amount of copper is none, on every layer — and the region immediately behind it is the one part where the correct amount is as much continuous ground as possible. Both halves matter. A printed monopole radiates against the host ground plane; take that plane away and you have detuned it just as surely as by covering it.
HOW IT WORKSThe integration rules, and what each one is protecting
Espressif's module hardware design guidelines state the requirements for its PCB-antenna modules in a few lines. Paraphrased, with the reason attached to each:
| Rule | What it protects | What breaking it costs |
|---|---|---|
| Place the module at the edge of the host board, ideally with the antenna area extending past the board | Free space in front of the antenna; the radiating structure is not loaded by dielectric or copper on three sides | Resonance shifts down in frequency, efficiency drops, the pattern deforms towards whatever is nearby |
| Keep the antenna area clear of copper on every layer — traces, pours, planes, vias, and components | The antenna's near field, which extends well beyond the printed structure and reaches into your stackup | The largest single penalty available. Copper 0.21 mm below the antenna is inside its near field, not near it |
| Keep clearance between the antenna and metal — enclosure parts, battery, shields, screws, the asset itself | The same near field, extended into three dimensions and into the enclosure design | Detuning plus absorption; a metal enclosure is a cage and ends the discussion |
| Ground plane under the module body, with the module's ground pads well stitched | The counterpoise the printed monopole radiates against, and the return path for the module's own supply currents | An antenna with no counterpoise: also detuned, also inefficient, and now the ground return is poor as well |
| The datasheet's keep-out figure gives the actual dimensions | You, from guessing | Guessing. Pull the module's current datasheet and copy the figure into your footprint as a rule area |
CORE CONCEPTWhy copper near an antenna is expensive
Three separate mechanisms are usually collapsed into "it detunes it". They fail differently and it is worth keeping them apart.
1. Capacitive loading shifts the resonance
A printed monopole or inverted-F resonates at a frequency set by its electrical length, and electrical length depends on the dielectric and conductive environment. Bring a grounded conductor close and you add capacitance to the structure, which lengthens it electrically and moves resonance down in frequency. The radio still transmits at 2.44 GHz; the antenna is now happiest at, say, 2.2 GHz; the mismatch reflects power back into the matching network. Note the direction — adding copper always moves the resonance the same way — and note that "close" for a 2.4 GHz structure includes the layer 0.21 mm below it.
2. A ground plane behind the radiator kills efficiency
Worse than mistuning, and less intuitive. A monopole's radiating near field wants to expand into space. Put a solid conductor immediately behind it, a small fraction of a wavelength away, and the field induces an image current that cancels much of the radiation instead of adding to it. The result is not a mismatch you could tune out — it is power that goes into heating copper instead of leaving the board. This is the mechanism that turns a working design into a two-metre design, and it is why the fix is a keep-out rather than a different matching network.
3. Lossy conductors absorb — and a LiPo pouch is a lossy conductor
The battery is the most-missed offender on a compact board. A pouch cell is aluminium-laminate foil wrapped around wet chemistry, which is both a reflector and an absorber at 2.4 GHz. Placed behind the antenna it detunes; placed in front it shadows. Beacon's canon puts the cell at the opposite end of the assembly for exactly this reason, and the enclosure design in Stage 6 has to keep it there.
Here is the part that catches people who over-correct. A printed monopole radiates against a counterpoise, and on a module the counterpoise is the host board's ground plane under and behind the module body. Cut that away — say, by clearing copper under the whole module instead of just the antenna region — and the antenna is detuned in the other direction and the module's own supply return degrades as well. The rule is not "keep copper away from the module". It is solid ground under the body, no copper under the antenna, and a clean boundary between them. On Beacon that boundary sits where the module's antenna band begins, and it is drawn as a rule area rather than left to the pour tool's judgement.
CORE CONCEPTThe link budget R2 is spending
Beacon's R2 asks for 10 m indoors through one plaster wall. Here is that requirement as a budget, so the decibels the rest of this lesson spends have somewhere to come from.
Path loss at one metre in free space: 32.44 + 20·log₁₀(2450 MHz) + 20·log₁₀(0.001 km) = 40.2 dB.
Indoors, path loss grows faster than free space. Using a log-distance model with an exponent of 3 — a common indoor value, and one to sanity-check against your own site: PL(d) = 40.2 + 30·log₁₀(d).
At d = 10 m: PL = 70.2 dB. Add ~4 dB for one interior plaster wall (typical figures for interior partitions at 2.4 GHz sit in the low single digits).
Received power = 0 dBm (TX, per the canon) + 0 dBi (module antenna, nominal) + 0 dBi (gateway) − 70.2 − 4 = −74.2 dBm.
ESP32-C3 BLE sensitivity on the 1 Mbit/s PHY is around −97 dBm. So the fade margin at 10 m is 22.8 dB, and the distance at which the margin reaches zero is 1052.8/30 ≈ 58 m.
Two honest observations about that budget, both of which change how you read the widget below.
First: the requirement is not the constraint; the margin is. Twenty-three decibels sounds like an enormous amount of headroom, and in a clean corridor it is. Indoors it is a working reserve. Multipath nulls — the places where a reflected copy arrives out of phase with the direct one — are routinely 10 to 20 dB deep and move when anything in the room moves. A human body between tag and gateway costs several decibels. A tag attached to the underside of a metal tool cart may lose ten. The margin is what absorbs all of that, and a layout error that costs 10 dB does not make the tag fail at 10 m; it makes the tag work at 10 m and drop reports unpredictably, which is a far more expensive defect to diagnose.
Second: with an exponent of 3, ten decibels roughly halves the range. Range scales as 10−P/30, so 10 dB of penalty leaves 46% of the distance and 20 dB leaves 21%. In free space the same 10 dB would leave 32%. Which exponent applies depends entirely on the site, so treat both as bracketing estimates rather than predictions, and get the real number from a walk test in the building the pilot will run in.
SEE ITKeep-out violator
Four decisions, each of which a designer makes for a reasonable-sounding reason: move the module inboard so the outline is simpler, pour ground everywhere because ground pours are good, put the cell behind the module because that is where the space is, and specify an aluminium enclosure because it feels sturdier. Watch what each one takes out of the budget above.
The instructive combination is the second-worst one, not the worst. A metal enclosure fails loudly and gets fixed in an afternoon. The combination that ships is "3 mm inboard, inner-layer pour left in, cell behind the module" — every decision defensible, every one small, and together they take more than half the margin while the range figure still reads comfortably above ten metres. That board passes its corridor test, ships twenty-five units, and produces a pilot report full of gaps that nobody can reproduce.
IN PRACTICEVerifying without an anechoic chamber
You cannot measure absolute antenna gain, radiation efficiency or total radiated power on a bench. Those need a chamber and calibrated equipment, and if the product needs certified numbers you will pay a test house for them. What you can do at a desk is measure differences, and a keep-out decision is a difference. Here is a protocol that produces a defensible answer.
Build a reference
Two units, identical firmware, identical transmit power, identical battery state. One is your board; the other is a known-good comparison — an ESP32-C3 development kit with the same module, which by construction satisfies every integration rule. Everything you measure is a difference between the two.
Fix everything you are not measuring
Same position, same height, same orientation, same room, same time, gateway untouched. RF measurements in a room are dominated by the room; the only way to see a 5 dB board effect is to hold the 20 dB room effects constant.
Sample properly and use the median
RSSI is quantised, calibrated loosely, and noisy. Take dozens of advertising packets per point and compare medians. Treat a difference under about 3 dB as noise unless you can reproduce it after moving everything and putting it back.
Sweep orientation, not just distance
Rotate the tag through eight orientations at a fixed distance and record the spread. A good placement has a shallow spread; a detuned or shadowed antenna has deep nulls in particular directions, and the tag will be mounted in one of them by somebody.
Finish on the requirement, not on RSSI
R2 is about reports arriving, so the closing measurement is packet delivery ratio at 10 m through the wall, over an hour, with the tag mounted the way the pilot will mount it — on metal if the asset is metal. RSSI tells you which design is better; delivery ratio tells you whether the requirement is met.
It cannot tell you whether you still hold modular approval. Certification is a documentary question about whether the host follows the module manufacturer's integration instructions, and a board that violates the antenna keep-out but measures fine is still a board whose compliance claim is broken. If a pilot is going into someone else's building, that distinction matters commercially, not just legally.
BEACONBeacon Rev A's RF layout
Beacon's radio decisions were made at placement (Lesson 5.5) and are implemented here as copper and rules.
Module hard against the top edge, antenna band at the board edge
The ESP32-C3-MINI-1 sits at the top of the 35 × 25 mm outline with its antenna end flush to the edge. The antenna region is over bare laminate: no copper on L1, L2, L3 or L4, and no components. Beacon takes the "edge, cleared" arrangement rather than a physical overhang, because an overhanging module complicates the outline, the panel and the enclosure for a small, well-understood loss.
The keep-out lives in the footprint, not in the layout
From Lesson 5.3: the antenna keep-out is a rule area inside the module's footprint, set to exclude tracks, vias and copper pours on all layers. That way it travels with the part, it cannot be forgotten when someone re-pours, and DRC — not vigilance — is what enforces it.
Solid ground under the module body, stitched at 3 mm
Layer 2 is continuous under the body and everywhere behind it, which is the counterpoise the printed monopole radiates against. Every module ground pad gets its own via. The L1 and L4 pours around the module are stitched at 3 mm or tighter — λ/20 at 2.45 GHz in FR-4 is 2.9 mm — so the pours behave as one plane at the frequency that matters rather than as a set of resonant patches.
The noise sources are at the far end
The buck cluster sits about 9 mm from the antenna region and the charger and battery connector are in the opposite corner. That distance is not about detuning — it is desense, the switching harmonics raising the noise floor of a receiver listening for −97 dBm.
The battery is a mechanical decision with an RF consequence
The 1000 mAh pouch lives at the connector end of the assembly, not folded behind the module. This constraint belongs to the enclosure (Lesson 6.5) as much as to the PCB, and it is written into the mechanical drawing so that nobody redesigns the shell into a problem.
Deployment instructions are part of the RF design
Beacon attaches to metal assets. A 2.4 GHz tag flat against a large metal surface is the worst case that exists for it, so the enclosure orients the antenna end away from the mounting face and the pilot instructions say so. Layout can buy you 20 dB of margin; a bad mounting habit can spend it in one afternoon.
(zone (net 0) (net_name "") (layers "F.Cu" "In1.Cu" "In2.Cu" "B.Cu") (name "ANT_KEEPOUT_U1") (hatch edge 0.5) (keepout (tracks not_allowed) (vias not_allowed) (pads not_allowed) (copperpour not_allowed) (footprints not_allowed)) (polygon (pts (xy 1.0 0.0) (xy 14.2 0.0) (xy 14.2 5.5) (xy 1.0 5.5))) ) ; Dimensions taken from the ESP32-C3-MINI-1 datasheet keep-out figure. ; All four layers listed deliberately: an inner-layer pour is 0.21 mm from ; the antenna, which is inside its near field, not near it.
One line in that zone definition is the whole lesson: (layers "F.Cu" "In1.Cu" "In2.Cu" "B.Cu"). A keep-out drawn on the top layer only is the most common version of this mistake, because the top layer is the one you are looking at when you draw it.
WEAKNESSWhere RF layout bites
Pours are good and this is still how most antennas get ruined. KiCad's fill tool does exactly what you ask: it fills every enclosed region on the layer, including the one under the antenna, and it does so again silently every time someone re-pours before generating outputs. The defence is structural rather than behavioural — a keep-out rule area on all layers, inside the footprint, so that the pour cannot enter and DRC objects if a track tries. Relying on remembering is relying on the one person who re-pours at 11 p.m. the night before the order.
Modular approval is granted to the module and extends to a host that integrates it according to the manufacturer's instructions — antenna keep-out included, and in some cases labelling and antenna-type restrictions too. A host that violates the integration conditions is not automatically covered, and finding that out during a customer's compliance review is a bad day. This is not a reason to avoid modules; it is a reason to read the integration section of the datasheet as a specification rather than as advice, and to keep the keep-out figure in the project as evidence.
A single reading in a single orientation in a single room is mostly a measurement of the room. It is entirely possible to place a tag in a constructive multipath spot, read a healthy −55 dBm from a badly detuned board, and conclude the layout is fine. Every RF claim needs a comparison against a reference unit, many samples, a median, and an orientation sweep. If a change cannot be measured against a control, it has not been measured.
KEY INSIGHTHow this connects
- Wireless Fundamentals: dBm, Link Budget, and Antennas (4.5) — where the budget arithmetic comes from, and why decibels are the only sane unit for this conversation.
- Placement: The Decision That Determines Everything (5.5) — the module was placed third, before anything could compete for its corner; this lesson is the copper consequence of that decision.
- Symbols, Footprints, and the Lie in Every Library (5.3) — why the keep-out belongs inside the footprint rather than being drawn by hand on every revision.
- DRC, DFM, and Getting a Board Manufactured (5.8) — where the rule area stops being a drawing and starts being a check that has to pass before the order goes out.
The copper is now correct, including the region where correct means absent. Next: whether anyone can actually build it.
GLOSSARYKey terms introduced
- Keep-out / rule area
- A region in the layout where specified objects are forbidden. For an antenna it must exclude tracks, vias, pads, footprints and copper pour, on every layer.
- Counterpoise
- The conducting structure a monopole radiates against — here the host board's ground plane under and behind the module body. Required, not merely tolerated.
- Detuning
- A shift in the antenna's resonant frequency caused by nearby conductors or dielectrics adding capacitance; always downwards in frequency as material is added.
- Radiation efficiency
- The fraction of power delivered to the antenna that leaves as radiation rather than heating nearby conductors. Ground directly behind a radiator attacks this, and no matching network recovers it.
- Near field
- The region around an antenna, extending a significant fraction of a wavelength, where stored energy dominates and any conductor becomes part of the antenna. At 2.45 GHz an inner layer 0.21 mm away is deep inside it.
- Modular approval
- Certification granted to a radio module that a host product may inherit, conditional on integrating the module according to the manufacturer's instructions — antenna keep-out and clearances included.
- Path-loss exponent
- The power of distance in a propagation model: 2 in free space, commonly 3 or more indoors. It determines how much range a given decibel penalty costs.
- Packet delivery ratio
- The fraction of transmitted advertising packets a gateway actually receives; the measurement that corresponds to the requirement, as opposed to RSSI, which corresponds to the design.
ACTIVE RECALLCheck your understanding
Answer in your own words first, then reveal.
1A colleague, worried about the antenna, clears copper from all four layers under the entire module. Why is that worse than clearing only the antenna region?›
Because the printed antenna is a monopole and a monopole needs a counterpoise. The ground plane under and behind the module body is the other half of the radiating structure; the module was characterised with it present. Remove it and the antenna is detuned in the opposite direction from the usual failure, radiation efficiency drops, and the module's own supply return path degrades at the same time. The correct arrangement has two halves: no copper under the antenna region, solid continuous ground under the body and behind it, with a clean boundary between them at the line the datasheet's keep-out figure gives.
2Three violations cost about 9 dB in total. The estimated range is still 27 m against a 10 m requirement. Why is that a defect rather than an acceptable margin?›
Because the nominal range assumes one clean path and real deployments do not have one. The number that predicts field behaviour is the fade margin at the required distance: Beacon starts with about 22.8 dB at 10 m, and 9 dB of layout penalty leaves under 14. That remaining reserve has to absorb multipath nulls of 10 to 20 dB, human bodies, tag orientation, and the metal asset the tag is bolted to. The failure mode is not a tag that stops working; it is a fleet in which some units miss some reports in some positions, intermittently, which is the most expensive class of defect because it is not reproducible on a bench.
3Distinguish detuning from desense, name a Beacon design decision that addresses each, and say why one cannot be fixed by re-matching.›
Detuning is a shift in the antenna's resonance caused by nearby copper, metal or the battery; it is a geometry problem, addressed by the antenna keep-out on all four layers and by keeping the LiPo pouch at the opposite end of the assembly. Desense is loss of effective receiver sensitivity because the board's own switching noise raises the noise floor; it is a noise problem, addressed by placing the buck cluster roughly 9 mm from the antenna region with a tight hot loop. The part that cannot be re-matched away is the efficiency loss when a ground plane sits immediately behind a radiator: a matching network can correct an impedance mismatch, but it cannot recover power that is being dissipated in copper instead of radiated.
4You have no anechoic chamber. Design a measurement that would convince a sceptical reviewer that removing an inner-layer pour under the antenna was worth doing.›
Measure a difference, not an absolute. Build two boards identical except for the pour, or use one board plus a known-good reference such as a development kit with the same module. Fix everything else: same room, same positions, same height, same orientation, same firmware and transmit power, same gateway, back to back in time. Collect dozens of advertising packets at each of several points and compare medians, treating anything under about 3 dB as noise. Add an orientation sweep at a fixed distance — eight rotations — because the pour will deform the pattern as well as reduce it, and a single orientation can hide that. Close with the requirement itself: packet delivery ratio at 10 m through the wall, over an hour, with the tag mounted as it will be in the pilot. And note for the record that the measurement does not settle the compliance question, which is documentary: the keep-out is an integration condition of the module's approval regardless of what the board measures.