People lie, people cheat, people steal. Have you ever met a determined liar? You know, people who when asked certain questions, never tell the truth or admit the wrong they’ve done. You give them so many chances to come clean and they never, never tell the truth … until you present photo or video evidence.
Here I’ll show a way of building a very effective video and audio surveillance tool using the raspberry pi.
This is a story of industrial espionage …
Wow that sounds a lot more exciting than it really is. The area to be secured is a room where only few people usually enter. This room contains a few regular office supplies so sometimes other staff are ordered to go into the room to get items. However, the room contains a filing cabinet where office files are stored. Some of the files are price lists and bid documents. The owners of the company suspect someone is taking a look at these files and maybe using them to compete against the company. The room is locked only sometimes during night or weekends. Sometimes the room is not locked at all.
- The suspect must be caught opening the room, the filing cabinet and specifically looking at the files in the cabinet. This will leave the suspect with no excuse. He shouldn’t be in the room, much less opening the filing cabinet and peeking at the files.
- The officers of the company don’t want to place obvious security cameras in place. They want to catch the thief in the act without tipping the thief off.
- Videos would be nice but even an image sequence capturing the activity would work.
- The suspect may have knowledge of electrical systems so there’s a risk of him being familiar with security systems.
- It’s going to happen in the dark / low light situations.
- The event may happen with a period of 1 week.
- Installation time is extremely short. There must be no suspicious activities.
- The location is that you can’t have any cabling that looks out of place.
- There are no support spots nearby to mount fixed support objects like DVRs or monitors.
- People can move / sit around the area or the room.
- The data must be retrievable from outside the room (i.e. You shouldn’t have to access the security device to get the pics).
The system cannot be too expensive.
- It has to be ready in 4 days.
So given that, here were the options:
CCTV / DVR
Cams / DVR
|Wireless IP Cams
|Media: Pic or Vid
|Duration: 1 week
||N (a few hrs. max)
|Location specific installation limits
|Low light / IR support
|Mounting: Hidden / Nonstandard
||Higher than 2
||Higher than 3
Option 1: Spycams
Most commercial spycams are nothing more than toys. Have you seen some of the eyeglass mounted ones? Those aren’t even useful as spycams. Anyone can spot them a mile away. But in this case, not even the good ones were fit for the job. Although they can conceal well, they won’t be able to last for the duration of the surveillance and don’t have low light support.
Option 2: CCTV system and DVR (Wired)
The problem here is that the location won’t support it. There isn’t any place available in the location to place the central equipment (DVR). There isn’t time to lay cabling properly and even so, any type of cabling would arouse suspicion.
Option 3: Using wireless cams
Wireless spycams that transmit in the Gigahertz range are widely available, but again, there’s no place in the location where you can place a central DVR. You can walk around with the receiver and monitor but you won’t be able to sit around for 24 hours. Also, there’s another thing I don’t like about commercial wireless cams is that anybody with a commercial receiver can see what you’re transmitting. So it’s not good for sensitive stuff.
Option 4: Wireless IP Cams
With wireless IP cams, you’ll need a good internet connection with good bandwidth. In this case, there’s no available way to provide internet connection.
With enough money, we could’ve modded whatever equipment we have, assigned as much people we need or event rent / pay for location specific things we need. Unfortunately that’s not the case. This is a really budget limited thing.
Luckily I and a few of my colleagues have been exploring using the Raspberry pi for security use before and all our tests pointed out it would be suitable for this situation.
We really didn’t need full motion video for this. A sequence of pics catching the thief with their hands in the cabinet with the files is all we needed. Audio will also be recorded. This will help identify activities that are happening in and out of the room.
We decided to use a 32 GB SD card for the raspberry pi. This would give us 2 weeks worth of still image sequences plus audio.
The device should be portable and not look out of place. It should be something we can put in the room on top of a filing cabinet, table or shelf and it wouldn’t lok out of place. We decided to use an AVR to be the case to hide the cameras in. The advantage is that it can be placed anywhere and it can be plugged in, providing 24/7 power to the circuits inside.
In line with the cost, we decided to use a couple of ordinary webcams that we modded for infrared light use. For lighting, we put a couple of incandescent bulbs outside the room window to provide enough IR for the cameras to pick things up even in total darkness.
Can we use the original raspberry pi camera module? Not for this app. It’s more expensive, the cable is too short for mounting and it’s not IR ready (although it might be possible to mod this for IR, we still haven’t tried it yet)
Hiding the Cameras:
Cameras should not be visible. People today are used to looking at stuff and if they see a round hole that shouldn’t be there they might suspect it’s a camera, specially paranoid people who have bad intentions. Because we were budget limited to regular webcams we used the opaque IR pass through filter approach. The “window” for the camera is very large but you won’t be able to see it. It just looks like an opaque black piece of plastic.
Recording the Media:
We built apps for the raspberry pi to record the images and audio on a periodic basis.
We configured the raspberry pi with a static IP address and installed a web server on it. We built a web app that can be used by a remote party to browse through the images and audio.
We configured a pocket wifi router (e.g. ssid=”securebase”). Then we configured the raspberry pi to connect to this router everytime it is within range.
How it would work:
The unit can be taken inside the room, plugged in and left there. A monitoring guy can go to the office every day or every few days, sit in a desk near the room with the pocket wifi with him. The unit will connect to the pocket wifi router and the monitoring guy can browse through the files using his phone. Optionally, he can download the entire sequence of files in a laptop.
How long did it take to catch the perpetrators?
One freaking day! If the unit was installed today, the idea was to look at it the next day to see if we should tweak the position a bit. But lo and behold we already got an image sequence of the files being looked at.
The client liked the results and I am pretty pleased with it myself.
We left the unit there still for several days. There does seem to be times when you won’t be able to connect to the Raspbery pi remotely but it was still taking pics and recording. The simple solution was to get someone to unplug it and plug it again. Maybe a reboot script should be included. I’ll be trying that in the next iterations of the device.
Before implementing a project like this, please consult your legal advisors. Laws may vary from territory to territory.
Please be responsible when using devices like these. You know what a certain Uncle Ben said: “With great power comes great responsibility”.
That’s it. The software and hardware will be discussed in following posts. Stay tuned!