Aws-azure-login is a command-line utility for organisations using Azure Active Directory to authenticate users to the AWS console. It lets you use an Azure A...
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
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, the PIFace inputs also works 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 put 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 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 current from the sensor is pulled down to 0v we need a 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 form the input port to ground, triggering an input that can be read on the Pi.
The circuit allows the alarm panel to functional normally, while also allowing PI to detect motion events using its inputs.