Who’s At The Door

Who’s At The Door

We wanted to make a small project to track the folks that came into our lab.  Using some sensors we had for the Grove system, we connected them to the Raspberry Pi, along with a Raspberry Pi Camera, to add some security to our lab.

We use an Ultrasound Sensor to detect if anyone has entered the room.  We use a Raspberry Pi Camera to take a photo of the intruder, and the Raspberry Pi sends an e-mail to us. We added a few actuators like a status  LED, a relay used to control any electronic circuit (because we can), a power switch to turn the entire thing on and off, and a buzzer which makes a loud sound whenever someone comes in.

IMAG0749

Setup

So here’s how all the sensors connect:

IMAG0757

 

Code

The code uses the Python SMTP library to send the mail, it should be installed by default. We use the Raspberry Pi Camera, this should get you started on that and we use the subprocess library to call it from the Python code.

You can find the source code for the project here.

Results

The photos below were e-mailed to us by the security system.

camera opAnd here’s the terminal output on the Raspberry Pi tracking our lab security:

whosonthedoor

Have a question?  Ask on our forum.