ProjekinAja. Embedded Systems Stage 4 · Power & Wireless Lesson 4.5
● Stage 4 · Lesson 4.5

Wireless Fundamentals: dBm, Link Budget, and Antennas

Range is not a number a module has. It is what is left after you subtract every loss from the transmit power.

⏱ ~25 min read 📡 RF system 📐 Worked budget

🎯 By the end you'll understand

Why radio engineers talk in decibels, and how to move between dBm and milliwatts without a calculator. How to compute free-space path loss from first principles and why the indoor world needs a different exponent. How to assemble a link budget as a ladder of additions and subtractions, and how to read the margin at the bottom of it. What an antenna actually needs from your PCB — a ground plane, a keep-out, and distance from anything metallic — and why a module's pre-certification is conditional on you providing them. And the coupling that makes this Stage 4 rather than a radio appendix: every decibel of transmit power you add is charge out of the same cell that has to last six months.

KEY INSIGHTEvery decibel is either free or structural

The module's datasheet says 100 metres. The prototype managed three, through open air, in the same room. Nothing was broken. The antenna had been placed two millimetres above a solid ground pour, because that looked tidier on the layout.

A radio link is an accounting problem with one entry on the credit side and a long column of debits. You start with the transmitter's power. You add whatever gain the antennas provide. Then you subtract: the spreading loss of the space between them, the loss through every wall, the loss from bodies and orientation and mismatch. What remains is the power arriving at the receiver, and the only question that matters is whether it exceeds the receiver's sensitivity by enough to survive a bad moment. That difference is the margin, and it is the single number a wireless design is judged on.

🔑 Hold onto this

Decibels are not all equally purchasable. Transmit power is expensive — it costs current from the battery on every single packet, forever. Antenna placement is free — moving a module to the board edge and clearing the copper under it costs nothing per packet and is worth more decibels than the power amplifier can give you. When a link is short, the first question is never "can we transmit harder?" It is "which of these losses did we create ourselves?" On Beacon, the answer to that question is worth 14 dB, and the answer to the first is worth 9 dB and a month and a half of battery life.

DEFINITIONDecibels, and why radio insists on them

A decibel is a ratio of powers on a logarithmic scale: dB = 10 · log10(P1/P2). A dBm is the same thing with the denominator pinned to one milliwatt, so it is an absolute power: 0 dBm is exactly 1 mW, 20 dBm is 100 mW, and −100 dBm is 0.1 picowatts.

The reason radio uses them is not tradition. It is that every loss in the chain multiplies. Free space attenuates by a factor; a wall attenuates by a factor; a mismatch reflects a fraction. In linear units a link budget is a long product of small numbers, and you cannot hold it in your head. In decibels those factors become additions, the whole budget becomes a column of integers, and you can do it on a napkin — which is exactly what an RF engineer does before touching a simulator.

dBPower ratioRule to memorise
+3 dB×2Double the power. Twice the transmit current, roughly.
+6 dB×4Double the free-space range — because power falls as distance squared.
+10 dB×10An order of magnitude. Stack them: +20 dB is ×100, +30 dB is ×1000.
−3 dB×0.5Half the power. Also the standard definition of a bandwidth edge.
0 dBm1 mWBeacon's transmit power, and a convenient anchor for mental arithmetic.
−97 dBm≈ 0.2 pWRoughly the ESP32-C3's BLE receive sensitivity on the 1 M PHY.

Two consequences of that table are worth internalising. First, the gap between a 0 dBm transmitter and a −97 dBm receiver is 97 dB, a factor of five billion. That is the entire budget you have to spend on distance, walls, and bad luck, and it is both enormous and easily exhausted. Second, +6 dB doubles free-space range but only doubles it — the relationship between power and distance is square-root-ish, so throwing power at a range problem has punishing diminishing returns. Indoors it is worse than square-root, as the next section shows.

HOW IT WORKSPath loss: the clean equation and the honest one

In free space, a transmitter radiates power over an expanding sphere. The receiving antenna intercepts a fixed area of that sphere, so the received power falls as 1/d². Working the geometry through and folding in the wavelength gives the standard engineering form of free-space path loss:

FSPL(dB) = 20·log10(d) + 20·log10(f) + 32.44

with d in kilometres and f in megahertz. Those units are the part people get wrong, so anchor it with a number you will reuse constantly. At 2440 MHz — the middle of the 2.4 GHz ISM band, where BLE lives — and at one metre (0.001 km):

fspl.pyhost-side, because RF arithmetic belongs in a notebook
from math import log10

def fspl_db(d_m, f_mhz=2440):
    """Free-space path loss. d in metres here; the 32.44 constant assumes km + MHz."""
    return 20 * log10(d_m / 1000) + 20 * log10(f_mhz) + 32.44

print(fspl_db(1))     # 40.2 dB  ← memorise this one: 1 m at 2.4 GHz
print(fspl_db(10))    # 60.2 dB  ← +20 dB for 10× the distance
print(fspl_db(100))   # 80.2 dB

Once you know that 1 metre at 2.4 GHz costs 40 dB, the rest is arithmetic: every factor of ten in distance adds 20 dB, every doubling adds 6 dB. You will never need the formula again for a sanity check.

✗ Free space does not exist indoors, and the error is not small

Inside a building, energy does not just spread — it reflects off walls and floors, diffracts around corners, and arrives at the receiver as a sum of paths that sometimes reinforce and sometimes cancel. The standard way to handle this without a full simulation is the log-distance model: PL(d) = PL(d₀) + 10·n·log10(d/d₀), where n is the path-loss exponent. In free space n = 2 and the model collapses back to FSPL. Indoors, published measurements typically put n between 3 and 4 for cluttered office and residential environments. At 10 m that is the difference between 60 dB and 70–80 dB — ten to twenty decibels you will not find on any datasheet. And n is a property of the building, not of your radio: it is measured, not looked up. Treat any n you did not measure as an assumption you must state.

Then there are the discrete obstacles. Published measurements at 2.4 GHz cluster into ranges that are worth carrying as rules of thumb, with the strong caveat that they vary enormously with construction and moisture:

ObstacleTypical loss at 2.4 GHzNote
Plasterboard / drywall partition≈ 3–5 dBBeacon's R2 assumes one of these.
Interior brick wall≈ 6–10 dBHighly dependent on thickness and moisture.
Reinforced concrete≈ 10–20 dBThe rebar mesh matters more than the concrete.
A human body between the antennas≈ 3–6 dBMostly water. This is why range depends on where you stand.
Metal cabinet, foil-backed insulation, lift shaftEffectively opaqueNot a loss to budget for — a link that must be routed around.

Finally, the one every design review asks about and almost nobody should worry about: impedance mismatch. If an antenna's return loss (S₁₁) is −10 dB, then 10 % of the power is reflected and the loss is −10·log10(0.9) = 0.46 dB. Even at a mediocre −6 dB return loss, 25 % is reflected and you lose 1.26 dB. A matching network is worth about one decibel. Moving the antenna off a battery is worth fourteen. Spend your attention accordingly.

CORE CONCEPTThe link budget as a ladder

Write the whole thing as one line and then read it downward:

Prx = Ptx + Gtx − PL(d) − Lwalls − Lbody − Lmismatch + Grx

Margin = Prx − Srx

Everything is in dB or dBm, so every term is an addition. Beacon's baseline, using the canon's 0 dBm transmit and R2's requirement of 10 m through one plaster wall, with an indoor exponent of 3 and a gateway antenna at +2 dBi:

TermValueRunning total
Transmit power (canon)0 dBm0 dBm
Tag antenna, module at the board edge with keep-out respected+0 dB0 dBm
Path loss at 1 m, 2440 MHz−40.2 dB−40.2 dBm
Extra path loss out to 10 m at n = 3 (10·3·log1010)−30.0 dB−70.2 dBm
One plasterboard wall−4 dB−74.2 dBm
Body / orientation allowance−3 dB−77.2 dBm
Antenna mismatch allowance−0.5 dB−77.7 dBm
Gateway antenna gain+2 dB−75.7 dBm
Receiver sensitivity, BLE 1 M PHY−97 dBm
Margin+21.3 dB
📖 Why the answer is "20 dB of margin", not "any margin at all"

A margin of 1 dB is not a link that works 99 % of the time; it is a link that works when nothing moves. Indoors, the sum of reflected paths at a given point varies with position on the scale of centimetres — move the tag ten centimetres and the received power can change by 15 or 20 dB, in either direction. That variation is multipath fading, and it is not noise you can average away; it is a property of where you happen to be standing. The industry convention is to design for roughly 20 dB of fade margin on an indoor link you want to be reliable, which is why Beacon's 21.3 dB is "adequate" rather than "generous". Note also that BLE gets some of this back for free by advertising on three separate channels 24 and 54 MHz apart (Lesson 4.6) — a fade that kills channel 37 often leaves channel 39 alone.

One term deserves a note because it is where the biggest lie in wireless marketing lives: receiver sensitivity. It is the lowest received power at which the receiver still achieves a specified error rate, and it is a real, measured number — but it is quoted at the best modulation and the best conditions. On the BLE 1 M PHY, a good integrated radio like the ESP32-C3's lands around −97 dBm. Bluetooth 5's LE Coded PHY trades data rate for coding gain and buys you roughly 5 dB at S=2 and something in the region of 12 dB at S=8 — real decibels, at one-half and one-eighth of the throughput, and only if both ends support it. A cheap USB dongle at the gateway might be 7 dB worse than the module in your tag, which quietly halves your range and appears nowhere in your design documents.

SEE ITLink budget calculator: which decibels are cheap

Build the ladder. Every control changes one rung, and the readout gives you the margin, the maximum range at a 20 dB fade margin, and — because this is Stage 4 — what the chosen transmit power does to Beacon's battery life. The two verdicts at the bottom are R2 (10 m through one plaster wall) and R1 (six months). Try to satisfy both.

⚙ Interactive · Link budget calculator

Path loss uses FSPL at 1 m (40.2 dB at 2440 MHz) plus 10·n·log10(d). Wall and placement penalties are typical published ranges, used as illustrative constants. Transmit-current figures are illustrative and in the class of an integrated 2.4 GHz radio; the 0 dBm case is pinned to Beacon's canon 45 ms / 40 mA window. Deterministic; no randomness.

Board edge, keep-out respected
Plasterboard · 4 dB each
ESP32-C3 class, 1 M PHY · −97 dBm
0 dBm
10 m
1
3.0
+100−25 −50−75−100 dBm sensitivity
Total path loss
—
Received power
—
Margin
—
Range at 20 dB fade margin
—
Average current at this TX power
—
Derated life vs R1
—

—

—

Run these three. One: with everything at Beacon's defaults, note the margin — around 21 dB, meeting R2 with about a metre and a half of range to spare at a proper fade margin. This is a link that works, not a link that is comfortable. Two: move the antenna onto the LiPo pouch. You lose 14 dB and the maximum reliable range collapses to under 4 m. Now try to fix it with transmit power: even at +9 dBm you are still short of 10 m, and the derated battery life has dropped below six months. Nine decibels of power did not recover fourteen decibels of placement, and it cost you the other requirement. Three: put the antenna back at the board edge and drop the transmit power to −12 dBm. Battery life improves to nearly seven months and the link fails. Zero dBm is not a default someone copied; it is where those two curves cross.

COMPARISONAntennas, ground planes, and the keep-out that is not optional

At 2.44 GHz the wavelength is c/f = 3×10⁸ / 2.44×10⁹ = 123 mm, so a quarter wave is about 31 mm. Beacon's entire board is 35 × 25 mm. That single comparison explains most of small-antenna engineering: your board is not much bigger than the antenna, so the board is part of the antenna. The ground plane is not a passive backdrop the antenna sits on; it is the other half of the radiating structure, and its size and shape change the pattern, the efficiency, and the resonant frequency.

Antenna typeTypical gainCostWhat it demandsUse when
PCB trace (meander, inverted-F)≈ 0 to +2 dBiFree — it is copperBoard area, a defined ground plane, a keep-out, and tuning against the real enclosureVolume products where the mechanical design is stable
Chip antenna≈ −2 to +1 dBiCents, plus a matching networkLess area than a trace, but still a keep-out and still tuningSpace-constrained boards; usually a step down in efficiency
Module with integrated PCB antenna≈ 0 to +2 dBiIncludedOverhang at the board edge, copper keep-out, and obedience to the integration guideBeacon. Pre-certified, predictable, no RF layout risk
External whip / dipole on a connector+2 to +5 dBiConnector, cable, part, assemblyMechanical space and a hole in the enclosureWhen you genuinely need the decibels and can afford the industrial design
✓ Antenna at the edge, keep-out clear ✗ Antenna over a solid pour ground plane on every inner layer ESP32-C3-MINI-1 keep-out boundary — no copper above this line, any layer antenna overhangs the board edge · plane acts as the counterpoise effective gain ≈ 0 dBi · modular certification intact ESP32-C3-MINI-1 antenna sitting on copper detuned, shorted, radiating into the plane ≈ −8 dB or worse · certification conditions violated
The keep-out is a three-dimensional exclusion: no copper on any layer, no traces, no vias, no components, and in practice no battery or metal enclosure wall either. The manufacturer's integration guide specifies it precisely; the penalty figures here are illustrative of the class of loss, not a substitute for measuring your own board.

Two consequences that surprise people.

The first is certification. The ESP32-C3-MINI-1 ships with modular approval — the module has been through the radio testing, so your product does not have to repeat the full intentional-radiator work. But that approval comes with conditions, and the antenna keep-out and layout requirements in the integration guide are among them. Route a trace under the antenna and you have, strictly, stopped meeting the conditions your certification depends on. It will still work in the sense that packets arrive. It is not still certified in the sense that a regulator would accept, and that distinction becomes real the moment you sell 25 units to somebody's facilities department rather than build them for yourself.

The second is the battery. A lithium-polymer pouch cell is wrapped in aluminium-laminated film. It is a conductive sheet. Lay a PCB antenna flat against one and you have not merely obstructed the link, you have detuned the antenna by putting a ground plane where free space should be. This is the single most common mechanical mistake in battery-powered wireless products, it is invisible on the schematic, and it is why the antenna keep-out has to appear in the mechanical drawing and not just the layout. Orientation matters too: two linearly polarised antennas at right angles to each other lose a great deal — commonly 10–20 dB indoors, where multipath partially depolarises the signal and rescues you from the theoretical infinity.

BEACONBeacon: 10 m through one wall, and what it costs

R2 asks for at least 10 m to the gateway through one plaster wall. The budget above gives 21.3 dB of margin at that distance with an indoor exponent of 3, which is roughly the 20 dB an indoor link wants. The design decisions that produce it are all placement decisions, and they all belong to Stage 5:

1

The module goes at the board edge

Antenna overhanging, with the keep-out clear of copper on all four layers of the SIG / GND / PWR / SIG stack. This is fixed in the placement pass of Lesson 5.5 before anything else is allowed to move, because everything else can move and this cannot.

2

The battery goes at the far end

The 1000 mAh pouch is the largest conductive object in the product. It goes as far from the antenna as a 35 × 25 mm board and its enclosure permit, and its position is a mechanical requirement, not a preference.

3

Transmit power stays at 0 dBm

Not because it is the default, but because the widget's two curves cross there. Above it, R1's six months fails; below it, R2's 10 m fails. The canon's 45 ms at 40 mA active window is a 0 dBm number, and changing the transmit power invalidates the entire Lesson 4.3 budget.

4

Three advertising channels are the fade insurance

Beacon sends three packets per burst, one on each of BLE's primary advertising channels, which sit at 2402, 2426, and 2480 MHz. A multipath null deep enough to kill one of them is unlikely to kill all three. This is why the burst is three packets rather than one, and Lesson 4.6 costs it in millicoulombs.

What the budget does not cover, and what the Stage 6 pilot exists to find out: the actual path-loss exponent of the buildings the 25 units are deployed in, the actual gateway placement (a Raspberry Pi Zero 2 W on a shelf has a different antenna environment than one on a ceiling), and how much of the fleet ends up behind a metal cabinet where no budget helps. Every one of those is a measurement, and the honest position at this stage is that the design has 21 dB of paper margin and no field data at all.

WEAKNESSWhere this bites

✗ Quoting a module's marketing range as a specification

"Up to 100 m" on a 2.4 GHz module's front page means line of sight, outdoors, no obstacles, ideal orientation, and usually a receiver far better than the one you will pair it with. Convert it: 0 dBm to −97 dBm is 97 dB of budget; at n = 2 that supports nearly 700 m of free space before any other loss. So 100 m is not even an optimistic claim — it is a conservative free-space claim being read as an indoor one. Indoors at n = 3.3 with two walls, the same budget gives you something in the tens of metres, and behind a metal shelf it gives you nothing. Never put a marketing range number in a requirements document. Put a link budget in, with the exponent you assumed stated explicitly.

✗ Measuring RSSI once and calling it range

Indoor received power varies by 15–20 dB over displacements of a few centimetres because of multipath. A single RSSI reading at a single position tells you almost nothing; two readings ten centimetres apart can differ by more than the loss of a brick wall. If you want a range number, you need a sweep — many positions, both orientations, with and without a person in the path — and you should report the worst case, not the average. This is also the reason Lesson 4.8 spends a whole widget on why RSSI is a terrible distance estimator.

✗ Optimising the matching network while the antenna sits on metal

An entirely reasonable engineer with a vector network analyser can spend two days improving return loss from −6 dB to −15 dB. That is worth about one decibel of radiated power. In the same two days, moving the module to the board edge, clearing the keep-out, and relocating the battery is worth eight to fourteen. The ordering is not close, and it holds for almost every small wireless product: placement first, keep-out second, matching last. The exception is a custom trace antenna on a board whose mechanical environment is already fixed — then matching is what remains, and it does need the analyser.

KEY INSIGHTHow this connects

You can now defend a range number instead of quoting one. Next, the protocol that fills the link — and the energy it costs to use it.

GLOSSARYKey terms introduced

dB / dBm
A decibel is 10·log₁₀ of a power ratio; a dBm is a power referenced to 1 mW, so 0 dBm = 1 mW. Losses that multiply in linear units add in decibels, which is why link budgets are written this way.
Free-space path loss (FSPL)
20·log₁₀(d) + 20·log₁₀(f) + 32.44, with d in km and f in MHz. At 2440 MHz it is 40.2 dB at one metre, and rises 20 dB per decade of distance.
Path-loss exponent (n)
The exponent in the log-distance model PL(d) = PL(d₀) + 10·n·log₁₀(d/d₀). Two in free space, typically three to four indoors. A property of the building, to be measured rather than assumed.
Link margin
Received power minus receiver sensitivity, in dB. The number a wireless design is judged on. Indoor links are usually designed for about 20 dB of it to survive multipath fading.
Multipath fading
Constructive and destructive interference between signal copies arriving by different paths. Causes 15–20 dB swings over centimetres indoors, which is why a single RSSI reading means very little.
Receiver sensitivity
The lowest received power at which a receiver meets a specified error rate. About −97 dBm for BLE's 1 M PHY on this class of radio; LE Coded PHY buys roughly 5 dB (S=2) or in the region of 12 dB (S=8) at reduced throughput.
Antenna keep-out
A three-dimensional exclusion zone around a module's integrated antenna in which no copper, component, battery, or metal may sit. Specified in the module's integration guide, and a condition of its modular certification.
Return loss (S₁₁)
How much power an antenna reflects rather than accepts, in dB. −10 dB means 10 % reflected, which costs only 0.46 dB — far less than most people expect, and far less than placement.

ACTIVE RECALLCheck your understanding

Answer in your own words first, then reveal.

1Without a calculator, estimate the free-space path loss at 2.4 GHz over 20 m. Then say what it becomes indoors at n = 3.3.›

Anchor on 1 m = 40 dB at 2.4 GHz. Free space is n = 2, so every decade of distance costs 20 dB and every doubling costs 6 dB. Twenty metres is one decade (to 10 m, +20 dB) plus one doubling (to 20 m, +6 dB): about 66 dB. The exact formula gives 20·log₁₀(0.02) + 20·log₁₀(2440) + 32.44 = −34.0 + 67.8 + 32.4 = 66.2 dB, so the mental arithmetic is good to a fraction of a decibel.

Indoors at n = 3.3 the extra loss beyond one metre scales by 3.3/2: PL = 40.2 + 10·3.3·log₁₀(20) = 40.2 + 43.0 = 83.2 dB. Seventeen decibels worse than free space, from the same distance — which is a factor of fifty in power, and the single biggest reason indoor range predictions fail.

2Your link is 8 dB short. You can add a matching network, raise transmit power by 6 dB, or move the antenna off the battery. Rank them, with reasons that include the battery.›

Move the antenna first. A PCB antenna lying on a foil-laminated LiPo pouch loses on the order of 14 dB, so recovering it more than covers the shortfall, costs nothing per packet, and costs nothing in the bill of materials. It may cost a mechanical redesign, which is why antenna position must be fixed early rather than late.

Transmit power second, and reluctantly. Six decibels is real, but it is a factor of four in radiated power drawn from the same cell on every burst forever. On Beacon, raising transmit power from 0 to +9 dBm pushes the average current from 38 µA past 48 µA and drops the derated life from six months to under five — trading a requirement you were meeting for one you were also meeting. It is the right lever only when the power budget has room.

Matching network last. Going from a poor −6 dB return loss to an excellent −15 dB recovers about one decibel. It is worth doing on a mature design; it will never rescue an 8 dB shortfall.

3Why does Beacon transmit three packets per burst on three different frequencies rather than three packets on one?›

Because the dominant indoor impairment is multipath fading, which is frequency-selective. At a given position, the sum of reflected paths can produce a deep null at one frequency while a frequency 25 or 50 MHz away is unaffected — the fade is a property of the geometry and the wavelength together. Repeating on the same channel repeats into the same null and buys you almost nothing; repeating on channels 24 and 54 MHz apart samples three largely independent conditions.

That is exactly why BLE places its three primary advertising channels at 2402, 2426, and 2480 MHz rather than adjacent to each other, and it doubles as interference diversity: the same spacing also puts them in the gaps between the commonly used Wi-Fi channels. So the three-packet burst buys frequency diversity against both fading and interference, for the cost of two extra packets of charge.

4A colleague routes a ground pour under the module's antenna because the DRC did not complain. Explain the two separate costs.›

The technical cost: the ground plane is part of the antenna's electromagnetic environment. Putting copper directly beneath a PCB antenna detunes it — it shifts the resonant frequency away from 2.44 GHz and couples radiated energy into the plane instead of into the room. The practical effect is a loss on the order of eight decibels or worse, which is roughly a factor of two and a half in range indoors, and it is a loss that no matching network or transmit-power setting recovers cheaply.

The regulatory cost: the ESP32-C3-MINI-1 carries modular certification, which is what lets a product using it skip the full intentional-radiator test campaign. That approval is granted subject to conditions in the module's integration guide, and the antenna keep-out is one of them. Copper under the antenna means the conditions are no longer met, so the certification you are relying on no longer strictly applies to your product. The DRC's silence is not evidence of anything — a design-rule checker knows about clearances and widths, not about keep-outs you did not tell it to enforce. Add the keep-out as an explicit rule region so the tool can complain next time.

Next: 31 bytes shouted into the room, and what each one costs →