ESP32 Deadman Switch

Deadman Switch with an ESP32, switches off Wallsocket and attached devices as soon as you leave the area
This project uses an ESP32 to look for activity from a specific WiFi device, i.e. your Smartphone. As soon as said device leaves the reception area of the ESP32, a timeout begins to run in the background, and as soon as it hits zero, the ESP32 will cut the power from an attached wallsocket switch, which i.e. connects your soldering iron to the wall.
An saftey project to ensure that "problematic" devices are force-switched off as soon as you leave the area.
An saftey project to ensure that "problematic" devices are force-switched off as soon as you leave the area.
Updates from the author
nmaas87 7 years ago
The whole project works with following idea: The ESP32 scans every WiFi packet for its MAC address. Then, the ESP32 checks if a packet was sent by "our" configured device, which serves as kind of Deadman Switch. If a packet arrived, a new timeout is calculated - and for that time, the Wallsocket will be switched on. If the devices sends additional WiFi packets during that time, the timeout is extended. If not, the Wallsocket will be switched off.
It is advised to set the timeout higher than the preconfigured 1 minute - as Smartphones conserve a lot of energy by switching of the WiFi radio if the Phone is not used for longer times.
Also it is not tested enough to be used in life/death situations and just to be considered as a hobbiyst project for fun, not a final product. I take therefor no responsibility for any harm resulting along the way.
Shows the ESP32, connected to an BC548 via GPIO IO4 - and the connection to the Wallsocket Switch (1926kb)
Sourcecode (2kb)