Difference between revisions of "Peek-a-Thief"

From ESE205 Wiki
Jump to navigation Jump to search
m (Protected "Peek-a-Thief" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(91 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Overview ==
+
== Project Proposal ==
 +
 
 +
=== Overview ===
 +
[[File: PAT1.jpeg |250px|thumb|right|Set up of Drawer when open with sensors pointing upwards and Teddy Bear spy camera mounted on Drawer.]]
 +
 
 
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.
 
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.  
 
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.  
  
== Team Members ==
+
'''Check out the  [https://twitter.com/peekathief Peek-A-Thief Twitter Feed!]'''
 +
 
 +
===Repositories ===
 +
*[https://github.com/willluer/PeekAThief Source Code for Peek-A-Thief]
 +
**We used 2PAT.py for our Demo which had one sensor working
 +
**PAT1.py was the final code for 2 sensors.
 +
*[https://pinshape.com/items/35039-3d-printed-peek-a-thief-sensor-supports 3-D Printed Sensor Support]
 +
**You will find a picture of how the 3-D printed sensor support looks like and the 3-D design.
 +
**Download for free to get an up-close look at our design!
 +
 
 +
=== Team Members ===
 
*Michael Pichardo
 
*Michael Pichardo
 
*Derick Speltz
 
*Derick Speltz
 
*Will Luer (TA)
 
*Will Luer (TA)
  
== Objectives ==
+
=== Objectives ===
 
*Sense a person that opens up your drawer using the HC-SR04 ultrasonic sensors
 
*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 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.
 
*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
 
*When triggered by the sensor, take a picture using an 8-Megapixel camera
*Take these pictures of a person within a 1.0 meter range of the sensors every second for the first 10 seconds the drawer is opened
+
*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)
+
*Store picture data locally on Raspberry Pi
*Stretch: Integrate an Alarm system to startle the thieves!
+
* Upload to social media platform (Twitter)
**Stretch Objective: Upload pictures onto social media
+
**Stretch Objective: Integrate an Alarm system to startle the thieves!
  
== Challenges ==
+
=== Challenges ===
 
*Design sensor supports (for 3-D print) using SolidWorks software
 
*Design sensor supports (for 3-D print) using SolidWorks software
 
*Hiding camera, wires, etc. so that they cannot easily be seen from the outside
 
*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 command strips and ensuring that the sensors don't interfere with each other
+
*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)
 
*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
 
*Hardware: Making sure sensors are stable and that the ultrasonic sensors work when sending signals against different types of materials
Line 30: Line 44:
 
*Operation Costs: Our operation does not cost us anything except time, but we enjoy what we do
 
*Operation Costs: Our operation does not cost us anything except time, but we enjoy what we do
  
== Budget ==
+
=== Budget ===
*One: 8 MegaPixel Camera for Raspberry Pi: $25.00 + 7.99 (Shipping Charges)  [http://www.mcmelectronics.com/product/28-21440?scode=GS401&utm_medium=cse&utm_source=google&utm_campaign=google&scid=scplp28-21440&sc_intid=28-21440&gclid=CjwKEAiA8dDEBRDf19yI97eO0UsSJAAY_yCSyp2aPl3JggMC0SDHdZleGUpHwdHu91phYvU73bmbjRoCMS_w_wcB]
+
*8 MegaPixel Camera for Raspberry Pi: $25.00 + 7.99 (Shipping Charges)  [http://www.mcmelectronics.com/product/28-21440?scode=GS401&utm_medium=cse&utm_source=google&utm_campaign=google&scid=scplp28-21440&sc_intid=28-21440&gclid=CjwKEAiA8dDEBRDf19yI97eO0UsSJAAY_yCSyp2aPl3JggMC0SDHdZleGUpHwdHu91phYvU73bmbjRoCMS_w_wcB]
* One: IRIS 32 Quart Stacking Drawer, Black $17.99 (Amazon Prime = Free Shipping) [https://www.amazon.com/gp/product/B0042KNZGA/ref=s9_dcacsd_dcoop_bw_c_x_4_w]
+
*1-meter Flex Cable for Raspberry Pi $3.95 + 9.42 (Shipping Charges) [https://www.adafruit.com/products/2143]
*One: 1-meter Flex Cable for Raspberry Pi $3.95 + 9.42 (Shipping Charges) [https://www.adafruit.com/products/2143]
+
*Raspberry Pi Charging Cable $5.95 + $9.42 (expedited shipping) [https://www.adafruit.com/products/2379]
* One: Stuffed Teddy Bear (We own it) [https://www.dropbox.com/s/aa09pklvjptewag/Screen%20Shot%202017-03-03%20at%203.12.13%20PM.png?dl=0] [https://www.amazon.com/GUND-Philbin-Chocolate-Teddy-Bear/dp/B003S7EYZY/ref=sr_1_7?s=toys-and-games&ie=UTF8&qid=1488576064&sr=1-7&keywords=teddy+bear]
+
 
*Wires, Cables, Electrical Tape, Soldering Iron (Lab) [https://www.amazon.com/Hobbico-HCAR0776-Soldering-Iron-Watt/dp/B0006NGZK0/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1488576120&sr=1-1&keywords=soldering+iron]
+
  Total Budget: $61.73
* One: Raspberry Pi & Breadboard (Lab) [https://www.amazon.com/Pcs-Point-Solderless-Prototype-Breadboard/dp/B01LJD9GD8/ref=sr_1_2?s=electronics&ie=UTF8&qid=1488578692&sr=1-2-spons&keywords=breadboard&psc=1] [https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Model-Motherboard/dp/B01CD5VC92/ref=sr_1_1?s=electronics&ie=UTF8&qid=1488578778&sr=1-1&keywords=raspberry+pi]
+
 
* Two: Ranging HC-SR04 Detector Sensors for Raspberry Pi: (Lab) [https://www.amazon.com/SainSmart-HC-SR04-Ranging-Detector-Distance/dp/B004U8TOE6/ref=sr_1_1?s=electronics&ie=UTF8&qid=1488578743&sr=1-1&keywords=HC-SR04+Detector+Sensors]
+
=== Lab Materials & Our Own Materials ===
  Total Budget: $64.35
+
*Sterilite 16 Quart Stacking Drawer with White Frame - 17" L x 14-3/8" W x 6-7/8" H (We own it) [http://www.usplastic.com/catalog/item.aspx?sku=12716&gclid=CjwKEAjw2qzHBRChloWxgoXDpyASJAB01Io0V4BFKXcJOm84_E0Ui9SjCQc1lGtPQhfPUB3-d-_6FRoC1o7w_wcB]
 +
*Glue Gun [https://www.walmart.com/ip/Glue-Gun-Mini-20w-Hot-Melt-Electric-110-220v-25-Glue-Sticks/861060664?wmlspartner=wlpa&selectedSellerId=8588&adid=22222222227074728416&wmlspartner=wmtlabs&wl0=&wl1=g&wl2=c&wl3=186818712194&wl4=pla-291112854680&wl5=1020618&wl6=&wl7=&wl8=&wl9=pla&wl10=115793585&wl11=online&wl12=861060664&wl13=&veh=sem]
 +
*Through Hole Resistors [https://www.adafruit.com/product/2784]
 +
*Male to Male Jumper Cables [https://www.adafruit.com/product/759]
 +
*Female to Female Jumper Wires [https://www.adafruit.com/product/1950]
 +
* One: Medium-sized Stuffed Teddy Bear (We own it) [https://www.dropbox.com/s/aa09pklvjptewag/Screen%20Shot%202017-03-03%20at%203.12.13%20PM.png?dl=0] [https://www.amazon.com/GUND-Philbin-Chocolate-Teddy-Bear/dp/B003S7EYZY/ref=sr_1_7?s=toys-and-games&ie=UTF8&qid=1488576064&sr=1-7&keywords=teddy+bear]
 +
*Raspberry Pi & Breadboard (Lab) [https://www.amazon.com/Pcs-Point-Solderless-Prototype-Breadboard/dp/B01LJD9GD8/ref=sr_1_2?s=electronics&ie=UTF8&qid=1488578692&sr=1-2-spons&keywords=breadboard&psc=1] [https://www.amazon.com/Raspberry-Pi-RASPBERRYPI3-MODB-1GB-Model-Motherboard/dp/B01CD5VC92/ref=sr_1_1?s=electronics&ie=UTF8&qid=1488578778&sr=1-1&keywords=raspberry+pi]
 +
* Two Ranging HC-SR04 Detector Sensors for Raspberry Pi: (Lab) [https://www.amazon.com/SainSmart-HC-SR04-Ranging-Detector-Distance/dp/B004U8TOE6/ref=sr_1_1?s=electronics&ie=UTF8&qid=1488578743&sr=1-1&keywords=HC-SR04+Detector+Sensors]
 +
*Wires, Cables, Electrical Tape, Soldering Iron  [https://www.amazon.com/Hobbico-HCAR0776-Soldering-Iron-Watt/dp/B0006NGZK0/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1488576120&sr=1-1&keywords=soldering+iron]
 +
 
 +
=== Gantt Chart ===
 +
[[File: New_GC.png |1010px|thumb|left|Peek-A-Thief Gantt Chart]]
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
*
 +
 
 +
== 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 [https://electrosome.com/wp-content/uploads/2015/01/Interfacing-Raspberry-Pi-with-HC-SR04-Circuit-Diagram.png 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.
 +
 
 +
=== HowTo Pages ===
 +
 
 +
*[[How to wire ultrasonic sensor to breadboard|How to Wire Ultrasonic Sensor to Breadboard]]
 +
*[[How to post pictures and randomize message on twitter using raspberry Pi]]
 +
 
 +
== Results ==
  
==Weekly Logs==
+
[[File:Sstg-0084875C-6F55-4A48-A7B4-D0700B197386.mp4||200px|thumbnail|Peek-A-Thief Demo]]
*Week 1: This week we focused on the design of our enclosure and we agreed that the best set up is a V-shaped entrance so that the critter can enter from a wide angle and not feel trapped in the process. Also, we spent time between classes observing the behavior of squirrels and how close we can get to them without them running away. We found that if food is provided to the animal, they are more than happy to consume starch products and nuts. Specifically, the Eastern Gray Squirrel prevalent on the WashU campus like to consume walnuts even though we have spotted them "dumpster diving" in outdoor trash cans and eating whatever they can find. We also found a project that is very similar to us on google, except the inventors were targeting birds.  Here is the link to their project.
 
  
#http://www.feedertweeter.net/developers
+
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.
#https://www.raspberrypi.org/blog/feeder-tweeter/
 
  
*Week 2: This week we changed our project idea to comply with Washington U. regulations regarding animals.  We spent the week planning out our entire project timeline (outlined in our Gantt Chart) and finalizing (pending approval) our design/ set-up. We immediately want to order our supplies and stay on schedule with our timeline. (Our new project idea is to capture thieves redhanded. Every time you open the drawer, a sensor will be triggered that calls upon a hidden camera to snap a photo of the thief. Our plan is to insert this hidden camera inside a teddy bear sitting on top of the drawer. We feel the teddy bear will hide the electrical wires and cameras discretely.)
+
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.
  
*Week 3: We got our project approved on the evening of Friday Feb 24th, 2017.  We immediately ordered all supplies that we would need for our project and collected inventory of parts that we said we could use from the lab.  We also got our own locker for our parts.  Since the approval process was delayed, this was the most we can do this week.
+
[[File:Peek-a-thief overview.jpg|1000px|thumbnail|left|Peek-A-Thief Overview]]
  
*Week 4: We downloaded Python and began coding for our project using a source code from Feeder Tweeter.  We also began designing the support for our sensors on Solidworks, so we could get it 3-D printed soon.  We have also connected the more hardware onto the breadboard and reconfigured the wiring a little bit. We also edited our wiki page to adjust for some aesthetics and minor typos.
 
 
==Gantt Chart ==
 
[[File: Peek-a-Chart.png |1000px|thumb|left]]
 
  
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Spring 2017 Projects]]
 
[[Category:Spring 2017 Projects]]

Latest revision as of 16:08, 3 May 2017

Project Proposal

Overview

Set up of Drawer when open with sensors pointing upwards and Teddy Bear spy camera mounted on Drawer.

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!

Repositories

  • Source Code for Peek-A-Thief
    • We used 2PAT.py for our Demo which had one sensor working
    • PAT1.py was the final code for 2 sensors.
  • 3-D Printed Sensor Support
    • You will find a picture of how the 3-D printed sensor support looks like and the 3-D design.
    • Download for free to get an up-close look at our design!

Team Members

  • Michael Pichardo
  • Derick Speltz
  • Will Luer (TA)

Objectives

  • 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!

Challenges

  • 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

Budget

  • 8 MegaPixel Camera for Raspberry Pi: $25.00 + 7.99 (Shipping Charges) [1]
  • 1-meter Flex Cable for Raspberry Pi $3.95 + 9.42 (Shipping Charges) [2]
  • Raspberry Pi Charging Cable $5.95 + $9.42 (expedited shipping) [3]
 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) [4]
  • Glue Gun [5]
  • Through Hole Resistors [6]
  • Male to Male Jumper Cables [7]
  • Female to Female Jumper Wires [8]
  • One: Medium-sized Stuffed Teddy Bear (We own it) [9] [10]
  • Raspberry Pi & Breadboard (Lab) [11] [12]
  • Two Ranging HC-SR04 Detector Sensors for Raspberry Pi: (Lab) [13]
  • Wires, Cables, Electrical Tape, Soldering Iron [14]

Gantt Chart

Peek-A-Thief Gantt Chart

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.

HowTo Pages

Results

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.

Peek-A-Thief Overview