Difference between revisions of "BetaDelta"

From ESE205 Wiki
Jump to navigation Jump to search
(asdf)
m (Changed protection level for "BetaDelta" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) [cascading])
 
(58 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
==Overview==
  
==Project Overview==
+
A problem that countless students have faced at WashU is finding an open study room. Whether it be studying for finals or just finishing some homework, finding an empty study room proves again and again to be a difficult task. We wanted to come up with an idea that would enable students to check a website and see if a study room was open before they would go all the way to check the study room for themselves. The purpose of BetaDelta is to provide real-time updates on the availability of a given study room. The information will be uploaded to a website, developed through Amazon Web Services, based on input from the BetaDelta device. The goal for the BetaDelta device is to detect occupancy via motion sensor, connected to a raspberry pi, and encased in a 3D printed shell.  
The purpose of the BetaDelta Website is mainly to provide real-time updates on the availability of residential study rooms to the South 40 WashU student body. The website will have a couple of additional key highlights, the first of which will be easily accessible logs of past weekly study room availabilities. This will allow students to predict the timing and location of their future study sessions. The second key highlight will be the ability to see which subjects are being studied in rooms where students are open to collaboration on a user-input basis.  
 
  
 
==Team Members==
 
==Team Members==
 +
 
*James Tiffany
 
*James Tiffany
 
*Rebecca Smith  
 
*Rebecca Smith  
Line 10: Line 11:
  
 
==Objectives==
 
==Objectives==
Create A Functional Website That Can:
+
 
*Gathers information from Raspberry Pi
+
===Device===
*Posts three things: whether or not room occupied, what subject is being studied, log of study room useage
+
*Constructed with a raspberry pi and motion sensor
 +
*Encased in a 3D printed shell
 +
*Contain python code capable of processing input from the motion detector
 +
 
 +
===Website===
 +
*Developed with Amazon Web Services
 +
*Display updated room occupancy on any device that can access wifi
 +
*Change colors based on occupancy (red for occupied, green for available)
  
 
==Challenges==  
 
==Challenges==  
*Learn Python
+
 
*Learn how to 3D print
+
*Learn Python coding techniques
*Design circuit involving R-Pi with sensors
+
*Learn how to use CAD and 3D print
*Learn how to connect R-Pi with website thru internet connection
+
*Build circuit between motion detector and raspberry pi
 +
*Create our own server framework and website using Amazon Web Services
  
 
==Budget==
 
==Budget==
  
{| class="wikitable"
+
*Raspberry Pi (x1): $0 (provided)
|-
+
*[https://www.adafruit.com/products/3259 Micro SD Card (8GB)] (x1): $9.95 + $7.14(Adafruit shipping) = $17.09
! Item
+
*[https://www.adafruit.com/product/189 Motion sensor] (x1): $9.95
! Quantity
+
*[http://www.amazon.com/Solderless-Flexible-Breadboard-Jumper-Wires/dp/B005TZJ0AM Breadboard Wires] (x1): $7.29
! Price
+
*[https://www.adafruit.com/product/571 Perf-board] (x1): $12.50
! Vendor
+
*[https://wordpress.com/#plans Website (WordPress)] (For three months): $2.99(X3) = $8.97
! Link
+
*Total: $55.80
|-
+
 
| Raspberry Pi
+
==Gantt Chart==
| 1
+
[[File:BestClear.jpg|650px|]]
| $0
+
 
| Lab
+
==Engineered Solutions==
|
+
 
|-
+
===3D Printing===
| Micro SD Card (8GB)
+
 
| 1
+
After touching up on CAD techniques, preliminary drawings were made. The first CAD model included holes for three sensors, as exemplified by the first picture in the evolution chain, as Beta Delta initially intended to include three sensors. Next, we printed a scaled-down version to ensure the printer could handle the inner intricacies of our design. Once affirmed, we proceeded to print our first to-scale version, which printed successfully. The only edit to our next and final print was to include a slot for our power supply.
| 9.95
+
=====Evolution of 3D Models=====
| Adafruit
+
[[File:P1.JPG|100px|caption =CAD drawing]] --> [[File:P2.JPG|100px|Down-Sized Print]] --> [[File:P3.JPG|80px|First To-Scale Print]] --> [[File:P4.JPG|80px|Final To-Scale Print]]
| https://www.adafruit.com/products/3259
+
 
|-
+
===Circuitry and Code===
| Ethernet Cord
+
After scouring the internet for example circuits, we found information on which connections we needed to make with each wire. The result of our research is depicted in the first evolution picture below. We then proceeded to build the circuit and write a simple code that would process motion detection and transform it into a usable format for upload onto our server. Our code was adjusted to ten seconds for purposes of an efficient demo, but in a real-life situation, we would set our timer to approximately 15 minutes.
| 1
+
====Evolution of Motion Sensor Implementation====
| $1.98
+
[[File:C1.JPG|100px|Diagram]] --> [[File:C2.JPG|100px|Circuit]] --> [[File:C3.JPG|100px|Code]]
| Cable WholeSale
+
 
| http://www.cablewholesale.com/products/network-phone/cat-6-cable/product-10x8-09106.php?utm_source=GoogleShopping&utm_medium=cpc&utm_term=10X8-09106&utm_campaign=Cat6%20White%20Ethernet%20Patch%20Cable%2C%20Snagless%2FMolded%20Boot%2C%206%20foot&gclid=Cj0KEQiAzsvEBRDEluzk96e4rqABEiQAezEOoAYN72FyaLne_oM2vU4zAUR9dRBWwIEKcCbeTiqapg4aArOI8P8HAQ
+
===Data Upload===
|-
+
We developed entirely our own framework, using bits and pieces from tens of tutorials. Our code was two-pronged, including a first set that interpreted the input from the motion sensor and raspberry pi, and a second set that handled the upload of data, display, and communication between our server and database. The code we typed in the raspberry pi was with the python language. This code looked at whether any motion was sensed by the PIR sensor and based on the result of occupied or unoccupied would send the respective information to our database which was created with PickleDB. Then utilizing our ec-2 user, we got information from the database, and depending on what it told us we used a flask application to present if our simulated room was occupied or unoccupied. We then used our jinja2 html code to further redesign and make our website look nice.
| Light (LDR) Sensor
+
====Evolution====
| 1
+
[[File:U1.JPG|100px|Part 1]] --> [[File:U2.JPG|100px|Part 2]] --> [[File:U3.JPG|70px|Result1]] or [[File:U4.JPG|70px|Result2]]
| $6.95 + 7.14 = 14.09
+
 
| Adafruit
+
==Results and Improvements==
| https://www.adafruit.com/product/1980
+
 
|-
+
===3D Printing===
| 1uF Capacitor
+
*Result: the end casing was successful in that it provided an enclosure for our circuit that was both protective and able to hide all wires. It also revealed the maximum amount of our device's round sensor bubble for a full 180 degrees of motion detection. The edges were also rounded for aesthetic appeal and the model was intentionally simply in order to not be a distraction in study rooms.  
| 2
+
*Improvements: the casing could have incorporated internal hooks for circuit wires, which if incorporated would have prevented us from needed to use tape instead. An additional slot for hanging could be drawn into the back of the casing so that it could be hung on wall hooks and thus not needed to rest on a study table, which would also make the device less noticeable in a study room. It could also include a digital display that would ensure a potential improvement to the website of user input would be legitimate.
| $11.98
+
 
| Uxcell
+
===Circuitry and Code===
| http://www.uxcell.com/1uf-50v-105c-radial-electrolytic-capacitor-5x11mm-p-162619.html
+
*Result: the motion sensor had easily adjustable sensitivity that spanned a large a large peripheral field and was enough to demonstrate occupancy in any given room.
|-
+
*Improvements: we could have hit a home run with our idea by incorporating a all three sensors we had initially planned to incorporate and by developing a more complete algorithm that weighs each sensor's input and produces a more accurate update to room occupancy.  
| Motion sensor
 
| 1
 
| $9.95 + $7.14 = $17.09
 
| Adafruit
 
| https://www.adafruit.com/product/189
 
|-
 
| Sound detector
 
| 1
 
| $6.95 + $7.14 = $14.09
 
| Adafruit
 
| https://www.adafruit.com/products/1063
 
|-
 
| USB Battery Pack for Raspberry Pi
 
|1
 
|$39.95 + $7.14 = $47.09
 
| Adafruit
 
| https://www.adafruit.com/product/1566
 
|-
 
| Breadboard Wires
 
| 1
 
| $7.29 + $2.29 = $9.58
 
| Amazon
 
| http://www.amazon.com/Solderless-Flexible-Breadboard-Jumper-Wires/dp/B005TZJ0AM
 
|-
 
| Total
 
|
 
| $125.88
 
|-
 
|}
 
  
 +
===Data Upload===
 +
*Result: we have a successful website up and running on our Amazon Web Server. It displays a room's vacancy status, from pulling updates from our database, in a centered table. The website background is red when the room is occupied and green when it is vacant. Try it now at www.betadelta.me!
 +
*Improvements: we could have a website with several key tabs. One tab could link to a log displaying past activity trends of the room. Another tab could allow user input based on an updated code on the potential improvement to the casing of a digital display - this could be cool way for users to broadcast the subject they are studying and "invite" friends to study their same subject together.
  
 +
===Demo Day!===
 +
====Presentation Poster====
 +
[[File:FinalPoster2.JPG|350px|our final poster]]
 +
*In order to simulate a vacant room to show the success of our device, we used the combination of a painted cardboard box and plastic to place over our sensor and prevent its infrared detection for just long enough to refresh our webpage. We were able to prove that our device and website work in both directions, from displaying occupancy to vacancy and vice versa.
  
Gantt Chart
+
==Repository==
[[File:reggie.png|caption]]
+
* [https://bitbucket.org/nial_alwash/betadelta Beta Delta Repository]
 +
*[http://www.thingiverse.com/thing:2288896 Beta Delta CAD Files]
  
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Spring 2017 Projects]]
 
[[Category:Spring 2017 Projects]]

Latest revision as of 19:39, 16 September 2017

Overview

A problem that countless students have faced at WashU is finding an open study room. Whether it be studying for finals or just finishing some homework, finding an empty study room proves again and again to be a difficult task. We wanted to come up with an idea that would enable students to check a website and see if a study room was open before they would go all the way to check the study room for themselves. The purpose of BetaDelta is to provide real-time updates on the availability of a given study room. The information will be uploaded to a website, developed through Amazon Web Services, based on input from the BetaDelta device. The goal for the BetaDelta device is to detect occupancy via motion sensor, connected to a raspberry pi, and encased in a 3D printed shell.

Team Members

  • James Tiffany
  • Rebecca Smith
  • Nial Alwash
  • Nathan Schmetter (TA)

Objectives

Device

  • Constructed with a raspberry pi and motion sensor
  • Encased in a 3D printed shell
  • Contain python code capable of processing input from the motion detector

Website

  • Developed with Amazon Web Services
  • Display updated room occupancy on any device that can access wifi
  • Change colors based on occupancy (red for occupied, green for available)

Challenges

  • Learn Python coding techniques
  • Learn how to use CAD and 3D print
  • Build circuit between motion detector and raspberry pi
  • Create our own server framework and website using Amazon Web Services

Budget

Gantt Chart

BestClear.jpg

Engineered Solutions

3D Printing

After touching up on CAD techniques, preliminary drawings were made. The first CAD model included holes for three sensors, as exemplified by the first picture in the evolution chain, as Beta Delta initially intended to include three sensors. Next, we printed a scaled-down version to ensure the printer could handle the inner intricacies of our design. Once affirmed, we proceeded to print our first to-scale version, which printed successfully. The only edit to our next and final print was to include a slot for our power supply.

Evolution of 3D Models

caption =CAD drawing --> Down-Sized Print --> First To-Scale Print --> Final To-Scale Print

Circuitry and Code

After scouring the internet for example circuits, we found information on which connections we needed to make with each wire. The result of our research is depicted in the first evolution picture below. We then proceeded to build the circuit and write a simple code that would process motion detection and transform it into a usable format for upload onto our server. Our code was adjusted to ten seconds for purposes of an efficient demo, but in a real-life situation, we would set our timer to approximately 15 minutes.

Evolution of Motion Sensor Implementation

Diagram --> Circuit --> Code

Data Upload

We developed entirely our own framework, using bits and pieces from tens of tutorials. Our code was two-pronged, including a first set that interpreted the input from the motion sensor and raspberry pi, and a second set that handled the upload of data, display, and communication between our server and database. The code we typed in the raspberry pi was with the python language. This code looked at whether any motion was sensed by the PIR sensor and based on the result of occupied or unoccupied would send the respective information to our database which was created with PickleDB. Then utilizing our ec-2 user, we got information from the database, and depending on what it told us we used a flask application to present if our simulated room was occupied or unoccupied. We then used our jinja2 html code to further redesign and make our website look nice.

Evolution

Part 1 --> Part 2 --> Result1 or Result2

Results and Improvements

3D Printing

  • Result: the end casing was successful in that it provided an enclosure for our circuit that was both protective and able to hide all wires. It also revealed the maximum amount of our device's round sensor bubble for a full 180 degrees of motion detection. The edges were also rounded for aesthetic appeal and the model was intentionally simply in order to not be a distraction in study rooms.
  • Improvements: the casing could have incorporated internal hooks for circuit wires, which if incorporated would have prevented us from needed to use tape instead. An additional slot for hanging could be drawn into the back of the casing so that it could be hung on wall hooks and thus not needed to rest on a study table, which would also make the device less noticeable in a study room. It could also include a digital display that would ensure a potential improvement to the website of user input would be legitimate.

Circuitry and Code

  • Result: the motion sensor had easily adjustable sensitivity that spanned a large a large peripheral field and was enough to demonstrate occupancy in any given room.
  • Improvements: we could have hit a home run with our idea by incorporating a all three sensors we had initially planned to incorporate and by developing a more complete algorithm that weighs each sensor's input and produces a more accurate update to room occupancy.

Data Upload

  • Result: we have a successful website up and running on our Amazon Web Server. It displays a room's vacancy status, from pulling updates from our database, in a centered table. The website background is red when the room is occupied and green when it is vacant. Try it now at www.betadelta.me!
  • Improvements: we could have a website with several key tabs. One tab could link to a log displaying past activity trends of the room. Another tab could allow user input based on an updated code on the potential improvement to the casing of a digital display - this could be cool way for users to broadcast the subject they are studying and "invite" friends to study their same subject together.

Demo Day!

Presentation Poster

our final poster

  • In order to simulate a vacant room to show the success of our device, we used the combination of a painted cardboard box and plastic to place over our sensor and prevent its infrared detection for just long enough to refresh our webpage. We were able to prove that our device and website work in both directions, from displaying occupancy to vacancy and vice versa.

Repository