Giter Site home page Giter Site logo

bevo_iaq's People

Contributors

calvinjlin avatar curiousple avatar hagenfritz avatar kulkarnitejal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

josephmidura

bevo_iaq's Issues

UTx000 Field Study Description

Using the models we developed, we can summarize the data collected from the UTx000 study by applying the models. There is one consideration though:

  • Dual Models: What model do we use for CO2, PM2.5, and TVOCs since we will generate two? The most accurate? The averaged?

The measurements should be compared to related studies like those presented in the IAQ and SQ paper since they measured bedroom IEQ using commercial-grade sensors for the most part i.e. Liao et al., 2019.

Additional NO2 Sensors

Approximately 32 beacons still need to have NO2 sensors attached. The software is in place to read from these sensors.

Current Status

There should be about 30 sensors somewhere in ECJ. I saw the shipment was made a while back, but not sure where these sensors are being kept.

Next Steps

  • Email department to locate package
  • Get package (check with David about building access)
  • Order more navy M-F, pre-crimped wires with 1x8 housings from pololu
  • Wire and attach NO2 sensors to remaining beacons

BEVO Beacon 06

BEVO Beacon 06

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: Yes

Deployed: No

BEVO Beacon 22

BEVO Beacon 22

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟑 - -

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: Yes

Deployed: No

Fabrication Video

The fabrication video needs to be updated and completed based on some comments from the initial drop. Comments for improving include:

  • try to find a better logo for WCWH (ask Caren maybe?), and include it in the beginning rather than the end with a link, perhaps even a UT logo
  • In the beginning the labels you have show up very quickly, you have to leave at least 3-4 s, otherwise people won’t register, you can try to just pause the video frame (and leave the music)
  • between 1:30 and 2:20 there is nothing but putting the box together, you could speed things up a bit more
  • after 2:30 to 3:00, so really not much happens in the second half, and you could try to shorten considerably.
  • Add some credentials at the end with the name of the involved people and our website.

OLED Functionality

The OLED provides an output of the latest measured values on a 128x64 pixel screen.

Software

The software is simple enough to run, but documentation can be found here and here. In addition, working with the text is made easier using this package.

Hardware

The hardware is simple enough to hook up: V, GND, SCD, and SCL - the screen has inscriptions for each pin.

BEVO Beacon 04

BEVO Beacon 04

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original In-House
RTC 🟒 Original Factory
TVOC 🟠 - -

RPi: 3B+

PCB: Hat

Housing: 6/7 (no Partition)

BEVO Beacon 30

BEVO Beacon 30

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original In-House
Fan 🟒 Original/Cleaned Original
Light 🟒 Original In-House
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟠 - -

RPi: Zero W

PCB: Hat

Housing: 6/7

BEVO Beacon Log: 09

BEVO Beacon 09

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC πŸ”΄ - -

RPi: Zero W

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: No

Deployed: No

BEVO Beacon 12

BEVO Beacon 12

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original In-House
RTC 🟒 Original Factory
TVOC 🟑 - -

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: No

Deployed: No

Heat Management

There is still a bit of an overheating issue (0.5C) inside the beacon that might be compromising some of the measurements made by the internal sensors (CO2 and PM).

Current Status

There is one fan that attemps to provide cooling to the RPi.

Ideas

There is enough space to incorporate a second fan or a larger one. Perhaps a different housing design might also provide more adequate cooling. The current fans that are being used simply require connecting a 3.3V pin and the other to a ground pin.

Next Step

  • Consult with Zoltan/Kerry about adding another fan as a bandaid for the current designs
  • Consider altering the design so that the fan is directly incorporated into the side
  • Consider changing the exhaust design so more air can exfiltrate

BEVO Beacon 02

BEVO Beacon 02

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original In-House
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original -
Screen 🟒 Original In-House
RTC 🟒 Original Factory
TVOC 🟠 - -

RPi: Zero W

PCB: Hat

BEVO Beacon 46

BEVO Beacon 46

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: Needs update

Deployed: No

Installation of python packages thru pip vs apt-get

Python packages currently appeared to be installed through apt-get. Although it's currently hard to tell which may be better, pip (pypi) will probably have more updated packages and would allow us to specify dependencies with a requirements.txt file. This would also allow us to update the python packages for bevo-iaq separately from the raspberry's software.

BEVO Beacon Log: 13

BEVO Beacon 13

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
PM 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
Light 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC πŸ”΄ - -

RPi: 3B+

PCB: Hat

Housing: 6/7 (no partition)

Calibrated: No

Deployed: No

BEVO Beacon 29

BEVO Beacon 29

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟑 Original -

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: Yes

Deployed: No

Journal of Open Hardware - BEVO Beacon

This journal seems promising to submit an article about the Beacon. More research into the journal, what a typical article looks like, and how to appropriately craft an article about the beacon should be considered.

Redesigned Housing

Comments from the WCWH community essentially say the beacon could look a bit nicer. In addition, VOCs are emitted from the freshly cut boxes which is a problem if the devices are to be rapidly developed and deployed.

Current Status

The IAQ beacon is made from cut plywood using the laser cutters from the Inventionworks. Considering the Inventionworks is shut down and they were already frustrated with us hogging the machines, we might be able to prototype a few devices, but the participants might be stuck with the current design.

Next Steps

None as of now.

Use of -100 as nan value

From pd.read_csv, these values are automatically recognized as nan:

β€˜β€™, β€˜#N/A’, β€˜#N/A N/A’, β€˜#NA’, β€˜-1.#IND’, β€˜-1.#QNAN’, β€˜-NaN’, β€˜-nan’, β€˜1.#IND’, β€˜1.#QNAN’, β€˜β€™, β€˜N/A’, β€˜NA’, β€˜NULL’, β€˜NaN’, β€˜n/a’, β€˜nan’, β€˜null’

except:
print('Error reading from TSL2591')
lux = -100
visible = -100
infrared = -100

except:
print('Error reading from CO sensor')
co = -100
t1 = -100
rh1 = -100

Install Permissions

Some of the beacons don't take well to the new install process and continually have a conflict with installing some of the necessary files. Despite efforts on my and Calvin's end, the issues still persist.

Beacons with this issue:

  • 22

Run Service

As I add the display functionality, I realize that I will have to create another service file on the RPi that will run the display script at boot. Rather than have a service file for each component of the beacon, I can create one script run.py that I can set up a service for and then append with the necessary python scripts to run at boot.

BEVO Beacon 32

BEVO Beacon 32

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: No

Deployed: No

Need PCBs

In order to include the OLED screens (see #2) on the RPi, we need to allow for more connections to the i2C pins. These are currently unavailable so we need to obtain more PCBs so we can connect more things!

Sensirion Sensors on Python3

One issue that has plagued the development of the IAQ Beacon is that the Sensirion sensors (PM and CO2) - which are arguably the most important - run on python2 scripts. If that wasn't a big enough issue, the code is unnecessarily complex as it was modified from the only source that I found online using python to interface with the sensors.

Current Status

Python2 code is being run to read data from the Sensirion sensors that could be contributing to the bugs associated with reading from these sensors.

Next Steps

  • Using the datasheets, develop python3 scripts that can run these sensors
  • Test the scripts
  • Implement scripts in the current format
  • Implement the scripts in a modular format (see issue here)

BEVO Beacon 36

BEVO Beacon 36

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Old

Housing: 7/7

Calibrated: Yes

Deployed: No

Purpose of print statements?

Does the beacon have a display? Can you see this during ssh? Print statements do have a performance cost so it is better not to leave any unnecessary ones present.

print("---------------------------------------")
print("Average Values")
print("---------------------------------------")
print("TVOC (ug/m3): {0:.3f}".format(sgp_data_old['TVOC']))
print("Light (lux): {0:.3f}".format(tsl_data_old['Lux']))
print("NO2 (ppb): {0:.3f}".format(no2_data_old['NO2']))
print("CO (ppb): {0:.3f}".format(co_data_old['CO']))
print("---------------------------------------")

print("---------------------------------------")
print("Average PM Concentration (ug/m3)")
print("---------------------------------------")
print("PM1: {0:.3f}".format(sps_data_old['pm_c_1']))
print("PM2.5: {0:.3f}".format(sps_data_old['pm_c_2p5']))
print("PM4: {0:.3f}".format(sps_data_old['pm_c_4']))
print("PM10: {0:.3f}".format(sps_data_old['pm_c_10']))
print("---------------------------------------")
print("Average PM Count (#/L)")
print("---------------------------------------")
print("PM0.5 count: {0:.3f}".format(sps_data_old['pm_n_0p5']))
print("PM1 count: {0:.3f}".format(sps_data_old['pm_n_1']))
print("PM2.5 count: {0:.3f}".format(sps_data_old['pm_n_2p5']))
print("PM4 count: {0:.3f}".format(sps_data_old['pm_n_4']))
print("PM10 count: {0:.3f}".format(sps_data_old['pm_n_10']))
print("---------------------------------------")
print("---------------------------------------")
print("Average Environmental Variables")
print("---------------------------------------")
print("CO2 (ppm): {0:.1f}".format(scd_data_old['CO2']))
print("T (C): {0:.1f}".format(scd_data_old['TC']))
print("RH (%): {0:.1f}".format(scd_data_old['RH']))
print("---------------------------------------")

BEVO Beacon 38

BEVO Beacon 16

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Old

Housing: 7/7

BEVO Beacon 08

BEVO Beacon 08

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟠 - -

RPi: 3B+

PCB: Hat

Housing: 6/7 (no Partition)

Pull-Up Resistors

As far as I can tell, when the i2cdetect -y 1 command returns a slow scan with no detectable addresses, the issue is on the side of hardware - particularly with the pull-up resistors. See comment here.

This issue persists for Beacons:

  • 08
  • 17
  • 18

Eliminate or minimize usage of global variables

Using global variables is a bad practice that should be avoided: https://www.reddit.com/r/Python/comments/25jzga/what_exactly_makes_global_variables_so_bad/

global eCO2, TVOC

global lux, visible, infrared

global no2, t0, rh0

global co, t1, rh1

global sgp_data_old, tsl_data_old, no2_data_old, co_data_old

print('Running IAQ Beacon\n')

BEVO Beacon 36

BEVO Beacon 36

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Old

Housing: 7/7

BEVO Beacon 10

BEVO Beacon 10

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 πŸ”΄ - -
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: Zero

PCB: Hat

Housing: 6/7 (no Partition)

Calibrated: Yes

Deployed: No

Sensor Correction Models

The following models should be generated from the UTest House and Laboratory calibration efforts:

Linear Models: CO2, PM2.5, NO2 (house only), T (lab only), RH (lab only)
Constant: TVOC, CO (lab only)

BEVO Beacon Log: 04

BEVO Beacon 04

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
Light 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Hat

Housing: 1/7

Calibrated: No

Deployed: No

WCWH Rollout Pre-Calibration

Prior to deployment, the 20 beacon with working software and hardware need to be calibrated. This issue will serve as a place to write-down updates on these efforts.

Hardware

The beacon hardware has been properly installed but we first need to check that no new bugs have cropped up since the installation.

Software

Many of the beacons are still running on older software from utx000 so this needs to be updated prior to calibration.

Final Inspection

After the hardware and software checkout, we should let the devices run for at least 24 hours to make sure that they are measuring regularly and have no further issues.

Metrics

Based on this article some important metrics to consider are:

  • correlation coefficients: We want a correlation coefficient close to 1
  • slope and intercept: To minimize over/underfitting we want m = 1 and b = 0
  • error estimates: mean bias error (MBE) represents the tendency for the sensor to over/under estimate the reference concentration, mean absolute error (MAE) corrects for positive/negative values that would cancel themselves out in the MBE, and root mean square error (RMSE) represents how narrow the error distribution is by penalizing large measurement errors.

Visualizations

Again borrowing from this article, we should visualize the beacons' performances by comparing:

  1. Time series of measurements (before and after correcting)
  2. Scatter of measurements (before and after correcting - might need to be two plots)
  3. Histogram of measured to reference concentrations

Testing

  • 01
  • 04
  • 05
  • 07
  • 10
  • 12
  • 15
  • 16
  • 17
  • 21

Needs Repair

  • 02 - SPS30
  • 18 - Light, SPS30, and SCD30

BEVO Beacon Log: 14

BEVO Beacon 14

Sensors/Connections

Module Included Condition Connections

| CO2 | 🟒 |Original | Factory |
| Fan | 🟒 |Original/Cleaned | Original |
| Light | 🟒 |Original | Factory |
| NO2 | 🟒 |Original | Factory |
| PM | 🟒 |Original | Factory |
| Screen | 🟒 |Original | Factory |
| RTC | 🟒 |Original | Factory |
| TVOC | πŸ”΄ | - | - |

RPi: 3B+

PCB: Hat

Housing: 6/7 (Missing Partition)

Calibrated: No

Deployed: No

OLED Screens for Display

An addition to the hardware of the IAQ beacon would be to include a small display that rotates through the various measurments made by the beacon.

Current Status

There are OLED screens in the lab that have been purchased (more will most likely be needed to update all the current beacons) and code exists on the BEVO Beacon v2s that could be repurposed.

Next Steps

  • Collect OLEDs
  • Identify where/how these can be added to the IAQ Beacons with minimal efforts since the Inventionworks Studio is inaccessible
  • Integrate the hardware onto the RPi
  • Create the software to show rotating measurements

BEVO Beacon 16

BEVO Beacon 16

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Old

Housing: 7/7

Calibrated: No

Deployed: No

Internal Temperature Issues

While much has been done to improve the internal temperature issues that throw off sensor readings, more can be done to alleviate this issue.

MORE Fans

Adding more fans can potentially cool the RPi

Heat Sinks

Adding heat sinks might show some improvement.

One output file

Now that we have everything running on the latest version of python, there is no need to separate our output values into two separate files other than for older scripts that rely on a certain format. However, these files can easily be updated for the latest software.

The main script seems to combine all measurements into one data frame so we could just append this data frame to the latest csv file rather than calling management, but whatever makes the most sense is best.

BEVO Beacon Log: 15

BEVO Beacon 15

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original Factory
Fan 🟒 Original/Cleaned Original
Light 🟒 Original Factory
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original Factory
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Original

Calibrated: Yes

Deployed: No

Calibration

The following calibration efforts need to be carried out before any more headway can be made on the BEVO Beacon paper:

  1. Calibration in UTest House: After proper baselining of the CO and NO2, another calibration event needs to be conducted. This well provide data that we can use to generate models for the CO2, PM2.5, TVOC, and NO2 sensors
  2. Calibration in Chamber: The test chamber will help to generate models for the T and RH sensors in addition to having a more appropriate baseline for the CO sensors. We will also generate models for CO2, PM2.5, and TVOCs so we can compare to those generated from the UTest House effort.

Static time delay vulnerable to potential time drift

The fixed delay doesn't take into account that loop execution time can be variable.

delay = 50 #seconds
print('Waiting', delay, 'seconds before rescanning...')
#assert False
time.sleep(delay)

delay = 50 #seconds
print('Waiting', delay, 'seconds before rescanning...')
#assert False
time.sleep(delay)

This stack overflow answer proposes an alternative:

import time
starttime = time.time()
while True:
    print "tick"
    time.sleep(60.0 - ((time.time() - starttime) % 60.0))

BEVO Beacon 1

BEVO Beacon 1

Sensors/Connections

Module Included Condition Connections
CO 🟒 Original Factory
CO2 🟒 Original In-House
Fan 🟒 Original/Cleaned Original
Light 🟒 Original In-House
NO2 🟒 Original Factory
PM 🟒 Original Factory
Screen 🟒 Original In-House
RTC 🟒 Original Factory
TVOC 🟒 Original Factory

RPi: 3B+

PCB: Old

Housing: 7/7

Calibrated: Yes

Deployed: No

Modular Sensor Scripts

Currently, multiple sensors are handled by two scripts that are running on python2 and python3. While the benefit is that readings from sensors can be combined into one output per script, the problem is that readings are made at irregular intervals because of communication lags between sensor and RPi that differ per sensor.

Current Status

Two scripts can be split into multiple scripts per sensor (6) that would be called at start-up and all be running in parallel.

Next Steps

  • Create modular scripts per sensor
  • Test scripts
  • Incorporate the scripts to run at RPi boot

Notes

Major updates would be needed to process that raw data since the output would change significantly (each sensor would output to its own file)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.