What things will I need to consider for hardwiring a planned electronics project into the wall?
The plan is a DIY smart thermostat. An LCD touchscreen panel will be flush with the wall. Attached to the back will be the electronics, including a miniature computer (a Raspberry Pi) and an interface board of my own design. The interface board will include a board-mounted 120V-to-DC power supply, connections for line voltage, and connections for 24VAC furnace wiring.
I imagine hiding the wiring and tucking the electronics in a 3 gang box and mounting the assembly to the box with something like this: https://www.thingiverse.com/thing:2749782 -- basically the LCD panel+electronics assembly will be screwed to an adapter plate that slides into slots in another adapter plate that is screwed to the box. Then the touchscreen covers the box and everything else is out of sight and out of reach.
Here are some questions I know I have:
- The assembly would very easily be removed from the box (just slide it up against the force of gravity). Great for servicing wiring, but is that too easy? What if someone bumps into it and it falls out and the wiring gets yanked out and then there is 120VAC dangling within easy reach?
- Am I required to enclose the high-voltage parts of the interface board? The board-mounted power supply might be a class II device, but would be a through-hole component meaning the under-side of the interface board would not be finger-friendly. But the under-side of the interface board would normally be out of finger's reach.
- Do I need to ground everything?
- Is the board-mounted power supply required to be a class II device?
- Am I required to include a fuse in the design? Or is that a matter of judgment and engineering? For example, the electronics would have to let a lot of magic smoke out to trip the circuit breaker. Even if the circuit breaker were 1A that's 120W, an order of magnitude larger than the planned power usage. So my judgment says to include a fuse, but I don't know if it's required by code.
Does anything else jump out at you?