
Hello friends, I hope you all are doing great. Today, I am going to share the MCP23017 Door and Window Alarm on Raspberry Pi 5 - Proteus Simulation, the ninety-eighth project of our IoT Projects series. If you have searched for a Raspberry Pi burglar alarm, how to use an MCP23017 with a Raspberry Pi, MCP23017 interrupts in Python, or how magnetic door contacts work, here is a complete one in a Proteus simulation. A wired alarm panel is a surprisingly good lesson in embedded design: inputs that must never be missed, a state machine with delays, and a failure mode that has to be the safe one. This project turns a Raspberry Pi 5 into an alarm panel for a small house. Four MC-38 magnetic contacts guard the front door, the back door, the kitchen window and the bedroom window. They are wired to an MCP23017 16-bit I/O expander, so all four zones cost the Pi only its two I2C wires and one interrupt line, and twelve pins are left for more. The MCP23017 raises its interrupt the moment a contact changes; the Pi reads which pin changed and what the port looked like at that instant. The panel chimes when a door opens while it is disarmed, refuses to arm with a window open, gives you an exit delay to leave and an entry delay to come home, and sounds the siren for anything else. A dashboard arms and disarms it from a laptop or a phone. In this tutorial, we will go through the circuit, how a reed contact works, the MCP23017's registers and its interrupt-on-change, the alarm's state machine ...







