Difference between revisions of "Peek-a-Thief"
|Line 55:||Line 55:|
=== Gantt Chart ===
=== Gantt Chart ===
[[File: New_GC.png |1000px|thumb|
[[File: New_GC.png |1000px|thumb|-A-Thief Gantt Chart]]
Revision as of 14:07, 2 May 2017
- 1 Project Proposal
- 2 Design & Solutions
- 3 Results
What goes on in your dorm room while your away? When you have class and your roommate is home, what do you think he is doing? If you are even slightly suspicious that your personal stash of snacks is being eaten by someone else, then we have the solution for you.
Introducing: Peek-a-Thief, an operating system with the sole purpose of capturing close up images of the people who open up your drawers. Our end goal is to create a security device that discretely captures thieves in action.
Check out the Peek-A-Thief Twitter Feed!
- Michael Pichardo
- Derick Speltz
- Will Luer (TA)
- Sense a person that opens up your drawer using the HC-SR04 ultrasonic sensors
- Create a sleek operation design that ensures the electrical hardware is hidden
- Create a mobile system that can operate in multiple environments including dorm rooms, offices, etc.
- When triggered by the sensor, take a picture using an 8-Megapixel camera
- Take pictures of a person every second for the first 10 seconds the drawer is opened
- Store picture data locally on Raspberry Pi
- Upload to social media platform (Twitter)
- Stretch Objective: Integrate an Alarm system to startle the thieves!
- Design sensor supports (for 3-D print) using SolidWorks software
- Hiding camera, wires, etc. so that they cannot easily be seen from the outside
- Construction: Attach the sensor supports onto the inside of the drawer with epoxy glue and ensuring that the sensors don't interfere with each other
- Environment: Finding a good location for the system to operate in (good lighting for the picture, minimal extra noise that would interfere with the ultrasonic sensors)
- Hardware: Making sure sensors are stable and that the ultrasonic sensors work when sending signals against different types of materials
- Software: saving all picture data on Raspberry Pi to possibly upload to a social media interface
- User Safety: ensure fire safety from electrical system
- Privacy Considerations: In order for our system to work properly, we will need to take a picture of the person by optimizing camera angle. Given that it is surveillance of our own property, privacy of thieves will not be compromised.
- Operation Costs: Our operation does not cost us anything except time, but we enjoy what we do
- 8 MegaPixel Camera for Raspberry Pi: $25.00 + 7.99 (Shipping Charges) 
- 1-meter Flex Cable for Raspberry Pi $3.95 + 9.42 (Shipping Charges) 
- Raspberry Pi Charging Cable $5.95 + $9.42 (expedited shipping) 
Total Budget: $61.73
Lab Materials & Our Own Materials
- Sterilite 16 Quart Stacking Drawer with White Frame - 17" L x 14-3/8" W x 6-7/8" H (We own it) 
- Glue Gun 
- Through Hole Resistors 
- Male to Male Jumper Cables 
- Female to Female Jumper Wires 
- One: Medium-sized Stuffed Teddy Bear (We own it)  
- Raspberry Pi & Breadboard (Lab)  
- Two Ranging HC-SR04 Detector Sensors for Raspberry Pi: (Lab) 
- Wires, Cables, Electrical Tape, Soldering Iron 
Design & Solutions
Module Description & Solutions
Module 1: Drawer
The plastic drawer was a simple module because it was easy to assemble and consisted of only two components (outside structural box and the drawer itself) which fit perfectly together. Despite the simplicity of the drawer, it had to be modified a little to fit the specifications of our project. To support the Teddy Bear module, we had to cut out a rod of wood and connect it to the top of the drawer using hot glue. Additionally, to prevent obstruction from opening/closing the drawer, notches had to be cut in the plastic roof of the drawer. This made room for a GPIO connecting cable between the breadboard (which was on the inside of the drawer) and the raspberry pi (outside of drawer). Further, we carefully measured and cut sheets to drill to the sides of the drawer to hide the wires on the inside of the clear plastic walls.
Module 2: Teddy Bear / Camera
The teddy bear had to undergo surgical operations to ensure it could sit in an upright position on top of the drawer. The wooden rod had to be inserted into a slit on the backside of the bear to keep it from falling during the demo. Additionally, to ensure quality pictures of the thieves in action, the camera had to be placed at an optimal angle inside the eye cavity. To do this, we used stripped wires to attach the camera to the bear fabric while being able to hide the camera discretely. Even then, there was a lot of touching up to do by cutting all the fur around the eyes. This ensured that nothing obstructed the lens of the camera and prevented the user to get a clear picture of the thief.
Module 3: Sensor / Sensor Support
Our goal was to create a system with two HC-SR04 ultrasonic distance sensors to complete the task of detecting whether the drawer was opened or closed. For this, the sensors must be pointed upwards towards the roof of the drawer. So when closed, the sensors would know the distance to the roof of the drawer and not take a picture and when opened, the distance would be greater than the roof, thus passing the threshold distance and capturing a picture. To position the sensors in this way, we had to design identical 3-D printed pieces that would connect to the inside walls of the drawer and we could attach our sensors to these supports. These sensors were glued towards the very front of the drawer so when the drawer is opened, the sensor would immediately identify if it is open, and trigger the camera.
Module 4: Wires & Breadboard
So we didn’t have to attach the breadboard directly to the raspberry pi, we used a GPIO connector. Next, the wiring from the sensors to the breadboard was done by looking at an online diagram which showed where each pin on the sensor should go to on the board and reciprocating the process on the other side to account for a second sensor. Using the diagram, we had to add a 4.7 k ohm and a 10 k ohm specific resistors on each side of the breadboard. The wires provided with the sensors were very small and we had to solder extensions to these so it would reach from the front of the drawer (where the sensors were) to the back (where the breadboard was) Also, to make room for personal objects inside the drawer and ensure its utility, we needed to deal with the wires connecting the ultrasonic sensors to the breadboard. Thus, we bundled the wires together and taped them to the sides of the drawer. The breadboard itself was also taped to the back wall of the drawer so that all wires were stable in place and there was minimal chance for wires to be unplugged from the breadboard.
Module 5: Raspberry Pi
This module was the operation control system of our entire project. Connected to the sensors and the camera, the Pi could use Python code to operate the hardware. We used source code from a project called Feeder Tweeter which used ultrasonic sensors and a camera to take pictures of birds. We had to edit the code to account for having two sensors and our specific project goals. Additionally, the Raspberry Pi stored the pictures we took locally and uploaded these pictures onto Twitter.
Our final product was a complete security system that takes pictures of a thief when the drawer is opened and uploads these pictures automatically to Twitter. The system knows if the drawer is opened when an ultrasonic sensor does not detect the roof of the drawer directly above it. If opened, a signal is sent to a hidden camera inside a teddy bear on top of the drawer to take a picture of the thief. Also, we coded our project so that it would only take a maximum of 10 pictures while the drawer is opened so that we do not spam our Twitter page (@peekathief). We did not reach our stretch objective of integrating an alarm system in the end because we spent too much time making sure our project was robust after everything fried during testing.
These results are nearly identical to our original objectives with one exception. At first, we created our project to have two ultrasonic sensors (one on either side of the drawer) in case the thief was smart enough to cover one sensor with a hand while opening the drawer with the other. Having two ultrasonic sensors would prevent any thief from outsmarting our security system and would take pictures of the thief regardless if one of the sensors was covered up. We got our project to work perfectly well with two sensors, having meticulously coded and wired everything to account for an additional sensor. However, when doing a series of tests, our raspberry pi and both ultrasonic sensors fried due to overuse and a surge in voltage. Having limited materials, we could replace the raspberry pi, but only one of the ultrasonic sensors. Using only one ultrasonic sensor in the demo was a tough decision to make since we had spent so much time accounting for two, but our project worked perfectly fine in the end. Luckily, nobody could outsmart us on demo day since we left one of the fried sensors hooked up for show.