/air_quality

displays and logs local indoor and outdoor weather and air quality information

Primary LanguageCMIT LicenseMIT

Air Quality monitor

Purpose

Air Quality (aka AQ) samples temperature, humidity, and if connected to the appropriate sensor, CO2 (carbon dioxide) levels. It can log this data to a number of network endpoints. It can also display the local outdoor weather to compliment local sensor readings.

Features

Screenshot

  • #1 = Indoor air quality information
    • If available, displays the US standard CO2 label and value
    • Displays the temperature and humidity
  • #2 = Outside air quality information
    • Uses OpenWeatherMap data, if available, to display
      • latest air quality information
      • current weather condition as icon
      • temperature and humidity levels
  • #3 = Data publishing information
    • displays the last time the screen information was updated.
    • [+I] the indoor temperature, humidity, and CO2 information was successfully published to the defined InfluxDB server
    • [+M] the indoor temperature, humidity, and CO2 information was successfully published to the defined MQTT broker
  • #4 = WiFi signal strength based on RSSI
  • #5 = Battery level

What is AQI Anyway?

It's worth noting that while most people have heard of an "Air Quality Index" from their local weather service or news, the calculation of AQI from sensor readings is less well known. Sensors measure and report particulate concentrations in various size ranges, the most widely used of which is "PM2.5", meaning airborne particulates of 2.5 microns in diameter or smaller, measured in micrograms per cubic meter.

  • The more particulates measured the worse the air quality and, eventually, the greater the danger to humans and animals. Howeveer, the perceived quality of the air and the risk from exposure vary in a non-obvious way based on the actual PM2.5 values observed.
  • That variability is what gave rise to the idea of an Air Quality Index in the first place, though as is often the case in associating health factors and risk with environmental data different governing bodies and standards organizations have put forward different ways of calculating risk from sensor data. You can read much more about this in the Wikipedia page for Air Quality. In the US, the Environmental Protection Agency (EPA) developed its own AQI measure, dividing the normal range of measured particulates and pollutants into six categories indicating increased levels of health concerns. An overall AQI value is calculated from a piecewise linear function, with scaling and transition points defined by the EPA. More details on that math are shared in the Wikipedia page cited above, as well as this post on the AirNow tech forum.
  • Most information is kept in the "supporting material" folder, which is not synched to GitHub. Maybe I should do that? ping me if you want more info on CO2 measurements, etc.

Target configuration

  • Important access settings like WiFi SSID and password, ThingSpeak keys, and InfluxDB credentials are contained in a secrets.h file that is not included in this repo. Instead you'll find the file secrets_template.h, which should be copied to secrets.h and then edited to supply the right access credentials and configuration values to match your deployment environment.
  • See config.h for parameter configuration

Bill of Materials (BOM)

Supported Internet Services for data logging

  • The routines that post data to back end services are generalized as much as practical, though do need to be customized to match the data fieles of interest both within the scope of the project and based on what users want to report and monitor. Configuration values in config.h help with basic customization, e.g. name of the device, tags to use for Influx data, though in some cases code may need to be modified in the associated post routine.

  • MQTT Broker

  • Influx

  • DWEET

Issues and Feature Requests

  • See GitHub Issues for project

.plan (big ticket items)

  • WiFI Manager support
  • OTA Firmware update
  • GPIO (button) ESP32 wakeup support to have multiple screens of information