Nest Model
Contents
Overview
Our project is to create a smart outlet consisting of a raspberry pi zero, a relay, and a container that works between an AC outlet and a device. We'd like to be able to communicate between a web interface and the outlet to be able to turn the device on and off. We would also like to add timing control features through the web interface. If we are successful with the initial project, we will add additional modules to the web interface to be able to control multiple devices.
Team Members
Amanda Hua
Tricia Brown
TA: Keith Kamons
Professor: James Feher
Links
[View Project Log]
[View Github]
[View Preliminary Presentation]
Objectives and Goals
Build a module that can relay between an AC outlet and device that we want to control
Build a web interface that successfully communicates with the built module in at least a binary fashion
Set up a server to host the web interface
Challenges
- A majority of our programming expertise is in Java, and learning more about web development languages, especially Python, will be time consuming.
- We have minimal background in hardware and circuitry, so a big challenge will be ensuring that we will account for all of the details necessary for our module.
- We have no background in web security, so we need to be very careful in allowing access to the devices and files that we will be using.
- We have never worked with Raspberry Pi before.
- Linux is an unfamiliar operating system.
Budget
- Raspberry Pi(s) - provided ($35)
- Raspberry Pi Zero(s) - provided ($5)
- Relay - provided ($1.25)
- AC Prongs - $2.79
- AC Duplex Outlet - $0.43
- Module box - $27.44
- MCP 3008 - $3.75
- TMP 36Gz - $1.50
- SD card - provided ($4.99)
- Component (fan) - $16.99
- Cable - $6
Total: -----needs to be updated ----
Useful Resources
RasPi Resources
Temp Sensor Resources
132 Assignment (More Context)
Spec Sheet
DevOps and Server Side Resources
Project Results
Gantt Chart
https://docs.google.com/spreadsheets/d/10Ftzdzjh8UOGXznYvhBb2OvnZ2Exib2vUMbfKiH339s/edit?usp=sharing
Media:GanttChart2-16.png
Design Solution
Design and Solutions
/*Description of each module of your project, and the solutions you designed to complete them. Include the information necessary to explain the final design Formulas with derivation Diagrams of physical objects Schematics of electrical systems Psuedo-code, wireframes, state transition diagrams or flow charts that explain code designed Formats for data to be stored (Table definitions or Entity Relationship Diagrams)*/
Website
Figure 1. Rough design of website home page
[[Media:]] Figure 2. Communication depicted between the AWS web interface and the user, the database with user data, and the pi module.
Figure 3. Configuration of the website pages and link paths
//TODO: Explain what the website does
Web Interface
The website uses websockets to communicate with the raspberry pi hardware. The html buttons on the website will run a script on the pi to turn on/off the smart outlet.
Sensors & Hardware
Sensors to Transmit Data: We decided to add sensors to collect data that can be displayed on the main web page. For our project, we were only able to add a temperature and light sensor, but many more features could be added in the future. We had to wire an AD converter into the Raspberry Pi because it does not have one built in. The AD converter reads a voltage from the device and outputs a meaningful value.
- insert fritz diagram of MCP3008 and sensors/pi*
Power Supply: Our device plugs directly into the wall, however a typical outlet supplies 120 volts. The Raspberry Pi can only handle 5 volts at a time so we had to include a relay to the module in order to separate the pi from the wall outlet voltage unless the device needs to be turned on. *need to add explanation about how the relay works*
- insert relay circuit diagram*