Hi,
(also look at my second message below with pictures)
I want to share how I made the door and window open/close sensors myself. I am a hardware design engineer and like to make my own solutions. In the rotating part I use a small magnet (10mm round magnets from aliexpress). In the door/window frame I could use a reed relay, but instead of moving parts, I use a semiconductor solution. An omnipolar hall sensor from TI. The DRV5033AJQLPG is a perfect solution. This hall sensor is placed in the door frame and the magnet is in the door. So when the door is closed, the magnet is in front of this hall sensor. The hall sensor will operate with a low voltage. I use hall sensors on purpose because they have a longer life span (than reed relays). I use a choke on the power supply and capacitors and ESD diodes to protect the hall sensor for ESD discharges (or voltages produces by lightning and inductance of the cable). I still have to determine which voltage I will use for these sensors (2.5V-38V voltage range). 2 things are important. A lower voltage generates less heat in the hall component, but give a lower output voltage (with a lower voltage error marging). A higher voltage gives a higher voltage error marging, but I am afraid that this will shorten the life span of the component. That’s why I didn’t use reed relays in the first place. I will probably use 5V. I use a 2 wire cable that is shielded (white wire is output signal, red is power supply and shield is ground). Cable is 12m max. Please tell me which voltage level I should use (to avoid misinterpreted signal levels due error marging). It’s also possible to let the sensor work at 3v3 and translate it to volt afterwards. I probably also will use a simple RC filter to filter noise.
These signals will go to a MQTT input signal PCB that will process these signals and will notice each difference. If there is a difference, the MCU will report the change to home assistant with time stamp.
The sensor works great. I can show my doors and the connections if someone is interested (see message below for the pictures). Tested it with applying a 5V level and the 5V power going to a resistor and LED to the output of the hall sensor.
When I leave my home every sensor will read its current state and an alarm will be issued when a door changes it logic state while I’m away from home.
I still have to develop this MQTT input PCB. Possible hardware configuration is an ATSAMD21 with ENC28J60. I want a wired network solution. The inputs will be processed by SPI IO ex panders (eg MCP23S17). The voltage limit of these IO is 5V. I probably have to use opto-couplers or transistor inputs to translate higher voltages.
Tell me your thoughts about these hall sensor solution. Any recommendations are welcome. Please also tell me if someone already made a wired IO MQTT input solution. I’m new to this MQTT. I know that there are topics, but the exact minimum required variables that must be used is still unclear to me.
These PCB’s will also process all the switches I use in my home. These are momentary press buttons from Jung (4 switches (2 times 2 switches (up/down)). I have CAT5 cables that are going to these switches. Providing power and connecting the 4 switch outputs.
Best regards,
Erik
Ps. my home (bugalow) consists of 120 square meters. Over 4km 19mm pipe is used (use glue for all connections) and the amount of cables are impressive. Every switch, wall socket, etc. is connected to the fuse box space.