Raspberry PI Back To Base Home Alarm
My raspberry PI project is a back to base add-on to a very old home alarm system. My goal is keep the existing panel functioning as is, extending its usefulness with the raspberry PI.
My aim is to get PI to do the following for me:
- Monitor each of the motion sensors connected to the raspberry PI.
- Monitor the indoor / outdoor sirens
- Remotely disable sirens
- Remotely enable / disable intruder monitoring
- Receive a push notification when an intruder is detected
- Log statistics on room usage
- Live motion monitoring
Alarm Panel Motion Sensors
Raspberry PIFace Input Ports
Circuit Design
My circuit design was an exercise in trial and error. My first attempt was to connect the sensors directly to the input sensors on the Raspberry PIFace, the motion sensors go to ground when they sense movement, and the PIFace inputs also work on this premise so this seemed like a logical and very simple solution. The only problem with the approach is it impacted the existing alarm system, by connecting directly to the sensor input I could never arm the alarm panel. Wiring directly to PIFace puts the zone in a constantly open state.
Plan B was to use to the motion sensor to drive a transistor to switch the input on the PiFace by connecting the input to ground. My motion sensor outputs a 6v 4.2ma when nothing is happening, once motion is detected it goes to ground. To switch only when the current from the sensor is pulled down to 0v we need an NPN transistor.
The base of the transistor is connected to the output of the motion sensor. The collector is connected to the common ground and the emitter is connected to the input port on PiFace. When motion is detected the transistor is switched allowing current to flow from the input port to ground, triggering an input that can be read on the Pi.
The circuit allows the alarm panel to function normally, while also allowing PI to detect motion events using its inputs.