|
| 1 | +--- |
| 2 | +layout: page |
| 3 | +title: Calibration |
| 4 | +permalink: /configuration/calibration |
| 5 | +parent: "Configuration" |
| 6 | +nav_order: 3 |
| 7 | +--- |
| 8 | + |
| 9 | +# Calibration |
| 10 | + |
| 11 | +Calibrating your ESPresense nodes helps each device estimate distance consistently, even when they use different antennas or are installed in different rooms. The settings below are available from the full Settings view on the device web UI. |
| 12 | + |
| 13 | +{: width="360" } |
| 14 | + |
| 15 | +## Quick calibration procedure |
| 16 | + |
| 17 | +1. Pick a **reference node** that will stay at its default `rxAdj` of `0` and set it up in an open area. |
| 18 | +2. Place a beacon that transmits **exactly 0 dBm** one meter away and record the average RSSI reported by the reference node. |
| 19 | +3. Enter that value in **Rssi expected from a 0dBm transmitter at 1 meter** on every node that will track non-calibrated devices. |
| 20 | +4. For each additional node, compare its reading of the same beacon at the same location and adjust **rxAdj** as described below until its reported RSSI matches the reference node. |
| 21 | +5. If the signal passes through walls or dense materials between rooms, increase the **Factor** slightly (for example, from `2.55` to `3.0`) and test whether calculated distances align better with reality. |
| 22 | +6. Repeat the measurements in a second location to confirm the offsets before rolling the settings out across your deployment. |
| 23 | + |
| 24 | +## Rssi expected from a 0dBm transmitter at 1 meter |
| 25 | + |
| 26 | +This value establishes the reference point for devices that do not broadcast a calibrated `rssi@1m` (for example, many non-beacon wearables). To determine it: |
| 27 | + |
| 28 | +1. Use a beacon transmitting at exactly 0 dBm. |
| 29 | +2. Place the beacon 1 meter away from the ESP32. |
| 30 | +3. Observe the RSSI reading on the Settings page and record the average value. |
| 31 | +4. Enter that number as the reference. |
| 32 | + |
| 33 | +Devices that already advertise `rssi@1m` keep their own calibration; others use this reference plus any additional adjustments below. |
| 34 | + |
| 35 | +## Factor used to account for absorption, reflection, or diffraction |
| 36 | + |
| 37 | +This factor adjusts for walls, furniture, or other environmental obstacles between rooms. Higher numbers assume more attenuation; lower numbers assume minimal obstruction. Increase the factor if reported distances are too small when signals pass through dense materials (brick, concrete, metal framing). |
| 38 | + |
| 39 | +## rxAdj (Receiver Adjustment) |
| 40 | + |
| 41 | +Different ESP32 boards and external antennas can report RSSI differently, even with identical firmware settings. The **rxAdj** value is an offset (in dB) applied to *all* RSSI readings from a node so that mixed hardware stays aligned. |
| 42 | + |
| 43 | +Typical use cases include: |
| 44 | + |
| 45 | +* Balancing a node that uses a high-gain external antenna against nodes with built-in antennas. |
| 46 | +* Normalizing readings between dev boards that ship with slightly different radio front-end tuning. |
| 47 | + |
| 48 | +To tune `rxAdj`: |
| 49 | + |
| 50 | +1. Pick a reference node (leave its `rxAdj` at 0) and place a known beacon at a fixed distance from both the reference and the node you want to adjust. |
| 51 | +2. Compare their reported RSSI values for the same beacon. |
| 52 | +3. On the node that reads stronger, set a **negative** `rxAdj` equal to the difference; on a weaker-reading node, set a **positive** `rxAdj` until both nodes report approximately the same RSSI. |
| 53 | +4. Repeat with a second location to verify consistency, then apply the same offset to nodes that share the same antenna or board type. |
| 54 | + |
| 55 | +Because `rxAdj` is an additive offset, it does not change the relative movement of a device within a single room, but it keeps multi-room trilateration and occupancy decisions fair between nodes with different hardware. |
| 56 | + |
| 57 | +## Forget beacon if not seen for (in milliseconds) |
| 58 | + |
| 59 | +Controls how long a MAC address stays in the internal tracking list. Shorter durations remove stale devices sooner but may cause the same device to be re-added frequently if it only broadcasts occasionally. The default is 300000 ms (5 minutes). |
| 60 | + |
| 61 | +## Calibration tips |
| 62 | + |
| 63 | +* Re-run the reference measurement if you change antennas or enclosure materials. |
| 64 | +* Perform `rxAdj` comparisons with beacons at least a few meters away to avoid near-field effects. |
| 65 | +* When installing multiple nodes in one room, calibrate them together to avoid uneven presence detection at room boundaries. |
0 commit comments