AC 220v presence sensor with Zigbee door sensor for DIN rail for smart home.

AC 220v presence sensor with Zigbee door sensor for DIN rail for smart home.

Description

This is a simple body for a DIY sensor to detect the presence/absence of AC 220V. * It uses one OP22B01 5V board and one Zigbee door sensor. * It is designed to be used on a DIN rail. * Sizes: 20mm x ~56mm x ~78mm. <h1>Be careful while working with high voltage!</h1> <h2>Components:</h2> * OP22B01 5V board. * Tuya ZigBee door and window magnetic sensor (iH-F001). * Two wires. <h2>How it works:</h2> * Whenever AC 220V is present between <b>L</b> and <b>N</b> on the OP22B01 board, the resistance between <b>GND</b> and <b>OUT</b> will change from infinity to ~120Ω. * The ZigBee door sensor (iH-F001) has a magnetic reed switch inside, which can be bypassed by connecting any other switch to its contacts. * By connecting <b>GND</b> and <b>OUT</b> from the OP22B01 board to the contacts of the magnetic reed switch inside the door sensor, we can detect the presence/absence of AC 220V. <h2>How to build it:</h2> * Print all parts. * Glue the back part (AC_sensor_back) to the main part (AC_sensor). * Open the door sensor, solder wires to the magnetic reed switch, drill a hole for the wires, assemble it, and check if it works correctly. * Guide the wires through the hole from the compartment for the door sensor to the compartment for the OP22B01. * Put the door sensor inside and close the compartment. * Connect the wires to <b>GND</b> and <b>OUT</b> on the OP22B01 board and place the board inside the compartment. Close the compartment. * Done. <h2>Notes:</h2> * It was created to be used with Home Assistant to detect the presence/absence of AC 220V on the main power line, allowing smart sockets to be turned ON/OFF when the home is using a backup power source. * Why? To have two or more devices that can detect a power blackout event and help me save my batteries and inverter. * There is also a ZigBee smart circuit breaker (TO-Q-SY2-163JZT) configured to update voltage information as soon as possible. It updates this information even after it loses power because ZigBee is a low-power device, and there is enough charge on the capacitors to send the info. * The 120Ω resistance creates no issues for the door sensor, and it works fine with it.

Statistics

Likes

0

Downloads

0

Category

DIY