ECE434 Project - Air Quality Monitor

Team members: Wojciech Zacherek Tiarnan Rice

Grading Template
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!

 09 Executive Summary 09 Packaging 09 Installation Instructions 09 User Instructions 09 Highlights 09 Theory of Operation 09 Work Breakdown 09 Future Work/Conclusions 09 Hackster.io 09 Demo/Poster 00 Not Late

Score: 90/100

Executive Summary
Our project is an air quality monitoring device that logs the data of several sensors to a database and and makes the data accessible and viewable using a Grafana webserver. The monitor can sense temperature, humidity, pressure, CO2, carbon monoxide, methane, volatile organic compounds (VOCs), and particulate levels. It also has a battery backup built in so that it can operate for several hours without a power supply, a buzzer so that it can act as an alarm if certain sensors are reporting dangerous levels, and a small OLED screen to show the current values of the sensors without having to log into the server. All of these components are assembled onto a custom designed PCB, along with some supporting circuitry. Currently we have all the sensors working with the data being logged and viewable through Grafana. The screen driver that was provided by Adafruit isn't supported by the Beaglebone, and writing a custom driver would have been too large of an undertaking for this project, so that doesn't work. The monitor also does not start everything up automatically after it boots because there is a minor issue with the systemd service that samples the sensors that requires it to be manually restarted once after it boots. Additionally, when the monitor is running on the battery the main 5V rail is not present, which powers several of the sensors, so those sensors do not work on battery power.

Packaging
We designed an enclosure to be 3D printed for the project using Autodesk Inventor, however we were unable to get it printed in time.



Installation Instructions
Give step by step instructions on how to install your project.


 * Include your github path as a link like this to the read-only git site: https://github.com/MarkAYoder/gitLearn.
 * Be sure your README.md is includes an up-to-date and clear description of your project so that someone who comes across you git repository can quickly learn what you did and how they can reproduce it.
 * Include a Makefile for your code if using C.
 * Include any additional packages installed via apt. Include install.sh and setup.sh files.
 * Include kernel mods.
 * If there is extra hardware needed, include links to where it can be obtained.

Here is the Git Repo with all the code https://github.com/ricet/AirQualityMonitor

The following table details relevant files and their descriptions for installing the necessary packages

To try out this project, you also need the following equipment and modules.

On top of that, we have provided PCB files for you to procure. These are not necessarily required, but would really streamline the demo and potential debugging. There is a JSON file that can be imported directly into EasyEDA and be ordered through JLCPCB, along with the Gerbers. The files can be found under the PCB Files directory on the git repo.



User Instructions
Once the monitor has powered up and has a network connection, all the user has to do is go to the monitors IP address in their browser and log into Grafana with their credentials (default is admin/admin). There they can see the home dashboard which is set up to have a separate plot for each sensor. The time range can be changed with the time drop down in the upper right if they want to see older data.

Highlights
Here is where you brag about what your project can do.

Include a YouTube demo the audio description.

Theory of Operation
The product should work with minimum setup from the user, which shouldn't go beyond inputting network credentials for internet access.

The BeagleBone Black has a systemd process that autostarts and auto restarts the process in case a crash (a crash could occur is not enough power is delivered to the sensors, rendering them disconnected from the i2c bus).

The project runs using a singular python script for reading, packaging, and saving data to an sqlite database. From there, the Grafana web server queries data from that same database. The queried data is organized into various plots running on a Dashboard on the Grafana web server. The user can access this web server and dashboard by accessing the ip address of the device.

Work Breakdown
The product can be characterized into two design sections - hardware and software. Tiarnan designed the PCB used to connect all the sensors, populated the board with all the modules and components, and wrote code templates for interfacing with the sensors. He also did a cursory search for a suitable data-display program (Grafana) and finalized the data-display interface to be user-friendly. Wojciech created scripts for reading data from the sensors, packaged the data to be inserted into an sqlite database, created and pushed data to the database, and setup the skeleton for interfacing with Grafana.

Future Work
This project had many bumps and turns, and some features were left for future endeavours. Likewise, the current product lacks some features the team thinks would improve the overall quality. We have listed these details below.

Conclusions
While the project certainly has plenty of rough edges and there's lots to improve on, we still achieved the core functionality of the original idea, which is to monitor the air quality and visualize the data nicely.