I'd like to fit an ESP32 directly into a single gang (North American) electrical box with enough room left over to fit a typical light switch over the top of it (these are usually pretty shallow, and the box itself is almost 3" deep).
What sort of hardware would I need to wire one of these into AC directly?
I'm trying to solve the problem of not having batteries everywhere in my house, where I spend 8 hours a week hunting down dead batteries and replacing them. I have no clue how it's become acceptable to design products like exterior door locks with batteries. I suspect it's a stock market scam to boost share prices for Energizer.
The National Electrical Code apparently tolerates mixing low voltage and high voltage in a single junction box for communication devices, supposing that it meets several criteria:
- The wires/conductors have at least 6mm of separation on the board and within the box
- The wires/conductors for the low voltage portion meet the same insulation standards as those for the high voltage (no cheapskate jumper wires, in other words)
- All components are clearly marked as low/high voltage
This could (in theory) meet code.
This is an IoT question and not a "how do you power a general purpose computing device" question because:
- It requires a networked computing device small enough to fit into a single gang junction box.
- It's for the purpose of connecting a sensor and/or an actuator to a home automation system.
- It would require hardware specific to such a device, nothing general purpose would suffice.
- The very premise of the question rests on the challenge of putting such devices where they have not tended to fit before.