SGP Official store ↗
Blog / Projects / CSI presence detection

Wi-Fi CSI presence detection: camera-free room occupancy

A camera tells you a room is occupied by taking a picture of the person in it. Wi-Fi CSI can answer the same question without any image at all, by watching how the radio channel in the room keeps changing. This guide explains the baseline, the occupancy score, and the one problem everyone hits: a person who stops moving.

Published 20 Oct 2026Read 11 minLevel IntermediateTopic CSI presence
Wi-Fi CSI detecting a person moving in a room Watch · SGP on YouTube
VIDEO — One of our experiments: a Wi-Fi link alone notices a person moving through a room and localizing, with no camera in the loop.

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.

score time threshold walks in sits still hold timer keeps "occupied" true across the quiet gap
FIG 1 — The occupancy score crosses the threshold when a person enters, dips while they sit still, then rises again. A hold timer bridges the quiet gap so the state does not flip back to "empty".

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.

Design ruleMake the occupied state easy to enter and slow to leave. A short hold feels broken when someone sits quietly; too long a hold leaves a room marked occupied after everyone has left. Minutes, not seconds, is a sensible starting point for a living space.

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.

Keep out during warm-upIf you are moving in the room while it learns, your movement gets baked into the baseline and the detector will under-react afterwards. Start it, step out, and let it settle before you trust the output.

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.

UseWhat presence drivesWhy CSI fits
LightingKeep lights on while a room is in use, off when emptyHolds through still occupants, unlike a PIR that times out
Heating and coolingOnly condition rooms that are occupiedNo camera, no wearable, works in the dark
Occupancy loggingLearn when a space is normally usedCounts presence over time without identifying anyone
Energy and safetyConfirm a room is empty before shutting equipment downA 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.

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.

SGP Card Mini, an ESP32-S3 board used for Wi-Fi CSI presence detection
The SGP Card Mini is an ESP32-S3 board with Wi-Fi, Bluetooth LE and LoRa. It captures CSI out of the box and is controlled from your phone's browser.

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.

SGP Lab — written by the team that designs and builds SGP hardware in Europe. We test every example on our own boards before publishing.

SGP devices are sold only at our official store.

sgpstore.net ↗