Helping the family with technology

I forget to close the garage door regularly. The kids forget to close the exterior doors even more frequently. My home was wired for an alarm system when I moved in but I wasn’t going to pay monthly for a dumb system I could replicate myself.

I tore out the existing alarm panel and designed a circuit that would hook to a Raspberry Pi and provide basic monitoring of the state of my doors. I have not added more sophisticated alerting but the hardware is now complete. With the pi4j library it is easy to interface with the outside world.

The core of the system includes a Raspberry Pi, an MCP23017 I/O multiplexer, and 8 4N25 optoisolators. Because of how I built my screw terminal board it only allows 6 external inputs instead of 8 but that fits my requirements fine. The MCP23017 also has another 8 bits of input or output that I exposed with a header for the next project.

The current output shows transitions on the inputs. Logic and alerting is yet to come.

[java] PIN STATE CHANGE "Sara Garage" <GPIO B0>=LOW [java] PIN STATE CHANGE "Sara Garage" <GPIO B0>=HIGH [java] PIN STATE CHANGE "Dave Garage" <GPIO B1>=LOW [java] PIN STATE CHANGE "Dave Garage" <GPIO B1>=HIGH [java] PIN STATE CHANGE "Kitchen Door" <GPIO B2>=LOW [java] PIN STATE CHANGE "Kitchen Door" <GPIO B2>=HIGH [java] PIN STATE CHANGE "Kitchen Door" <GPIO B2>=LOW [java] PIN STATE CHANGE "Kitchen Door" <GPIO B2>=HIGH [java] PIN STATE CHANGE "Patio Door" <GPIO B3>=LOW [java] PIN STATE CHANGE "Patio Door" <GPIO B3>=HIGH [java] PIN STATE CHANGE "Front Door" <GPIO B4>=LOW [java] PIN STATE CHANGE "Front Door" <GPIO B4>=HIGH

You can use the raw wiringpi API if you want to program in C or another language that has a wrapper. I prefer Java so I use pi4j. There will be more to come as I define the requirements and implement the software.

Raspberry Pi on my desk with the IO board and terminal board.

Completed IO board and terminal board.

Terminal board with screw terminals and headers.

The IO board showing the MCP23017 on the right and the 8 4N25 optos on the left.

Contacts put on each garage door with wire run back to the equipment room.