Presence detection sounds like motion detection, but it is a harder and more useful question. A motion sensor asks "did something just move?" Presence asks "is anyone in this space right now?" — and the honest answer has to stay true while a person sits reading, naps on the sofa, or works quietly at a desk. Wi-Fi CSI can do this in a space you own, with no camera and no recording of anyone. Here is how, and where it falls short.
01What presence detection means
If you have read our complete guide to Wi-Fi CSI, you know that Channel State Information is the receiver's detailed record of how a Wi-Fi signal was reshaped on its way across the room. Every packet carries amplitude and phase for dozens of subcarriers, and that pattern changes whenever anything in the room moves. Presence detection takes that stream and reduces it to a single yes-or-no output: occupied or empty.
The distinction from a plain CSI motion alarm is important. A motion alarm is allowed to reset the moment movement stops. A presence detector is not — it must keep reporting "occupied" during the long, quiet stretches between movements, because a person who is sitting still is still in the room. That one requirement drives almost every design decision below.
02Telling empty from occupied
The core method is the same baseline-and-threshold idea used in simpler CSI projects, applied to a slower decision. First, the detector learns what an empty room looks like: it records how much the CSI pattern naturally fluctuates when nothing is there. Even an empty room is never perfectly still, because of radio noise, a fan, or a flickering fluorescent tube, so this resting fluctuation is the reference level.
Then it measures an occupancy score continuously. A common choice is the short-term variance of the CSI energy, the same statistic that works well for motion: when a body is present it disturbs the many signal paths through the room, so the variance across a sliding window climbs above the empty-room baseline. When the score sits above a threshold — a multiple of the baseline, not a hair above it — the room is treated as occupied.
The threshold being a multiple of the baseline matters: it lets one set of numbers work across rooms of different sizes and clutter. A noisier room automatically needs a larger disturbance to count as occupied, so you are not re-tuning for every space by hand.
03The still-person problem
Here is where naive detectors fail. If occupancy is just "score above threshold right now", then the moment a person stops moving — settles into a chair, falls asleep — the variance collapses back toward the empty-room level, and the room is wrongly reported as empty. The lights go off on someone sitting in the room. Everyone who builds this hits it.
There are two honest ways to keep presence alive through stillness, and good systems use both.
- Micro-motion. A person who is "still" is not really still. Breathing moves the chest at roughly 0.1 to 0.5 Hz, that is about 6 to 30 breaths per minute, and that slow chest motion is enough to keep modulating the CSI if the person is reasonably close to the link. Fidgets, a hand turning a page, and shifts of weight add occasional larger disturbances. A detector tuned to notice this very low-frequency, low-amplitude variation can distinguish a living, breathing occupant from a genuinely empty room. This is the same signal our breathing-detection article pushes much harder on.
- A hold timer. Rather than demanding continuous proof of presence, the detector latches to "occupied" and only releases after the score has stayed below the threshold for a deliberate timeout — often tens of seconds to a few minutes, depending on the room. Any fresh movement resets the timer. This bridges the quiet gaps so one brief stillness does not clear the state.
There is a limit worth stating plainly: a person who holds their breath and freezes completely can briefly become invisible to a single CSI link. In practice this almost never happens over the timescales presence cares about, which is why the hold timer is the safety net.
04Warm-up and arming
The baseline is only as good as the moment it was learned, so the detector begins with a warm-up: a window, commonly ten to thirty seconds, during which the room must be empty and still. Whatever the board sees then becomes "normal", and every later reading is judged against it.
A robust build goes one step further and lets the baseline drift slowly over time while the room is confidently empty, so it adapts to a fan being switched on, the sun heating a wall, or furniture being moved. The rule is to only adapt when you are sure nobody is there, otherwise the system slowly learns to ignore the very people it is meant to notice. Our note on cleaning CSI data covers the filtering and calibration that keep a baseline honest.
05Where camera-free presence is useful
The appeal is privacy: you learn that a space is occupied without ever capturing who is in it. That makes CSI presence a good fit for places a camera would feel intrusive or be plainly inappropriate.
| Use | What presence drives | Why CSI fits |
|---|---|---|
| Lighting | Keep lights on while a room is in use, off when empty | Holds through still occupants, unlike a PIR that times out |
| Heating and cooling | Only condition rooms that are occupied | No camera, no wearable, works in the dark |
| Occupancy logging | Learn when a space is normally used | Counts presence over time without identifying anyone |
| Energy and safety | Confirm a room is empty before shutting equipment down | A latched state is safer than a single instantaneous read |
The lighting case is the classic one, because it is exactly where cheap passive infrared sensors frustrate people: sit still at a desk and a PIR switches the lights off, because PIR only sees change in heat, not continued presence. A CSI detector with a proper hold timer keeps the lights on for the quiet worker. We put CSI head to head with the alternatives in Wi-Fi CSI vs mmWave radar vs PIR.
06The honest limits
Being clear about what a single link cannot do is what separates a project that works from a demo that disappoints.
- It is presence, not identity. CSI tells you a space is occupied. It does not tell you who, and a single link cannot reliably say how many. Counting people is a much harder, antenna-hungry problem covered in counting people with CSI.
- Other movement counts as presence. A fan, a robot vacuum, a pet, or a curtain in a draft all disturb the channel. In an own-space setup you aim the link across the area you care about and raise the threshold so small, known movers are ignored.
- Coverage is a volume, not a tidy zone. The link is sensitive to motion anywhere along the paths between the two devices, which may include the hallway or the next room. You shape it by where you place the board and router, not with a hard boundary.
- It needs packets. CSI only updates when traffic flows on the link, so a little steady background traffic keeps the detector fed.
07The hardware you need
The minimum is two Wi-Fi devices sharing a link: one sends packets, the other reads CSI. The simplest build is a single ESP32-class board joined to your own access point. Espressif's ESP32, ESP32-S3 and ESP32-C parts all expose CSI through a callback, so a low-cost board is enough to prototype everything above.
Start with the board on a shelf, pointing the link across the room rather than at a vent or a doorway you do not care about, and give it a clean, empty warm-up. For the code that turns raw packets into the energy stream these methods run on, see how to capture CSI on an ESP32; the motion alarm build is the natural next step before you add a hold timer and the micro-motion handling described here.
08FAQ
Can Wi-Fi CSI detect a person who is sitting perfectly still?
A truly frozen person is the hardest case, but almost nobody is that still. Breathing, small shifts of posture and tiny limb movements keep changing the channel, and a good detector holds the presence state through quiet gaps with a timeout rather than switching to empty the instant motion stops.
How is presence detection different from a motion alarm?
A motion alarm only fires on movement and then resets. Presence detection answers a slower question, is anyone in this space right now, so it has to keep reporting occupied during the still stretches between movements by using micro-motion and a hold timer, not just the moment someone walks in.
Does CSI presence detection work through a wall?
Sometimes, for a thin interior wall, because Wi-Fi passes through drywall and wood. It is weaker and less reliable than a clear line of sight, and thick or metal-reinforced walls block most of the signal. Treat through-wall presence as a bonus in your own space, not a guarantee.
How many people can a single CSI link count?
A single link is good at the yes or no question of occupied versus empty. Counting how many people are present is a much harder problem that needs more antennas, careful calibration and machine learning, and even then the numbers stay approximate in a busy room.