Sensor

To detect the state of each opening and to keep that as hidden as possible, I choose the A3144 Hall Effect sensor. They are stuck on the top and/or side of frames before the insulation and the dry wall are put in place. An advantage of these sensor is there robustness, a wide voltage input range and a protection against wire inversion.

Sensor on the top of the frame of an inside door

Sensor on the top of the frame of an inside door


Sensor on the top of the frame of an aluminum window

Sensor on the top of the frame of an aluminum window


As we only have a weekend to do it and I don’t find my heat shrink tubing, we solder and silicon sensors. We use telecom cable for wiring.

A neodym magnet stuck on the moving part make the second part of sensors.

One sensor on the top and one on the bottom to detect window 3 different states

One sensor on the top and one on the bottom to detect window 3 different states

Power Supply

Two different power supplies with hot swapping thanks to 2 diodes. The 3.3V regulator was not on the board because I already have some small board for this purpose and I only want one regulator for all the inputs boards.

Alarm part

The independent part for the alarm is based on 8 OR/NOR gates chained with diodes. This allows to put several boards in parallel to trigger a single relay. Some sensors can be excluded from the alarm loop with solder jumpers.

Web Enabled part

The brain of this is the Rpi with the help of some I2C IO expanders (PCF8574)

Schematic

Some room was remaining on the PCB so I put 2 small boards, an I2C temperature sensor and an interface for an electric metering system.

Schema

Schema

Two layers PCB

Two layers PCB

Top & Bottom of the PCB

Top & Bottom of the PCB

Manufactured PCB

Manufactured PCB

I2C Buses are linked, the interface to an external alarm is only populated on one board and the other board use it too.

Enclose

The 2 boards are put in a DIN Rail enclosure with the Rpi.

I use a bread to add 2 status LED and the power connector.

Enclosed Board

Enclosed Board


Final result

Final result