Back in 2012 the Raspberry Pi caught my eye because I wanted to make a custom home security system. My mountain bike had been stolen and I wanted to make a system to have my revenge. Unfortunately I got side tracked and accidentally wrote 190 blog posts instead. Many of them are based on ideas I was trying out for potential security applications.
So three years later I’ve decided to get back to my Pi roots and finish the system I had originally planned.
As with many hobbyist projects I could buy a commercial off the shelf system but where is the fun in that? If I am going to catch a burglar I want the smug satisfaction I caught one with something I built myself.
So this is the first part in a series of posts where I will aim to describe my system and present its progress. As I write this I’ve got half of it done and most of the components are sat in a shoe box.
Here are the requirements I’ve defined for my system :
- Movement triggered camera which can take photos
- Be able to operate in day and night lighting conditions
- Trigger infrared lamps if required based on light levels
- Ability to send SMS and email notifications via Ethernet
- Measure temperature and light levels
- Give a visual indication the system is operating
- Web interface for remote monitoring and system administration
- Ability to upload photos off-site in case the local storage is tampered with or destroyed
To keep things simple I’m focusing on taking photos rather than recording video. Given the positioning of the system I’m going to get a lot of movement from people, vehicles and cats and I suspect video would just get a bit difficult to manage and review.
Raspberry Pi Choice
Originally I planned to use a Raspberry Pi Model B. Mainly because it was the only one available but I’ve decided to go for a Model B+. The Pi 2 was tempting but I wanted to get the system working on a normal Pi and give myself the option of an upgrade at a later date.
So the first major component is a fresh Raspberry Pi Model B+ from Farnell Electronics.
In order to start planning the location of components and the interconnections between them I created a basic system diagram. The idea of this was to stop having to redraw the same system on a scrap of paper which I would almost certainly lose a few days later.
The system consists of two boxes. One mounted inside my garage which provides power and ethernet. The second box is mounted outside and contain the camera and sensors. This allows the Pi to have some protection from extremes in temperature and allows it to continue functioning if the external box is attacked.
- Internal Box
- 12V 3.5A power supply
- 12V to 5V voltage converter to provide the Pi with 5V
- Raspberry Pi Model B+
- Stripboard to provide connectors for cables
- Switched Power connectors for 2 Intrared illuminators
- External Box
- PiNoIR camera
- Passive Infrared module
- Light sensor
- Temperature sensor
- Tamper switch
The external box is connected to the internal box via a 40 way ribbon cable and an extended Pi camera ribbon cable. Using ribbon cables means I can feed them into the garage without drilling any additional holes in the wall.
The main code will be written in Python and make use of the RPi.GPIO and PiCamera libraries. The sensors are I2C based modules so I will use my own I2C tutorials to read data from them. At some point in the past I’ve written Python to do everything I need this system to do so it will be a case of bringing it all together.
To start with I will write a test script that will exercise all the hardware components and prove they work as expected before I mount any hardware outside.
The next posts in this series will be :
- RobotSentry – Home Security System – Part 2 – Shopping List
- RobotSentry – Home Security System – Part 3 – Hardware Testing
- RobotSentry – Home Security System – Part 4 – Installation Outside
- RobotSentry – Home Security System – Part 5 – Working System!