Raspberry Pi Security Camera
I was contacted through the Boulder Hackerspace by someone who wanted help building a Raspberry Pi security camera. We finally settled on the design being a cross between a PiLarm and system that sends pictures to your phone.
The hybrid system has:
- 4×4 membrane keypad for issuing commands
- Magnetic door sensor
- PIR motion detector
- 2×16 backlit LCD status display
- WiFi module
- And of course the the Raspberry Pi and Camera Module
I had a nice aluminum case that fit the display left over from a previous commercial design.
There where some “gotchas” in getting the Python code to work. It was not possible to just mix and match code from the two reference designs.
- Sending the MMS picture does not work with Wheezy, but only with Jessie because Wheezy’s Python 2.7.3 is incompatible with the Twilio import. Jessie provides Python 2.7.9, which works.
- The magnetic door sensor and PIR motion detector code triggered interrupts. This can interfere with the display code if not carefully structured.
- While a code block may work fine by itself, when you combine them you can put quite a demand on the processor. Scanning the matrix keyboard left little time to do anything else.
However, when all was done and said, the final design did a great job of detecting motion or an opening of a door, then taking a picture and texting it to a phone.
A possible next step is to rework this system using a Banana Pi D1, once we can figure out how to reprogram it.