Build Log / July 30, 2026 / 7 min

The Hallway Light That Took Four Weekends

The brief was one sentence. The light should be on when someone is in the hallway, and off when they are not. That is the whole thing.

The brief was one sentence. The light should be on when someone is in the hallway, and off when they are not.

That is the whole thing. It took four weekends.

Weekend one: the standing-still problem

A PIR sensor costs about two dollars and works by watching for change in infrared across its field of view. That word does all the damage. PIR does not detect a person. It detects a person moving.

Stand still for thirty seconds — brushing your teeth, reading a label, hunting for the thing you came in for — and as far as the sensor is concerned the hallway is empty. The light goes out on you. Every cheap motion light you have ever waved your arms at in the dark is doing this correctly, exactly as designed.

I tried to fix it in software first, which is what you do when you are not ready to admit the sensor is the wrong sensor. A longer timeout. Then a much longer timeout. At four minutes the light was effectively always on, which resolved the complaint and defeated the point.

Weekend two: mmWave, and a light that never went off

The right part is an mmWave presence sensor — an LD2410 in my case, about six dollars. It bounces a 24GHz radar signal off the room and watches the phase come back. It can see the rise and fall of your chest from across a hallway. It does not care whether you are moving.

It also does not care whether you are a person.

With the sensitivity where the datasheet suggested, my hallway was occupied twenty-four hours a day. I spent most of a Sunday convinced the board was faulty before I walked the hallway slowly with the debug output open and found the culprit: the radiator. Convection currents off a warm radiator move enough air to register as presence at default gain. So does a curtain over a draught. So, memorably, does a robot vacuum two rooms away through a stud wall, because 24GHz does not respect drywall the way light does.

Weekend three: gate distance is the setting that matters

The LD2410 divides its range into gates — roughly 75cm buckets — and lets you set a sensitivity threshold per gate independently. Almost every tutorial tells you to turn the master sensitivity down. That is the wrong knob. Turning it down globally makes it stop seeing the radiator and stop seeing a person sitting still at the far end.

What actually worked was setting gates 0 through 6 normally and zeroing out everything past gate 7, which is the far wall. The radiator sits at gate 8. It stopped existing. The vacuum through the wall was gate 9 and went with it.

This is the part I wish someone had told me on weekend two, so: tune per-gate, not globally. The whole configuration is four lines of YAML.

Weekend four: the part nobody writes about

The sensor worked. The build was not done, because a bare board taped to a wall with a USB cable snaking to a socket is not a finished thing, it is a hazard you have grown fond of.

Enclosure, wall mount, a proper 5V supply, a strain relief that means yanking the cable does not yank the board. That was the fourth weekend and it was the least interesting one and it is the difference between a project and a thing that lives in your house.

What it cost

  • LD2410C mmWave module — £5.80
  • ESP32-C3 Super Mini — £3.20
  • Printed enclosure — about 40g of filament
  • USB-C supply, salvaged from the drawer — £0

Under ten pounds and four weekends. You could buy a commercial presence sensor for forty. It would use PIR, and it would turn off on you while you were standing still.

Home automation Sensors ESP32

More from Build Log