Intro: The purpose of this project was to build a set of enviornmental sensor to capture information about our enviornment on campus. We originally split into the sections. My personal responsibility was the soldering of the components which ended up being a bit of a challenge when the board that we used to solder all of the sensor did not work like a bread board, and I had to find a way to connect everything together without current running through all of the rows. I also had to remake the board because as the first group to try soldering, I made a lot of mistakes in perfecting the system for connecting all of the components. Although, I was happy to help other group learn how to soldering the parts together, I did not get the bennefit of learning from my mistakes before starting, so I ended up starting over. Over my weakend, I was able to fix all of the soldering problems on a new board and use my multimeter to test to make sure everything was connected before sending it back to my group. Below is a final summary of my entire groups project including my work and the work of my group (Rob, Sarah, and Alexander).
Question/Hypothesis: How does the UV radiation change based on where you are on campus?
Plans with Wiring Diagram:
Materials
Tools -
Workflow - how did it differ from the Adafruit Tutorial
Wiring was different from the tutorial because we had to cram the wires closer together to try and avoid creating the wrong solder bridges. Additionally, on his actual board the air quality sensor went first, but on the wiring diagram the temperature sensor went first, so on our final project, the temperature sensor went first. Our code differed from the Adafruit Tutorial in that it included the wifi name and password specific to our location along with the Adafruit IO username and key specific to our account.
Software Files
https://drive.google.com/open?id=133PdkfhCpW7FiKtsopRLBCojz8hsUBaM
// Adafruit IO Environmental Data Logger
// Tutorial Link: https://learn.adafruit.com/adafruit-io-air-quality-monitor
//
// Adafruit invests time and resources providing this open source code.
// Please support Adafruit and open source hardware by purchasing
// products from Adafruit!
//
// Written by Brent Rubell for Adafruit Industries
// Copyright (c) 2018 Adafruit Industries
// Licensed under the MIT license.
//
// All text above must be included in any redistribution.
/************************** Adafruit IO Configuration ***********************************/
// edit the config.h tab and enter your Adafruit IO credentials
// and any additional configuration needed for WiFi, cellular,
// or ethernet clients.
//CHANGE: serial.begin(9600) -> serial.begin(11500)
#include "config.h"
/**************************** Sensor Configuration ***************************************/
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include "Adafruit_VEML6070.h"
#include "Adafruit_SGP30.h"
// BME280 Sensor Definitions
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
#define SEALEVELPRESSURE_HPA (1013.25)
// Instanciate the sensors
Adafruit_BME280 bme;
Adafruit_VEML6070 uv = Adafruit_VEML6070();
Adafruit_SGP30 sgp;
/**************************** Example ***************************************/
// Delay between sensor reads, in seconds
#define READ_DELAY 10
// DHT22 Data
int temperatureReading;
int pressureReading;
// SGP30 Data
int tvocReading = 0;
int ecO2Reading = 0;
// BME280 Data
int altitudeReading = 0;
int humidityReading = 0;
// VEML6070 Data
int uvReading = 0;
// set up the feeds for the BME280
AdafruitIO_Feed *temperatureFeed = io.feed("temperature");
AdafruitIO_Feed *humidityFeed = io.feed("humidity");
AdafruitIO_Feed *pressureFeed = io.feed("pressure");
AdafruitIO_Feed *altitudeFeed = io.feed("altitude");
// set up feed for the VEML6070
AdafruitIO_Feed *uvFeed = io.feed("uv");
// set up feeds for the SGP30
AdafruitIO_Feed *tvocFeed = io.feed("tvoc");
AdafruitIO_Feed *ecO2Feed = io.feed("ecO2");
void setup() {
// start the serial connection
Serial.begin(9600);
// wait for serial monitor to open
while (!Serial);
Serial.println("Adafruit IO Environmental Logger");
// set up BME280
setupBME280();
// set up SGP30
setupSGP30();
// setup VEML6070
uv.begin(VEML6070_1_T);
// connect to io.adafruit.com
Serial.print("Connecting to Adafruit IO");
io.connect();
// wait for a connection
while (io.status() < AIO_CONNECTED)
{
Serial.print(".");
delay(500);
}
// we are connected
Serial.println();
Serial.println(io.statusText());
}
void loop() {
// io.run(); is required for all sketches.
// it should always be present at the top of your loop
// function. it keeps the client connected to
// io.adafruit.com, and processes any incoming data.
io.run();
Serial.println("Reading Sensors...");
// Read the temperature from the BME280
temperatureReading = bme.readTemperature();
// convert from celsius to degrees fahrenheit
temperatureReading = temperatureReading * 1.8 + 32;
Serial.print("Temperature = "); Serial.print(temperatureReading); Serial.println(" *F");
// Read the pressure from the BME280
pressureReading = bme.readPressure() / 100.0F;
Serial.print("Pressure = "); Serial.print(pressureReading); Serial.println(" hPa");
// Read the altitude from the BME280
altitudeReading = bme.readAltitude(SEALEVELPRESSURE_HPA);
Serial.print("Approx. Altitude = "); Serial.print(altitudeReading); Serial.println(" m");
// Read the humidity from the BME280
humidityReading = bme.readHumidity();
Serial.print("Humidity = "); Serial.print(humidityReading); Serial.println("%");
// VEML6070
uvReading = uv.readUV();
Serial.print("UV Light Level: "); Serial.println(uvReading);
if(! sgp.IAQmeasure()){
tvocReading = -1;
ecO2Reading = -1;
}
else
{
tvocReading = sgp.TVOC;
ecO2Reading = sgp.eCO2;
}
Serial.print("TVOC: "); Serial.print(tvocReading); Serial.print(" ppb\t");
Serial.print("eCO2: "); Serial.print(ecO2Reading); Serial.println(" ppm");
// send data to Adafruit IO feeds
temperatureFeed->save(temperatureReading);
humidityFeed->save(humidityReading);
altitudeFeed->save(altitudeReading);
pressureFeed->save(pressureReading);
uvFeed->save(uvReading);
ecO2Feed->save(ecO2Reading);
tvocFeed->save(tvocReading);
// delay the polled loop
delay(READ_DELAY * 1000);
}
// Set up the SGP30 sensor
void setupSGP30() {
if (!sgp.begin())
{
Serial.println("Sensor not found :(");
while (1);
}
Serial.print("Found SGP30 serial #");
Serial.print(sgp.serialnumber[0], HEX);
Serial.print(sgp.serialnumber[1], HEX);
Serial.println(sgp.serialnumber[2], HEX);
// If you previously calibrated the sensor in this environment,
// you can assign it to self-calibrate (replace the values with your baselines):
// sgp.setIAQBaseline(0x8E68, 0x8F41);
}
// Set up the BME280 sensor
void setupBME280() {
bool status;
status = bme.begin();
if (!status)
{
Serial.println("Could not find a valid BME280 sensor, check wiring! - HERE COMES SOFT WDT");
while (1);
Serial.println("THIS LINE WILL NEVER PRINT");
}
Serial.println("BME Sensor is set up!");
}
Config.h
/************************ Adafruit IO Config *******************************/
// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "IO USERNAME"
#define IO_KEY "IO KEY"
/******************************* WIFI **************************************/
// the AdafruitIO_WiFi client will work with the following boards:
// - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471
// - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821
// - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
#define WIFI_SSID "WIFI NAME"
#define WIFI_PASS "WIFI PASSWORD"
// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"y
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
/******************************* FONA **************************************/
// the AdafruitIO_FONA client will work with the following boards:
// - Feather 32u4 FONA -> https://www.adafruit.com/product/3027
// uncomment the following two lines for 32u4 FONA,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);
/**************************** ETHERNET ************************************/
// the AdafruitIO_Ethernet client will work with the following boards:
// - Ethernet FeatherWing -> https://www.adafruit.com/products/3201
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);
IO Dashboard
In order to see what the values were, we created a dashboard using the Adafruit IO system. I created feeds for each sensor (temp, humidity, UV, TVOC, ec02, altitude, and pressure), then organized them all on a dashboard. There were blocks displaying the numeric value and also a symbolic representation also. I also added some graphs to compare the values over time. In the feeds I made sure that we could see values from up to 30 days ago, not just from a certain day or short period of time.
Box Photos and Video:
Finished box with project inside!
Wiring Photos:
Finished Product:
Describe your experiment:
For our experiment, we are going to collect data from outside the laser cutter. We think that the fumes emitted from the laser cutting while cutting acrylic are harmful to the environment.
Storage results:
Stat Analysis
They next series of text I got from a website on the enviornmental inpact of acrylic and laser cutting the acrylic.
Chemical composition of acrylic
Acrylic consisting of methyl methacrylate (MMA), which is a colorless liquid having the chemical formula: C5O2H8
It is disclosed as an organic substance, because it contains carbon (C). The carbon is bonded to oxygen and hydrogen.
MMA is produced from oil and natural gas by a few large manufacturers all over the world. From there the MMA is distributed to manufacturers of acrylic sheets, rods and granules.
Through a chemical process the MMA is organized into long molecule chains and becomes PMMA (acrylic). The same substance, but now a clear solid material: (C5O2H8)n
Overall Human Health Effects of MMA
Acrylic placed outside is highly resistant to the elements. It will only slowly degrade and can remain outside for decades. In contrast, MMA is highly unstable when exposed to oxygen and UV radiation. After 7 hours, half has degraded [1]. MMA will eventually degrade to carbon dioxide and water.
Acrylic can be recycled, but since a considerable percentage is used in common household products it ends up in waste incineration or junkyards.
Acrylic is widely used in the food industry. Both cast and extruded acrylic is, by the EU, approved for direct contact with food. Furthermore, it is used by dentists and is part of surgical implants, including bone cement.
The authorization to use acrylic and MMA with both food and implants means that any adverse effects are studied carefully. The Danish health authorities has included MMA in the assessment of different health effects [1].
The assessment concludes that MMA with prolonged direct contact on the skin can cause allergies and discomfort in the respiratory tract when inhaled. However, that is at high concentrations. In low concentrations, it has no known harmful effects.
Issues - Challenges - How did you overcome them?
In the wiring process, there were too many solder bridges and so the right sensors were not getting power. Also, the boards were not connected like bread boards and that meant that we had to find a way to connect everything. We decided to use smaller wires that connect together. To solve this problem, re-soldering being more careful. Also, I started testing using the top pin to make sure everything was being connected. Some of our coding challenges included a couple of missing library errors, that were brilliantly solved by Rob. Also, the feather was stuck in bootloader mode, but thanks to some excellent trouble shooting by Rob, the problem was isolated to a problem in the feather. He then fixed the issue by retrieving a new feather. The error message said ESPCOM-UPLOAD-MEM-FAILED.
Conclusion:
Our team chose to test the TVOC and ec02 of the air outside the lab where the fumes from the laser cutter exit. Cutting materials like cardboard, acrylic, leather, and wood release harmful gases into the surrounding area directly onto the middle school field, so we wanted to see whether the air quality on the field was ideal. The ec02 values we received from the sensor ranged from 0 to 25. Additionally, the TVOC values ranged from 400 to 504, with most of them in the low 400’s. Comparing this data to the chart, these values are in the ‘Acceptable’ range, so there is a low to moderate chance of TVOC sources present. In reflecting on why the values were so low and variable, we realized the sensor might not have been recording data when the laser cutter was running and only took data over the course of a day. So if we were to have more time to continue this project, we would run the experiment while the laser cutter was cutting acrylic or leather (since they release the most noxious fumes), and test over multiple days in order to have consistent and reliable results.