Traducido del English por IA ·
Kevin tiene razón, y eso es lo primero que cambiaría. Dirijo una planta y hemos tenido dos contratistas que trajeron cajas caseras como esta. Ambas se devolvieron.A grandes rasgos, así funciona en el Reino Unido. Comercializar equipos eléctricos está regulado por las Electrical Equipment (Safety) Regulations 2016, por lo que se necesita marcado UKCA o CE con su expediente técnico detrás. Usted sería el fabricante, cosa que no conviene para una sola caja. Si va cableada de forma fija en la sala de máquinas, la instalación es un trabajo según la BS 7671 realizado por un electricista competente, normalmente desde una unidad de conexión con fusible.Por tanto, mantenga la única parte de red como un componente comercial. Una fuente de alimentación de carril DIN con marcado UKCA/CE (una Mean Well HDR-15-5 o similar), instalada por su electricista, o incluso un adaptador enchufable con marcado. Su caja funcionará entonces solo a 5 V y podrá construirla como quiera.El gas es el problema mayor. Un MQ-4 no es un detector de gas en ningún sentido de seguridad. Deriva con la humedad, necesita un periodo de estabilización y ninguna aseguradora lo aceptará. Use un detector fijo certificado (para gas natural en una sala de calderas, busque la norma EN 60079-29-1) y conecte su relé de alarma libre de potencial a una entrada del ESP32 con una resistencia de pull-up. El detector realiza la función de seguridad y cierra la válvula de gas si está especificado para ello. Su ESP32 informa de gas_alarm true/false y de la temperatura de la sala, y una regla de alarma en el perfil gestiona las notificaciones. El relé de bloqueo de la caldera se conecta de la misma forma en una segunda entrada.
Kevin’s right, and that’s the first thing I’d change. I run a plant and we’ve had two contractors bring in homemade boxes like this. Both went back.
Roughly how it works in the UK. Putting electrical equipment on the market falls under the Electrical Equipment (Safety) Regulations 2016, so it needs UKCA or CE marking with your technical file behind it. You’d be the manufacturer, which is not where you want to be for one box. If it’s hard-wired into the plant room, the installation is BS 7671 work for a competent electrician, usually off a fused connection unit.
So keep the only mains part off the shelf. A UKCA/CE-marked DIN-rail PSU (a Mean Well HDR-15-5 or similar) installed by their electrician, or even a marked plug-in adapter. Your box is then 5V only and you can build it however you like.
Gas is the bigger problem. An MQ-4 is not a gas detector in any safety sense. It drifts with humidity, needs burn-in, and no insurer will accept it. Use a certified fixed detector (for natural gas in a boiler room, look for EN 60079-29-1) and wire its volt-free alarm relay to an ESP32 input with a pull-up. The detector does the safety job and shuts the gas valve if it’s specified for that. Your ESP32 reports gas_alarm true/false and the room temperature, and an alarm rule on the profile handles notifications. The boiler lockout relay goes in the same way on a second input.

