Presence-based lighting with mmWave
A mmWave sensor notices even a person sitting still, a light sensor keeps the lamp off in daylight, and the light fades out after the room is really empty.
Turns on a 12 V LED light from a battery the moment the mains disappears, dimmed at night and switched off after a timeout.
Smart home Board: ESP32-C3 SuperMini Level: ●●○ ⏱ 2–3 h
Mains 220–230 V can kill. Work with the power off, use certified isolated modules in an enclosure, fuse the line, and ask a qualified electrician if you are not sure.
A mains detector tells the ESP32 that the power has gone, and a MOSFET turns on a 12 V LED strip or lamp from a battery in a fraction of a second. You do not need a microcontroller for the bare function, but with one you can fade it in, keep it dim at night so it does not blind you, and switch it off after thirty minutes to save the battery.
The ESP32 must be awake on its own supply, because a cold boot takes seconds and you want the light at once. Use a logic-level MOSFET with a gate resistor and check that it stays cool at your LED current. Put a fuse next to the battery, and keep the detector, which touches 230 V, in a closed enclosure with the correct clearances.
Buy the parts kit · Estimated total: $9.00
Other countries: order these parts on AliExpress with the links below.
Some links are affiliate links: we may earn a commission at no extra cost to you.
A mmWave sensor notices even a person sitting still, a light sensor keeps the lamp off in daylight, and the light fades out after the room is really empty.
Batteries: watch polarity, use protected cells and a charger with protection, never charge damaged cells unattended.
Wakes rarely, measures the 12 V battery at rest and warns before it is too flat to start the engine, with almost no drain of its own.
Switch only low-voltage loads yourself. For mains loads use a certified isolated module in a box or call an electrician.
Pings the internet and power-cycles the router or ONU through a relay when the connection hangs, with a Telegram notice.
Comments
No comments yet. Share your experience or ask a question.