fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline...

21
DESIGN DOCUMENT Electronic Package Lockbox University of Portland Donald P. Shiley School of Engineering EE 483A - FALL 2017 Team Members: McKenzie Wilde (Team Leader) Emmanuel Sion (Webmaster) Jean Paul Mugisha Louie Amurao Faculty Advisor: Dr. Joseph Hoffbeck Industry Advisor: Jim Yoder Clients: Jay and Laurie Wilde

Transcript of fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline...

Page 1: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

DESIGN DOCUMENT

Electronic Package Lockbox

University of Portland

Donald P. Shiley School of Engineering

EE 483A - FALL 2017

Team Members:

McKenzie Wilde (Team Leader)

Emmanuel Sion (Webmaster)

Jean Paul Mugisha

Louie Amurao

Faculty Advisor:

Dr. Joseph Hoffbeck

Industry Advisor:

Jim Yoder

Clients:

Jay and Laurie Wilde

Page 2: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

1

Table of ContentsIntroduction............................................................................................................................ 2

High Level Architecture …...........................................................................................…….4

Component Structure............................................................................................................ 5

Physical Box.................................................................................................................5

Microcontroller.............................................................................................................6

Sensors..........................................................................................................................6

Wifi Module.................................................................................................................6

Software Structure.................................................................................................................7

System Test Plan.....................................................................................................................8

Milestones..............................................................................................................................12

Final Budget..........................................................................................................................13

Conclusion.............................................................................................................................14

Page 3: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

2

IntroductionThe following design document will describe the details on how Team Fourtress designed

and constructed an “Electronic Package Lockbox”. An engineering professor at the University of Portland, who emphasized the issue of package theft in their neighborhood, inspired this project. Therefore, the team decided to build a lockbox prototype (See Figure 1) that is inexpensive and features communication between the lockbox and the owner through Wi-fi. This lockbox will notify the owner whenever a package arrives via electronic message. The lockbox prototype will first detect if a package placed into the lockbox using sensors. When a package is placed into the lockbox, the device will send an electronic message to the owner of the lockbox that they received a package. The owner will then retrieve the package by opening the lockbox door with a key. 

Major design challenges posed by this project include the programming of the Arduino microcontroller to ensure the user receives an electronic message that a package is in the lockbox as well as the physical design of the lockbox. The team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program sends a message to the owner that a package is in the lockbox. The team will design and build the physical lockbox to specific package dimensions, which should fit most average-sized packages. Other design challenges include the locking mechanism of the lockbox and the calibration of the sensors. With the help of University of Portland’s Shiley lab technicians and professors, the team will be able to design a working locking mechanism that prevents package theft. The team also plans to calibrate the sensors for the device prototype through multiple test cases that assesses if the sensors are detecting the package in the lockbox.

Page 4: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

3

Figure 1. Device Prototype Diagram

The lockbox prototype will be used like a standard mailbox on a porch. The process begins when a delivery person drops a package into the lockbox through a top door similar to a standard mailbox. The owner will then receive an electronic message describing that a package has been delivered. The package can be retrieved by unlocking the bottom door using a key and the bottom door is locked by the owner. (See Figure 2)

This design document will cover the design of the hardware, software, and Macro model of the project. It will elaborate on important design decisions and how they will affect the project. This document includes system test and development plans that explain the development of the system. Finally, it will describe the risks of the project and present the final budget as well as the milestones for the project.

Figure 2. User Interface Diagram

Page 5: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

4

High-Level Architecture

The prototype device will be encompassed inside a plexiglass box that we design. This box acts as the user interface. The lockbox will be sketched with specific dimensions. These sketches will be given to Shiley Lab Technicians and they will construct the box. The box encompasses all the electrical components of the device. Figure 3 shows the major electrical blocks of the device. The green blocks represent the parts of the device users will interact with. The blue blocks represent the electronic blocks.

Figure 3. High Level Architecture

Page 6: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

5

The box has a package door that will house the magnetic sensor circuit. A magnet will be placed on the door and a Hall-Effect sensor will be attached near the magnet on the door. When the sensor is near the magnet the state is “ON”, meaning the door is closed. The sensor reads “OFF” when the door is opened. The sensor will be attached to the Arduino and the load sensor circuit consists of 4 load cells connected in a Wheatstone Bridge configuration. A plate will be placed on top of the load sensors and the load sensors will be connected to Load Cell Amplifier HX711. The amplifier will be connected to the Arduino. The signal sent by the load sensor will be translated by the Arduino. When the magnetic sensor is tripped, this triggers the Arduino to read from the load sensor. The Arduino will determine if there is a change in the weight last time it was checked. It will store that weight, then zero the sensor. The weight will be processed by the Arduino and send a message to the WiFi module. The message will be sent to the user’s email.

Component Structure

1. The Physical Box: This box will contain all the electronic components and have room for the package. (See figure 4)

Dimensions: 17"x18"x28"

Materials: Plexiglass

Diagram

Figure 4. Lockbox Structure Diagram

Page 7: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

6

2. Microcontroller: The Arduino Uno microcontroller will be used in controlling all of the electronic components that will be used in this project such as sensors and WiFi module. It will also be able to send a notification to the user once a package is detected.

3. Sensors: Two different sensors are used to check the presence of a package and the opening of the door. A magnetic sensor to detect when the door of the box is opened by someone and a weight sensor to detect if there is a package that is dropped in the box.

i. Magnetic Sensor: This sensor checks if the door is opened and send a signal to the Arduino. The Arduino doesn't send a notification to the owner of the box until the weight sensor has detected a package

ii. Weight Sensor: This sensor detects the presence of a package in the box by checking if there is a change of weight and send a signal to the Arduino. The Arduino will send a notification to the owner. Once the Arduino has a sent a notification, it will reset the weight sensor that way it can detect a second package if there is any.

4. WiFi Module: This component is responsible for the communication between the user cell phone and the box. Once the package is detected a notification will be sent to the user's cell phone via WiFi.

Figure 5. Lockbox Circuit Schematic

Page 8: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

7

Software Structure

The program will be written in Arduino’s Web IDE (Integrated Development Environment). It will use C++/C languages. The project will be using predefined libraries to interface the Arduino with the sensor and WiFi modules. Figure 6 is an overview flowchart of the program operation. The process begins once the Arduino is plugged into power. The Arduino will constantly read the magnetic sensor. When it the sensor reads “OFF” this will cause the Arduino to read the weight sensor. The weight sensor value will be called SENSOR_WEIGHT. The program will compare this value to variable WEIGHT which is initially set to 0. If SENSOR_WEIGHT > WEIGHT +/- ERROR, the Arduino will notify the user via email else the Arduino will go back to checking the magnetic sensor. After the user is notified, the program will default back checking the magnetic sensor. The ERROR variable will be set to compensate for any noise.

The program will also check if the door is left open. When the door opens, the program will count how long it has been open. When it is open for more than 45 seconds, it will notify the user the door may be jammed.

Figure 6. Software Flowchart

Page 9: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

8

Testing Plan

The tables below outline the steps and results that will be used to thoroughly test the electronics lockbox to ensure its complete functionality. Table 1 shows the "Testing Plan for Receiving Packages of Varying Sizes" that tests the lockbox can accept varying sizes of packages through the top and bottom doors of the lockbox. Table 2 shows "Testing Plan for Sending and Receiving the 'Received Package' Message" that tests whether the message will be sent and received. Table 3 shows the "Testing Plan for Door Opening Detection using Hall Effect Sensor" that tests all cases relating to the door being opened or closed. Table 4 shows the "Testing Plan for Maximum and Minimum Package Weights for Load Sensor" that tests the different cases regarding package weight. Table 5 shows the "Testing Plan for Detecting Multiple Packages Within Initial Detection" that tests the case when receiving multiple packages within the initial detection period. Table 6 shows the "Testing Plan for Detecting Multiple Packages Outside of Initial Detection" that tests the case when receiving multiple packages when outside the initial detection period.

Table 1: Testing Plan for Receiving Packages of Varying Sizes Steps Result

Use test package one, a box sized at 3"x3"x1", and insert it into the lockbox through the top door and retrieve it through the bottom door.

The package will fit through the top door, fall to the bottom of the lockbox, the package received message will be received and the package is retrieved from inside the box.

Use test package two, a box sized at 9"x6"x3", and insert it into the lockbox through the top door and retrieve it through the bottom door.

The package will fit through the top door, fall to the bottom of the lockbox, the package received message will be received and the package is retrieved from inside the box.

Use test package three, a box sized at 12"x9"x6", and insert it into the lockbox through the top door and retrieve it through the bottom door.

The package will fit through the top door, fall to the bottom of the lockbox, the package received message will be received and the package is retrieved from inside the box.

Table 2: Testing Plan for Sending and Receiving the "Received Package" MessageSteps Result

Use test package two and insert it into the lockbox.

The package will fall to the bottom of the lockbox and a message will be sent and received by the user.

Page 10: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

9

Table 3: Testing Plan for Door Opening Detection using Hall Effect SensorSteps Result

Open the top door but do not insert a package. There will be no message sent from the lockbox to the user.

Open top door and insert test package two. The package will fall to the bottom of the lockbox.

Open and close door for 20 seconds before closing the door.

Opening and closing the door will have no effect on the recorded information or the message received by the user

Retrieve test package two from inside the lockbox.

The lockbox should be empty.

Open top door and attempt to insert test package two, but hold door open for two minutes, then close the door.

The package will fall to the bottom of the lockbox and the "Door Obstructed" message will be sent, as well as the package received message afterwards.

Table 4: Testing Plan for Maximum and Minimum Package Weights for Load SensorSteps Result

Use test package four, a box weighted at #BELOWMIN, and insert it into the lockbox through the top door.

The package will fall to the bottom of the lockbox, but not register on the load sensor, as the package is below the lockbox's minimum weight

Use test package five, a box weighted at #MIN, and insert it into the lockbox through the top door.

The package will fall to the bottom of the lockbox, and register on the load sensor, and the lockbox will send a message that a package has been received.

Use test package six, a box weighted at #AVE, and insert it into the lockbox through the top door.

The package will fall to the bottom of the lockbox, and register on the load sensor, and the lockbox will send a message that a package has been received.

Use test package seven, a box weighted at #MAX, and insert it into the lockbox through the top door.

The package will fall to the bottom of the lockbox, and register on the load sensor, and the lockbox will send a message that a package has been received.

Use test package eight, a box weighted at #ABOVEMAX, and insert it into the lockbox through the top door.

The package will fall to the bottom of the lockbox, and register on the load sensor as its maximum load, and the lockbox will send a message that a package has been received but is at its maximum load.

Page 11: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

10

Table 5: Testing Plan for Detecting Multiple Packages Within Initial DetectionSteps Result

Use test package nine, a box weighted at #SMALL, and insert it into the lockbox.

The package will fall to the bottom of the lockbox and register on the load sensor.

Use test package nine, a box weighted at #SMALL, and insert it into the lockbox before the 45 seconds, the initial detection period, have passed from opening the door.

The second package will fall to the bottom of the lockbox and register on the load sensor, then the lockbox will send a message that a package has been received.

Table 6: Testing Plan for Detecting Multiple Packages Outside of Initial DetectionSteps Result

Use test package nine, a box weighted at #SMALL, and insert it into the lockbox.

The package will fall to the bottom of the lockbox and register on the load sensor, then the lockbox will send a message that a package has been received.

Use test package nine, a box weighted at #SMALL, and insert it into the lockbox after the 45 seconds, the initial detection period, have passed from opening the door.

The second package will fall to the bottom of the lockbox and register on the load sensor, then the lockbox will send a message that a second package has been received.

Page 12: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

11

Updated MilestonesThese milestones represent the tasks or designs that must be completed in order to ensure

that the Electronic Lockbox project remain on track to be finished by the end of the year. Each milestone has a title that explains what is to be done, a deadline that tells when the task or design must be finished by and whether the milestone is major or minor.

Milestone Title Deadline Minor or Major?

Assigning tasks to team members Weekly MinorFunctional Specification Document V0.9 19 Sept 2017 MajorLaunch of website 28 Sept 2017 MajorFunctional Specification Document v0.95 29 Sept 2017 MajorHave a list of all the needed components 29 Sept 2017 MinorCompleted Design of Exterior Lockbox 2 Oct 2017 MajorPurchase all the parts. 8 Oct 2017 MajorFunctional Specification Document v1.0 9 Oct 2017 MajorTesting of Sensors Completed 27 Oct 2017 MinorDesign Document v0.9 3 Nov 2017 MajorDesign Document v0.95 10 Nov 2017 MajorDesign Document v1.0 1 Dec 2017 MajorFinal Budget 11 Oct 2017 MajorMicrocontroller programming 26 Jan 2018 MajorTesting the sensors 27 Jan 2018 MinorTesting the WiFi module 29 Jan 2018 MinorBox construction 2 Feb 2018 MajorTesting and Debugging 6 March 2018 MajorFinal Report v0.9 9 March 2018 MajorFinal Report v0.95 30 March 2018 MajorFounder's Day 10 April 2018 MajorFinal Report v1.0 20 April 2018 Major

Page 13: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

12

Final BudgetTable 7. Final Budget

Material Description # of parts CostMicrocontroller 1 $60

Wireless Modules 1 $50Sensors 3 $40Lock 1 $40Physical Box 1 $80

AC Power Supply 1 $40Other components Varies $50

Shipping Varies $40 Total $400

Conclusion

Page 14: fourtressup.files.wordpress.com  · Web viewThe team plans to use open-source code as a guideline for programming the Arduino microcontroller and debugging to guarantee the program

13

Overall this design document has discussed the design details needed to successfully build the Electronic Lockbox project by Team Fourtress. The document provides the details on the design of the Arduino circuit, the software needed to run the Arduino circuit and the physical structure of the lockbox. The testing plan goes through all possible cases to ensure every aspect of the project is working successfully and the shows how the development plan, milestones and budget carried over from the Functional Specifications Document. No major problems have been encountered so far in the design of the Electronic Lockbox project. The Electronic Lockbox project is expected to finish on time and successfully complete all project goals.