Make the BackpAQ Personal Air Quality Monitor

Introduction: Make the BackpAQ Personal Air Quality Monitor

About: Board Chair for sustainability non-profit Sustainable Silicon Valley. CEO of BackpAQ Labs LLC

The BackpAQ Project

The BackpAQ project is part of a middle and high school STEM curriculum that promotes learning about and experience with the monitoring of air quality (AQ) particularly in disadvantaged communities, and drives engagement among underrepresented youth in STEM activities.

Key to the program is deployment of a suite of community-based mobile air quality monitors that leverage new low-cost sensors. These handheld units can be readily assembled by advanced middle-school and high school students and other STEM-oriented youth who are motivated by interest in obtaining, understanding and sharing hyper-local air quality data.

What we'll build

For this project we are going to build a BackpAQ personal air quality (AQ) monitor. As you can see from the accompanying photos, BackpAQ is designed to be easily carried, clipped to a backpack, or placed in a mobile scenario such as a vehicle or other transport. As BackpAQ utilizes GPS positioning technology, the AQ information we collect will be geo-positioned no matter where the monitor goes.

These student-built monitors, encased in a lightweight polycarbonate box, weigh less than a pound and are powered by rechargeable LiPo batteries. They feature carabineers and nylon straps for easy fastening to a backpack or bicycle frame.

What we’ll measure

As designed, the monitors will measure and display criteria pollutants PM1, PM2.5, and PM10 concentrations in ug/m3, as well as display the US EPA Air Quality Index (AQI). Gases such as TVOC and CO2 are also easily monitored with BackpAQ and can be optionally built in. Monitoring of additional pollutants, such as CO, O3, NO2 and SO2 are possible future enhancements. The latest version pairs with a smartphone app to provide an interactive user experience and allow customization and personalization of monitored data and how it’s displayed. BackpAQ automatically uploads data to the Thingspeak cloud where it can be visualized using powerful analytics, and shared with other students or local community officials.

What we'll learn

To begin with, we'll learn design, build and fabrication techniques - along with some pretty powerful electronics, Internet-of-Things (IOT), and sensor technology skills. Perhaps most importantly, we'll learn how to curate and analyze data we capture from the monitors. Learning how to develop and apply critical judgement to the data and subsequent reporting and sharing of findings and implications are key outcomes of this project.


The intended outcome of this project is twofold: one, obtain a richer, deeper understanding of air pollution, where it comes from, how to measure it, how to harness powerful analytics to responsibly report and share findings, and (hopefully) gain some insight that will enable ordinary concerned people to do something about it. And two, build a monitoring device - BackpAQ - to better understand the science and engineering behind sensors, IOT, the Maker Movement, and have hands-on involvement with one of the more critical challenges facing communities today.

Step 1: How This Instructable Is Organized

The BackpAQ Instructable is organized as follows:

  • Introduction
  • Air Pollution and What We're Measuring
  • Design Point
  • Overview of the Project
  • Materials
  • The Build
  • Software and Cloud
  • Futures

Although we've laid out a sequential learn + build process, feel free to skip around or just jump to a specific Step. For example, you may wish to set up the software first before diving into the BackpAQ device. Your choice...have fun!

NOTE: Much progress has been made over the past 6 months in reducing the complexity of the build, both in terms of hardware and software. Stay tuned (or email me) for details on the new version coming soon!

Step 2: What We're Measuring


Before we get started building, let's take a look at the science behind air quality, sensors and monitoring.

So what are "Particulates" (PM), and how do they get into the air?

Size comparisons for PM particles
PM stands for particulate matter (also called particle pollution): the term for a mixture of solid particles and liquid droplets found in the air. Some particles, such as dust, dirt, soot, or smoke, are large or dark enough to be seen with the naked eye.

Others are so small they can only be detected using an electron microscope. Particle pollution includes: PM10 : inhalable particles, with diameters that are generally 10 micrometers and smaller; and PM2.5 : fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller. How small is 2.5 micrometers? Think about a single hair from your head. The average human hair is about 70 micrometers in diameter – making it 30 times larger than the largest fine particle.

Sources of PM

These particles come in many sizes and shapes and can be made up of hundreds of different chemicals. Some are emitted directly from a source, such as construction sites, unpaved roads, fields, smokestacks or fires. Most particles form in the atmosphere as a result of complex reactions of chemicals such as sulfur dioxide and nitrogen oxides, which are pollutants emitted from power plants, industries and automobiles.

What are the Harmful Effects of PM?

Particulate matter contains microscopic solids or liquid droplets that are so small that they can be inhaled and cause serious health problems. Some particles less than 10 micrometers in diameter can get deep into your lungs and some may even get into your bloodstream. Of these, particles less than 2.5 micrometers in diameter, also known as fine particles or PM2.5, pose the greatest risk to health. Fine particles are also the main cause of reduced visibility (haze) in parts of the United States, including many of our treasured national parks and wilderness areas. Learn more about health and environmental effects.

The PM Sensor for BackpAQ

The particulate sensor we have chosen for this project is the Plantower PMS5003. It is able to measure the concentration of fine particles of less than 1μm (PM1); less than 2.5μm (PM2.5) and less than 10μm (PM10). The operating principle of the PSM5003 sensor is as follows: a laser illuminates airborne particles. An optical sensor captures the laser light and generates an electrical signal proportional to the rate and size of the particles in the air. This block diagram shows what's going on inside the sensor. Note that there is a microprocessor that does some computation and digitization of the signal so that we can read the data in our own hardware.

What are ATM and CF1?

The CF_ATM and CF_1 values are calculated from the particle count data with a proprietary algorithm developed by the PMS5003 laser counter manufacturer, PlanTower. The specifics of the calculation are not available to the public (or us for that matter). However, to convert the particle count data (um/dl) to a mass concentration (ug/m3) they must use an average particle density. They do provide 2 different mass concentration conversion options; CF_1 uses the "average particle density" for indoor particulate matter and CF_ATM uses the "average particle density" for outdoor particulate matter. Depending on the density of the particles you are measuring the sensor could appear to read "high" or "low". Some groups have developed conversion factors to convert the data from the sensor to match the unique average particle density within their airshed.

What are TVOCs?

VOCs, or volatile organic compounds, are a group of thousands of organic chemicals that evaporate at low temperatures. So, TVOC is just “total volatile organic compounds”, right? It’s “all the VOCs added up together.”

Unfortunately, the answer isn’t quite that simple.

Most pollutants are extremely easy to define - ozone is three oxygen atoms. SO2 is a molecule composed of one sulfur atom and two oxygen atoms. Even particulate matter, with all its different flavors can be defined in one simple phrase (particulate matter with an aerodynamic diameter less than 2.5µm). But what exactly is TVOC?

Wikipedia dedicates an entire subsection JUST to the definition of TVOC. The simple answer is that there is no consensus around how TVOC should be defined. There are literally thousands of VOCs, and countless national bodies, governments and organizations have created their own lists of VOCs to be included in their TVOC definition.

Luckily, several standards have emerged based upon research on the VOCs typically found in indoor environments. For example, ISO 16000-29 defines a “VOC mixed gas” comprised of 40 individual compounds. This is a standardized gas mixture used to simulate typical indoor air. Mølhave et al. defines a “Typical IAQ Mix” of 22 VOCs at concentrations similar to those determined on average in residential indoor environments.

How is TVOC measured?

There are a number of ways to measure VOCs, with pros and cons based on the situation, budget available, etc. Historically, laboratory techniques such as flame ionization detectors or gas chromatography–mass spectrometry were used, providing an accurate way to identify specific gases within a sample.

While lab-based measurements may be highly accurate, they are unable to provide a continuous measurement of TVOC, which is incredibly important and, some may even argue, more important than having a perfectly accurate value for a specific gas.

For the continuous monitoring of TVOC, MOS sensors are generally used. This is a broad category, and sensors across this category provide varying degrees of quality in their readings - not all MOS sensors are built equal. Similar technology is used throughout, however, which is what we will explore below:

MOS (metal oxide semi-conductors) work by heating a thin film, or surface, of metal-oxide particles. For BackpAQ, our sensor employs a thin film of metal-oxide nanoparticles. This film is heated to around 300’C (hence the warm up period after turning on a BackpAQ device).

During operation, oxygen particles will be adsorbed on the surface, and these in turn will react with the target gas. This reaction causes a release of electrons from the oxygen present on the surface, which in turn leads to a change in electrical resistance of the metal-oxide layer.

Chemical reactions within the MOS sensor creates a change in electrical resistance. What the sensor is actually measuring is the electrical resistance of this metal-oxide layer. This real time measurement and output of resistance is the first step in obtaining our TVOC reading.

Finally, it's important to remember that the sensor we use will be sensitive to a wide variety of VOCs, rather than to one specific individual VOC.

An Important Caveat

The data the Plantower (and other optical counters) produce is an estimation of particulate mass concentration that relies on several assumptions for shape, diameter and density. The quality of your data will depend on those assumptions as well as environmental considerations such as humidity, light and temperature.
Because of the fact that optical counters rely on these assumptions, the data produced by them are not FRM or FEM certified.

Step 3: Why Mobile Monitoring?

At this point you might be asking yourself (or your teacher) why are we going to the trouble of building a low power, battery-powered mobile monitor when perfectly good fixed monitors can be had for about the same outlay? Well, here's a bit about why:

Mobile monitoring can thought of as a preliminary step of any air pollution field study design because it enables preliminary exploration of fine-scale spatial variability within a neighborhood, providing confidence in placement of stationary air monitors. Several characteristics of mobile monitoring facilitate its utility as a tool for understanding complex conditions, and, if carefully designed, for disentangling some aspects of temporal and spatial variation.

First, mobile monitoring is cost-effective; the route can be customized to focus on particular areas of concern, such as high traffic roads or neighborhood fixed sources.

Second, concentrations are typically measured at short intervals using continuous instruments which, with good quality-control efforts, can provide information about short-term peak exposures associated with adverse acute health effects. Therefore, through carefully repeating time- and location-specific measures, this technique can provide some stability in determining PM concentrations.

Third, mobile monitoring can also be used to validate conceptual dispersion models by capturing data at multiple points downwind of the source, under varying wind speed and direction conditions.

Finally, leveraging the repeated measures and integrating meteorology and land use characteristics, mobile monitoring data can be used to more richly characterize spatial variability throughout the region, by more knowledgeably tailoring the spatial and temporal characteristics of a fixed-site monitoring network.

So that's why.

Step 4: Design Characteristics

BackpAQ Design Point

  • Personal, portable air quality monitoring
  • Inexpensive to build, operate
  • Access and control through comprehensive smartphone app

  • Easily manage data, save & share measurements on the cloud
  • User-managed data privacy controls
  • Access to powerful Cloud-based data management and analytics
  • Battery powered, rechargeable, solar power option
  • Over-the-air software update capability

BackpAQ Characteristics

  • Size: 5" x 2" x 4"
  • Weight: 10 OZ
  • Case Material: Polycarbonate
  • Measured particles: PM1, PM2.5 and PM10
  • Optional: TVOC, eCO2
  • Battery Life: around 12-15 hours
  • Lithium-ion battery: 3v7 - 2500 mAh 2.1mm connector for charging
  • SD Card Storage (optional)
  • Sampling period: adjustable 5 - 60 minutes
  • Multicolored OLED interface for local data display and control
  • Smartphone Interface (Android, iOS) via Wifi and Blynk
  • Regular OTA software updates

Step 5: Technical Overview of BackpAQ

The BackpAQ project is constructed from a rich combination of hardware, software and cloud. In building BackpAQ, the student will utilize a full stack, with Arduino-based IDE (C++), a handful of powerful APIs and data abstractions, two advanced environmental sensors, and a powerful cloud capability.

Here's a quick rundown of the basic components.

  • Processor: WeMos D1, an ESP8266 microcontroller (MCU)
  • PM Sensor: Plantower PMS-5003 or PMS7003
  • TVOC/CO2 Sensor: Sensirion SGP-30
  • Temperature/Humidity Sensor: BME280
  • Development Platform: Arduino IDE with simplified C++ programming
  • Cloud: Thingspeak (Matlab) via well-documented APIs
  • IOS or Android Smartphone App: Blynk, which runs via a powerful library on the Arduino IDE

The heart of BackpAQ is the ESP8266 (type ESP-12F). The WiFi-based ESP communicates with the PMS5003 or PMS7003 sensor via a serial interface or UART. A small microcontroller inside the sensor transmits the particle concentration values and the number of particles. For TVOC and eCO2, same thing happens for the SGP-30 sensor. The BackpAQ firmware continuously reads the data stream, and sends the calculated values to the local OLED display, and to both the connected smartphone and the ThingSpeak cloud. BackpAQ also calculates AQI, the Air Quality Index. AQI is an index for reporting daily air quality. It tells you how clean or polluted your air is, and what associated health effects might be a concern for you.

The ESP8266 also continously measures the battery voltage. If it is below its limit voltage (3v2 = 0%), the device goes into standby. The battery is 100% when the voltage is 4v2 and is visually indicated on the companion smartphone app.

The companion smartphone app is really the control center of BackpAQ. Through the app, you can monitor all functions and display virtually any data collected or computed by the device. There are also mapping and reporting capabilities that will help you get the most of your portable AQ monitoring device.

To get the most out of BackpAQ you'll need a companion smartphone. Currently BackpAQ (and underlying Blynk app) require IOS 9.0 or higher or Android 4.2 or higher.

Step 6: Design and Component Choices

Before we delve into the construction of our BackpAQ, let's review what key decisions and choices we must make in order to fulfill the design characteristics we just talked about.

  • Choice of PM Sensor

In the past few years a new generation of low-cost sensors has become available. Several of these have been the subject of some prominent evaluations, most recently from AQMD. As noted there and elsewhere, these sensors are generally more suitable for deployment in large numbers in terms of their cost but their precision and accuracy may not be sufficient for regulatory use. Based on our own evaluation, though, one of these would suffice for the usage scenarios we envision for BackpAQ.

In this recent study four PM sensors were compared: Plantower PMS5003, Plantower PMS7003, Honeywell HPMA115S040 and Alphasense OPC-N241. The table above lists their main characteristics. These sensors were incorporated into an evaluation breadboard for testing; and they are sufficiently small to be deployed in an enclosure small enough for mobile or wearable applications. They all report PM2.5 and PM10 concentrations in μg/m3. The Plantower PMS5003, the Plantower PMS7003 and the Alphasense OPC-N2 also report PM1 and particle count for different bin sizes - the Plantowers report size distribution for 0.3, 0.5, 1.0, 2.5, 5.0, 10 μm bins and the Alphasense OPC-N2 reports 16 bins ranging from 0.38 μm and17 μm. The Plantower sensors claim a counting efficiency of 98% for particles of diameter 0.5 μm and 50% for diameter 0.3 μm38. All use a sampling interval <10 s. According to the manufacturers, their accuracy is between ±10–15 μg/m3.

In reviewing these studies and others, we observed that the PMS5003/7003 received strong ratings in terms of accuracy, precision, and data recovery while also being price-appropriate for this type of instrument (see PurpleAir Evaluation Summary for details.) The Alphasense, at $450, was not appropriate for this project. The Honeywell, though low-cost, did not do particle counts. So that pretty much left the two Plantowers.

At BackpAQ Labs we also looked briefly at the Shinyei PPD42NS, Samyoung DSM501A and Sharp GP2Y1010AU0F sensors. Although these were much lower cost, their lack of digital output (in most modes) was a disqualifying factor for our design (electronics must sample the analog output and convert o digital form for the MCU.)

Ultimately we chose the PMS-5/7003 for performance, form factor, low cost and support among developers.

  • Choice of Microcontroller

This is obviously at the core of BackpAQ and is perhaps the most important design choice. We looked at several options here, including Arduino-compatible MCUs such as Adafruit Feather, NodeMCU, and WeMos D1. The ESP8266 base was chosen for the evaluation based mainly on tight WiFi integration and low-power consumption. Performance was virtually identical with all of these units and choice ultimately came down to footprint and ease of build and interconnection (Grove) with sensors and other components. Ultimately, we chose a development board based around the WeMos D1, an MCU we have used in many previous projects and know to be dependable and quite inexpensive (as low as $.88 from several China suppliers). As the design evolves we will revisit this choice and re-evaluate best fit.

  • Choice of Temperature/Humidity Sensor

Several popular and low-cost sensors are available for accurate measurement of temperature and humidity (as well as several other quantities that may be useful, such as atmospheric pressure and altitude, wind speed and direction, ambient sound levels, even light intensity and color temperature.) We evaluated two such sensors, the popular DHT11/22 and the BMP/BME280. In our testing both performed well enough to use in our project, but the DHT proved to be somewhat flakey in terms of timing (with our choice of ESP8266); we were constantly losing measurements and getting a lot of NAN returned by the DHT library. As a result we were skipping roughly 15-20% of the reading cycles. Examining the library, it looks as if the timing optimization doesn't work properly with the DHT22 and ESP8266 we've chosen.

The new BME280 sensor, an environmental sensor with temperature, barometric pressure, and humidity. The BME280 is the next-generation of sensors from Bosch and is the upgrade to the BMP280. This precision sensor from Bosch is the best low-cost sensing solution for measuring humidity with ±3% accuracy, barometric pressure with ±1 hPa absolute accuracy, and temperature with ±1.0°C accuracy. It can be used in both I2C and SPI.

So in the end we chose the (bit more expensive) BMP/BME 280 sensor which seems to work well with the ESP and seems to get long ok with our other sensors (although there seems to be yet another timing issue on the I2C bus, some kind of flakey interaction with the OLED display which is also on the I2C bus.)

  • Communications Mode

To fulfill the design requirement to be 100% mobile and be able to interact with a smartphone and the Internet, we evaluated several comms scenarios. At the beginning of the project, we looked at (1) Cellular; (2) Bluetooth; and (3) WiFi. As was expected, and based on our previous experience with sensor projects, each mode of communications brings advantages and tradeoffs. So we build prototypes to evaluate all three. Cellular, which was arguably the most portable and scalable, cost the most and was the most power hungry. Bluetooth, in particular Bluetooth Low Energy (BLE), was the most flexible and least power intensive. WiFi, with it's wide availability, ease of use, and relatively low power needs, seemed to be the way to go. In the end we chose WiFi, based on it's low power draw, excellent integration with our choice of microcontroller (ESP8266), and near ubiquity across the range of usage scenarios we envision. We may revisit the use of BLE in a future iteration.

  • Smartphone as Communications Hub

As we've just discussed, WiFi seems the best technology choice for communicating the measurements from the sensors to be stored and obtaining the GPS position of the BackpAQ device. Since the ESP8266 contains networking capabilities in the form of WiFi, it could theoretically perform all tasks of the system but with the prerequisite that an active network connection is available at all times. This would require a local area network or the addition of a GSM modem connecting to a mobile network connection. For location services, another module would be needed to provide GPS support. So..... we need to thoughtfully consider how to inexpensively provide these capabilities.

Let's look closer at what is missing. What we need is an active network connection and navigational services for determining our current location. The solution may be right in our pocket! A piece of technology already including both of these features is a regular smartphone which could be used as a gateway between the BackpAQ and network, receiving sensor data and forwarding it. Using a smartphone, much computational work can be moved from the BackpAQ to the phone, also providing the network connection and location services. This means that the ESP8266-powered BackpAQ could be solely responsible for reading sensor data, receiving and acting upon commands and broadcasting data to the phone. The connection between BackpAQ and smartphone can be achieved using WiFi or Bluetooth since both protocols are supported by both devices. Using the network provider of the SIM-card, a connection to online services can be established. In addition to containing the basic features of network capabilities and WiFi/Bluetooth, the phone will also provide GPS in order to give us precise geo-location of the sensors. We'll need this later when we're doing our data analysis, matching AQ to locations.

  • Battery Monitoring

With any battery-powered device it's critical to be able to monitor power usage, or at least battery voltage. The Wemos D1 MCU we're using already has an internal voltage divider that connects the A0 pin to the ADC of the ESP8266 chip. The voltage divider is made up of 220k (R1) and 100k (R2). So, we have to add an external resistance with the inbuilt 220k resistor to read the battery voltage. By using a 100k resistor we can measure the max voltage of the battery, but adding some margin, we've selected a 220k resistor instead. We will add it to a two-pin JMT socket and plug in to the ESP Dev board (we'll show you how later in the Build.)

To select the voltage divider resistance values, you can use this online calculator.

You can also read this article on battery voltage monitoring.

  • Early prototypes and MVP candidate

In the photos above you can see some of the early design and functional prototypes we did. These were extremely valuable in evaluating basic functionality (are we meeting our design criteria), user experience (can the intended user actually use this thing?), and understanding the limits of our design -- what it can and can't do.

After 5 or 6 iterations with electronics, software, packaging, and overall user experience, we settled on our current design and generated our minimally viable product or MVP.

  • Things we left out...for now

One obvious thing we have left out, for now, is the ability to measure other pollutants, such as NOx, SOx, O3, CO, and other criteria gases. One reason is cost. To purchase reasonably accurate and calibratable sensors is cost-prohibitive for this low-cost project. Sure, there are dozens of "TVOC" and other such gaseous monitors available, but most carry huge disclaimers stating "not for quantitative measurement" or "use only in indoor environments". Others tell you that the sensors themselves will only last for a short time before needing replacement of their electrochemical elements.

  • And, Above All...

"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible. There are no prima donnas in engineering" - Freeman Dyson

Step 7: Use Cases

There are several use cases envisaged for BackpAQ:

  1. Mobile with Smartphone, Data Transmission via WiFi
  2. Mobile with Smartphone, Data Transmission via mobile hotspot or cellphone
  3. Stationary with Data Transmission via WiFi
  4. Stationary with Data Transmission via hotspot

To keep costs low, it is assumed that BackpAQ will utilize the smartphone's GPS location service. If this service is not available and the BackpAQ is in a fixed location, the user can enter a lat and lon location at config time so that the data is geolocated.

Step 8: Bill of Materials


In the near future the BackpAQ Kit can be ordered from BackpAQ Labs. For this project we'll utilize kits made available through Sustainable Silicon Valley.

The kit includes all the necessary components needed to build your own BackpAQ. Some benefits of getting the kit: overall lower cost, little soldering is required and the holes on the enclosure are pre-made. The option is also available to purchase the individual components which are listed below)


Here's an annotated list of what you'll need to build a BackPAQ:

  • DOIT Grove Sensor ESP8266 Expansion Board eBay
  • Plantower PMS5003 or PMS7003 Particulate Sensor w/cable eBay
  • Sensirion SGP-30 TVOC and eCO2 Sensor
  • BME280 Temperature/Humidity Sensor eBay
  • 128x64 OLED Display Amazon
  • 3.7V 2600 mAh LiPO Battery Adafruit
  • LiPO Charger/Regulator Board Adafruit
  • Mini Boost 3V to 5V Board Adafruit
  • Pelican Model 1010 Clear Poly Case B&H
  • Misc parts kits (jack, switch, screws, wire, etc.) SSV Labs will supply

Note: The parts in your kit may vary a bit from those in the photos or parts list. Don't worry...they'll work fine.


The software that runs BackpAQ can be downloaded here. Be sure to grab the latest version and the associated config file. You'll also need to utilize, download or update the following open source software packages (current as of 7/1/20):


To get the most out of BackpAQ you'll need a companion smartphone. Currently BackpAQ (and underlying Blynk app) require IOS 9.0 or higher or Android 4.2 or higher.

With the BackpAQ kit, only a small Phillips-head screwdriver and glue gun with glue stick (or epoxy/silicone) are required for assembly. Otherwise, the following tools are needed to build the unit: drill, various drill bits, files, Phillips-head screwdriver, glue gun and glue stick, soldering iron and solder, and various bits of wire, two-sided tape, and silicone.

Step 9: The Build

Ok, we're ready to get started building! First, let's lay out all of the parts on a flat, clean work surface. Pro tip: use an egg carton or old-school ice cube tray to organize the very small parts like fasteners, nuts, etc.

Assembly Instructions

The kit comes with a pre-drilled Pelican 1010 clear polycarbonate case and all parts necessary to complete the build. If you choose to order the parts and build yourself, you'll have to do some very basic mechanical and electronics (like soldering a few wires and drilling a few holes) to complete the build. And believe it or not, all of the parts you see in front of you will indeed fit in here! But it's a good idea to follow the suggested assembly sequence in order to fit the lower-level parts first before the one's that go on top. For example we'll want to secure the PMS5003/PMS7003 sensor (that's the small square blue box) in the lower left corner before we install the other components like the charger board or temperature sensor. Just follow along and you'll see the logic here.

OK, here's the recommended assembly sequence for the BackpAQ unit. See above photos for placement, and consult schematic for wiring details:

  1. Locate the Pelican case and orient so that the opening tab is at the bottom, facing you, and the large holes used for air access and exit will be on your left. All of the steps that follow assume the case is oriented this way.
  2. Install the blue PMS5003 or PMS7003 sensor (it has a double-sided adhesive and foam insulator pad) to align with the intake and outtake holes. The sensor inlet and outlet holes will not exactly line up with the holes in the case. Just fit to center on the holes as best you can. And go ahead and plug in the cable now as it will be difficult to fit when other parts are installed.
  3. Place the LiPo charger board atop the sensor but don't fasten with adhesive pad yet.
  4. Fasten the 5V up-converter to the LiPo charger board (single small screw and nut). Now, using the double-sided adhesive pad, fasten both to the top of the PM sensor. See photos for positioning.
  5. Locate the PURPLE wire (5V DC power) in the PM sensor cable. Cut this wire about midway and route the PM sensor end to the 5V OUT solder pad on the 5V up-converter. Solder.
  6. Fasten the BME280 temp/humidity sensor, aligned with the hole on the bottom-left side of the case (either single screw or silicone goo). Make sure you get the sensor side (small square silver box) facing outward to the hole.
  7. If supplied with your kit, fasten the SDG-30 TVOC sensor to the top left side of the case, aligning with the hole on the top-left. Again, ensure you have the correct side of the sensor facing the hole.
  8. Install the LiPO battery (double sided adhesive) to the bottom of the case. Best orientation is horizontal, that is, long side along the long side of the case. When done the LiPO will fit under the ESP8266 board. Plug the battery cable to the socket on the charger board marked "BATT".
  9. Install the power switch in the provided hole on the right-hand side of the case. If the hole is not large enough use the edge of a scissors or blade of a screwdriver to enlarge. Use a small knife blade or other tool to de-burr the hole so that the jack will fit properly. Use pliers or small wrench to tighten the nut onto the shaft.
  10. Locate the extra small red/black cable (came with the LiPO charger board in the bag) and plug into the charger board socket marked "LOAD". Stretch the red wire across the top of the LiPO to the power switch and solder to the middle contact (pin 2 in the diagram). Locate a long black wire and splice the bare end to this black wire, taking care to insulate with black tape or heat shrink tubing. Locate a long red wire and solder the bare end to the other switch terminal (pin 3).
  11. Locate the long yellow wire. Solder the bare end to the input or 3V solder pad on the small 5V up-converter board.
  12. Locate the long green wire. Solder the bare end to the GROUND solder pad on the small 5V up-cpnverter board.
  13. Install the ESP8266 expansion board to the case, over top of the LiPO battery, with 2 spacers and M2 screws & nuts
  14. Install the charging jack as shown in the photos. Some kits will mount the jack at the right end of the case, near the power switch. Others will install in the hole on the top right-hand side. Mount yours where the pre-drilled hole is located. If the hole is too small, use a blade screwdriver or scissors to widen the hold as needed. Also, use a small knife blade or other tool to de-burr the hole so that the jack will fit properly. Use pliers or small wrench to tighten the nut onto the shaft.
  15. Locate the long red and black wires. Solder each to their respective solder pads on the charger board and route them across the top of the case (see photos) to the charging jack as shown in schematic diagram, paying attention to polarity. It is critical to make sure you have positive and negative correct here. If in doubt, verify with multimeter. Solder each wire to complete the connections.
  16. Gently fasten the OLED display to the case lid with 4 spacers and 4 sets of M2 screws & nuts. Do not over tighten or you might crack the delicate glass face or the display. If the holes do not precisely line up, use a very small drill bit of other small tool to widen one or more holes as necessary. Connect 4-wire cable to the OLED, paying attention to the wire order (colors do not match traditional "red/black"). VCC to VCC, Ground to Ground, SCL to SCL, SDA to SDA. Plug the other end of the cable into one of the I2C sockets (see photos).
  17. Connect the BME280 temp/humidity sensor plug into the remaining I2C socket on the ESP8266 board if not done already.
  18. Connect the SDG-30 TVOC/eCO2 sensor plug into the socket marked "D4/D5" on the board. This is used as a third I2C port and is electrically the same as the marked I2C sockets.
  19. Consult schematic (above) and connect all remaining cables and wires for temp sensor, power pos and ground. Note that the wire labeled "Wake" (typically yellow) is not currently used and may be left unconnected.
  20. Insert the 180K resistor (with connector) into the upper-left socket marked "A0".
  21. Verify all connections (Very important!) and that battery is charged.
  22. Turn power on with BackpAQ unit...OLED display should light up with "BackpAQ (Version)"!

Now that we've verified that our BackpAQ is up and running correctly, we're ready to move on to the software.

Step 10: The Software

A Word About the Software and Firmware That Powers BackpAQ

So you've got a working what? Sure, you can start monitoring PM and see a little of the data, but you can't really do very much without connecting and configuring the software, or, more correctly, the firmware. Firmware is the computing logic or code that will run on the microcontroller that's running in the BackpAQ unit you just put together. We've actually done a lot of work for you already; the BackpAQ kits come with pre-flashed firmware that helps you get up and running quickly.

So to really get to know the full capabilities of your BackpAQ, you'll need to do a little configuration of the code. Fortunately, the BackpAQ configuration portal that pops-up when connected to WiFi will allow you do all of the configuration needed to talk to Blynk on your smartphone and Thingspeak on the cloud.

And the best part is that all of the data is saved in the Thingspeak cloud where you can get at it any time you need to, even data from, say, months ago, to do some powerful analysis and comparisons. Now let's get the Thingspeak cloud set up so we can get this thing configured.

Step 11: Getting Set Up on Thingspeak


ThingSpeak is an IoT platform that allows users to collect, store and analyze data remotely. It is integrated with MATLAB/MathWorks which helps with data visualizations and analysis. It's where we'll store and manage all of the data collected from the sensor. Data in Thingspeak are stored within the fields in what are known as channels. Each channel has eight fields. We will be using all of the fields and two channels.

For more information about Thingspeak, refer to the following: ThingSpeak website, ThingSpeak Q&A

Thingspeak Setup

1) First, go to the Thingspeak website.

2) Click on "Sign Up". A page is opened to create a MathWorks account. Enter credentials and click "Continue". If you already have a MathWorks account click on "Sign In".

3) An email will be sent for verification. Once confirmed, return to the Thingspeak page and click "Continue"

4) Create a User ID and Password. Check the "Online Services Agreement" box and click "Continue"

5) On the sign-up successful page, click"OK"

6) Finally, there will be a pop-menu asking about the intended usage. Select your option and click "OK"

Step 12: Create Thingspeak Channels for Your Data

1) Select "New Channel" (we'll do this twice)

2a) Fill in description. To keep things in sync with the data the sensors are collecting, we'll need to fill in each field as follows.

For Channel 1:

  • Enter Name as "BackpAQ Sensor Data I",
  • Check the box and enter Field 1 as "PM0.1 ug/m3"
  • Check the box and enter Field 2 as "PM2.5 ug/m3"
  • Check the box and enter Field 3 as "PM10 ug/m3"
  • Check the box and enter Field 4 as "Temperature (F)"
  • Check the box and enter Field 5 as "Humidity (%)"
  • Check the box and enter Field 6 as "Latitude (Degrees)"
  • Check the box and enter Field 7 as "Longitude (Degrees)"
  • Check the box and enter Field 8 as "Air Quality Index I"

For Channel 2:

  • Enter Name as "BackpAQ Sensor Data II",
  • Check the box and enter Field 1 as "Time stamp"
  • Check the box and enter Field 2 as "Num of Particles Beyond 0.5 um/.1L"
  • Check the box and enter Field 3 as "Num of Particles Beyond 1.0 um/.1L"
  • Check the box and enter Field 4 as "Num of Particles Beyond 2.5 um/.1L"
  • Check the box and enter Field 5 as "Num of Particles Beyond 5.0 um/.1L"
  • Check the box and enter Field 6 as "Num of Particles Beyond 10 um/.1L"
  • Check the box and enter Field 7 as "TVOC"
  • Check the box and enter Field 8 as "eCO2"

2b) Click on "Save Channel" for each channel. A dashboard will open with eight charts for each. Each chart can then be edited individually.

When you're done, the new channels should resemble the last 2 pics above.

3a) Add some numerical or graphical displays to show the PM, particle counts, AQI, temp and humidity readings. To do this select "Add Widgets" then "Numerical Display" and click on "Next". Fill in the required information and click "Create". Repeat this for all of the appropriate fields. There are numerous examples of what can be computed and visualized.

3b) Finally, drag the widgets and place them side by side with the corresponding graphs.

Step 13: Complete the BackpAQ Configuration: Arduino

Get latest Arduino IDE

1) Download and install the latestArduino IDE for your computer and Operating System.

Wifi Login and ThingSpeak Credentials

1) Have the SSID / name and password for your wifi network on hand.

2) In order to upload data to ThingSpeak, you'll need your Thingspeak Channel IDs and Write API Keys. Go to your ThingSpeak account. In the "BackpAQ Sensor Data I and II" channels, click on "API Keys" and note the "Channel ID" and "Write API Key" for each.


The code for this project makes use of several customized libraries and header files. They need to be added to the Arduino IDE before the code can be used. See above image for a complete list of the libraries required for v0.90)

1) Add ESP8266 library

In the IDE go to File -> Preferences -> Additional Boards Manager URLs. Enter the URL (ESP8266) and click "OK". In the IDE go to Sketch -> Include library -> Manage libraries. In the search bar of the Library Manager enter "esp8266". Look for the package titled "ESP8266". Select the package and click on install.

2) Add ESP8266 Wifi library

In the IDE go to Sketch -> Include library -> Manage libraries. In the search bar of the Library Manager enter "esp8266wifi". Look for the package titled "ESP8266WiFi". It may or may not be installed. If not, select the package and click on install.

3) Add WiFiManager library

Search for and download the zip file, WiFiManager onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

4) Add ESP8266WebServer library
Search for and download the zip file, ESP8266WebServer onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

5) Add DNSServer library
Search for and download the zip file, DNSServer onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

6) Add Adafruit_BME280 library

Search for and download the zip file, Adafruit BME280 onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

7) Add Adafruit_SSD1306 library

Search for and download the zip file, Adafruit SSD1306 onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

8) Add Adafruit_GFX library
Search for and download the zip file, Adafruit GFX onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

9) Add Double_Reset_Detector library
Search for and download the zip file, Double Reset Detector onto your computer. In the IDE go to Sketch -> Include library -> Add .ZIP Library. Locate the zip file and select to add.

Step 14: Load BackpAQ Firmware Using Arduino IDE

Although the BackpAQ kits come pre-flashed with the BackpAQ firmware, and you can configure the Blynk and Thingspeak ids and tokens when you log in. But, we may need to configure a few fields and variables so let's go ahead and get Arduino IDE going.

1) First we'll need to set up IDE for the BackpAQ hardware we're using, in this case the WeMos D1 microcontroller. Go ahead and connect the BackpAQ to the computer through the micro-USB connector on the side.
1a) In the Arduino IDE (see above image for complete setup) : - Go to Tools -> Board -> select "WeMos D1". - Tools -> Flash size -> select "4M (FS: 3M OTA: ~3M)" - Tools -> CPU Frequency -> select "80MHz" - Tools -> Upload Speed -> select "115200" - Tools -> Port -> select the serial port where the Adafruit module is connected. This will be computer-dependent and will vary across PCs and Macs and IDE versions.

For the ESP 8266, the port names tend to have unusual names, e.g:

  • On Mac OS: /dev/tty.usb.modem8232, /dev/cu.SLAB_USB_toUART, or, on my Mac, /dev/tty.wchusbserial
  • On Windows: Com4 or Com3 (you'll have to scan ports to see which one Windows assigned)
  • On Linux /dev/ttyUSB0 or /dev/ttyACM0 (you Linux types already know this)

Typically, the WeMos D1 we are using uses the CH340 USB chip, and may require a driver download depending on what's already on your system. On my Mac the port is known as "dev/tty.wchusbserial". Your mileage may vary.

If your port is not showing up, or you can't communicate with the ESP, you probably need to install USB to UART Bridge VCP drivers. To do so, go here, then download and install the drivers for your operating system. After installing the drivers, restart the Arduino IDE.

2) Access the project code we'll be using from BackpAQ on Github. Download and save the .zip and open the file in the IDE (this involves knowing the IDE directories and nuances...not recommended if you haven't done it before.)

Here's where we configure the code for your unique device and Thingspeak channel:

3) Compile and upload the code. Messages, as well as sensor data, can be viewed on the serial monitor. To open the serial monitor, go to Tools -> Serial Monitor or press Ctrl+Shift+M on your keyboard. Set the baud rate to 9600 and select "Carriage return". Data should now be uploading to ThingSpeak. Note: The upload rate is set to every 17 seconds. The adjustment for a longer upload period can be made within the BackpAQ code. However, less than 17 seconds is not recommended due to Thingspeak limits on their API.

Step 15: Get the Blynk App and Libraries

As you may have surmised from the earlier steps, we are using the versatile and easy-to-program Blynk system to run our BackpAQ smartphone app. It's actually very easy to deploy and get running, so let's get started.

Here are the three easy steps to get the Blynk platform up and running:

1) Download the Blynk App

Blynk app for iOS and Android is the easiest way to build your own mobile app that work with the hardware of your choice. No iOS or Android coding required. It's the base for the BackpAQ app that runs on your smartphone. Grab the IOS Blynk app here and Andriod Blynk app here


1) Create New Account in Blynk app Account is needed to save your projects and provide access from any smartphone you have.☝️Use a valid email address as it will be later used often

2) Create New Project • Create New Project and clone the BackpAQ project. See next Step for details.

3) Get Auth Token Check your inbox to see if you get an email from Blynk with the Auth Token. You will need it later in the configuration of the program

2) Install the Blynk Library

Blynk Library is an extension that runs on top of your hardware application. It handles all the connection routines and data exchange between your hardware, Blynk Cloud, and your app project. This library will handle all of the interaction with the hardware (the BackpAQ device) and the smartphone app.

To install Blynk Library using built-in library manager in Arduino IDE (as you did in STEP 11):
-- Use the Library Manager. Open the IDE and click to the "Sketch" menu and then Include Library > Manage Libraries.

-- Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation. Search for Blynk library and in the version selection choose the latest version to date

-- Finally click on Install and wait for the IDE to install the new library. Downloading may take time depending on your connection speed. Once it has finished, an Installed tag should appear next to the Bridge library. You can close the library manager.

You can now find the new library available in the Sketch > Include Library menu.

3) Connect to BackpAQ

To get your BackpAQ online and connect it to Blynk Cloud, you will need a device Authentication Token. Note that for BackpAQ, the app token needs to be inserted into the appropriate field when configuring WiFi (see upcoming section on Operation.)

Step 16: Installing and Customizing the BackpAQ Blynk App

After you've downloaded and installed the Blynk app, it's time to "clone" the BackpAQ app onto your smartphone using only a QR code and your phone's camera. Pretty slick!

First, launch the Blynk app on your smartphone.

Next, create a new account.

NOTE - For this project 8700 energy points are required, so make sure you have enough energy points. For a new account Blynk gives 2000 free energy points, so you'll just have to make up the 6,700 point difference. Energy points may be purchased through the Blynk app and subsequently via your Apple App Store or Google Play Store and are a great deal at about $10 for the complete BackpAQ app!

To clone the BackpAQ project follow the directions to scan the above QR code using your smartphone's camera. Take note of the "auth token" your project is assigned as you'll need it later to configure your system.

Once, you've cloned the project you can add various widgets and displays to the basic BackpAQ. We'll cover that in a future Instructable. For now, we'll just do one configuration needed to send the data to Thingspeak.

Edit Webhook Widget to Update Thingspeak

This step is a bit complicated but will result in a powerful capability to send all of your data to Thingspeak with basically one click.

1) Click on the "Thingspeak 1" icon which should bring up the Webhook widget. Settings should be all done except you'll need to edit the "URL" box to include your Thingspeak WRITE API key.

2) Basically, all you need to do here is to overwrite the token that's already there. Be sure to NOT touch the other fields as they are all set for Thingspeak already.

This is what the Webhook URL field will look like before your edit. The field in bold is the Thingspeak WRITE API key...that's what you need to replace with the one you got from Step 10.[0]/&field2=/pin[1]/&field3=/pin[2]/&field4=/pin[3]/&field5=/pin[4]/&field6=/pin[5]/&field7=/pin[6]/&field8=/pin[7]/

3) Do the same for "Thingspeak 2" label and you're done!

Step 17: Operating Your BackpAQ

First, ensure your BackpAQ is fully charged, or plug in the charger to operate. Flip the toggle switch to the On position. The OLED display should light up with the first two lines displayed, and a red LED will light inside the case. If the charger is plugged in, you will observe either the 'charge' or 'done' light on the charger board.

At startup, the BackpAQ is configured in Access Point -> AP (Wifi point) mode. If no known SSID is located (or you press the "reset" button on the ESP board inside the case), you will be instructed to access the SSID "BACKPAQ" on your browser. Using your smartphone or any WiFi connected device (such as a tablet or laptop), simply connected to "BACKPAQ" and a special "Config Portal" will automatically pop up to give you an opportunity to configure BackpAQ, including selecting the WiFi you wish to use, specify your Blynk Auth token and Thingspeak channels and write API keys, and optionally other parameters (see 3 photos above for what this will look like.) Note that once entered, your information will be saved so no need to re-enter each time you login.

Configuration via Capture Portal

As you can see from the photos above, once the portal appears you will be asked (initially) for several parameters you will need to enter in order for BackpAQ to know where to connect and how and where to send the data.

Going left to right, the first photo shows the main config portal landing page, with three blue tabs:

Configuration Click here to start to configuration dialog

Information Click here for information on the BackpAQ processor and wifi setup

Exit Portal Click here if you want to exit before configuration

To configure your BackpAQ, you'll need to enter several pieces of information (see second photo):

  • Select your WiFi from the list, or, if necessary, type it in the SSID field.
  • Next, type in your WiFi password.
  • Move down to the box for "Blynk Auth Token" and enter/copy-paste the longish token you received in Step 14.
  • Now move down to the checkbox that allows you to specify whether you want BackpAQ to run in "Mobile" or "Stationary" mode. By default the box is "checked" (or "ticked" if you're a Brit ~;) so uncheck if you intend to run in a fixed position.
  • You can optionally enter a GPS latitude and longitude for the location you are currently monitoring. Useful if you intend to use BackpAQ at a fixed location.
  • Finally, enter your Thingspeak info in the next 4 boxes, with channel 1 and channel 2, and the corresponding Write Key for each.
  • Click on 'SAVE' to save the configuration. Information you enter will be saved on the ESP chip.

After connecting the display will verify the WiFi and then enter a "sensor warmup" period of 30 seconds. This allows the particle sensor time to initialize.

Finishing warmup, you'll see the basic PM readings appear on the OLED. At present, this will be:

  • PM1.0
  • PM2.5
  • AQI

As the unit is almost completely programmable, we can change the data on the OLED to display any of the PM sensor data.

Step 18: Using the BackpAQ App

Welcome to BackpAQ!

The BackpAQ app has been designed to be useful and engaging to aid you in pursuing your AQ monitoring activities and investigations. However, please recognize that it's very much a work-in-progress and while functional has some bugs, glitches and not-quite-yet functions. Indeed, we hope that you will help refine this design or, better yet, help design something better! Consider this app a starter set of capabilities that you can build on + refine + share.

Basic Functions

In the photo above you can see the current three app screens: center is the main screen, left is the map, and right is the detailed data. We'll go briefly through each next.

  • Main

The screen you see when BackpAQ starts. There is a lot of data on this panel:

- Gauges showing PM2.5, TVOC, and CO2 measurements

- Gauge showing AQI based on PM2.5 measurement

- Multi-graph showing these concentrations in Live and various timed intervals

- Temperature (in deg F) and Relative Humidity (in %)

- Latitude and Longitude of your current position (see Map below)

- BackpAQ battery voltage (do I need to recharge?)

  • BacktrAQ Map

The BacktrAQ Map display your current position and the last 60 positions based on 10 minute intervals (this is adjustable). You can click on any position icon to see the AQ readings captured at that position. Much more detailed geo-location data and visualization is available in your Thingspeak database.

  • Detailed Data

The Detailed Data screen displays the various particle counts from the PM sensor, eg, Number of Particles Beyond 5.0 ug/.mL. Also displayed is a graph showing these counts in Live and various timed intervals. Again, see Thingspeak for all of the details and some cool tools to bring them to life.

Quirks, Bugs, and Not-quite-working, ...

As mentioned above this app is at a Beta stage of maturity and naturally has some quirks and bugs, as well as some functions that are still being developed. Here's a list of what's known (help us find the rest!)

  • The readings will not be accurate until the sensor has warmed up and various connections are complete. Wait for at least 30 seconds until things settle down.
  • The Map occasionally misbehaves and places position markers in strange countries. Not sure what's going on but it does seem to know where you currently are and have been.
  • The Battery Level indicator is practice is to just recharge nightly as you would your smartphone.
  • The PM sensor is obviously directional in this application as it depends on pulling in air through the intake hole in the BackpAQ case. So, best to orient the device so that the intake has a "view" of where you wish to monitor and is not impeded or blocked.
  • The PM sensor is either the larger PMS5003 or the more svelt PMS7003, depending on which unit we shipped with your kit. Future versions will utilize only the 7003.
  • The BackpAQ software running on the device is still young and fragile. This means it may crash occasionally or need to be restarted when it "bogs down". The prototype units have been run successfully for 12-15 hours without problems but things do happen in software, especially when handing several temperamental sensors with a low-cost processor, on a small battery.
  • The AQI gauge and values are slightly controversial in the way they are calculated here and in most other portable devices. The NowCast function (code included but not invoked) is designed to handle this. We will discuss this in class and hopefully come up with a better way to calculate and use it in this context.

Step 19: AQI: Air Quality Index

AQI, Air Quality Index

The AQI is an index for reporting daily air quality. It tells you how clean or polluted your air is, and what associated health effects might be a concern for you. The AQI focuses on health effects you may experience within a few hours or days after breathing polluted air. EPA calculates the AQI for five major air pollutants regulated by the Clean Air Act: ground-level ozone, particle pollution (also known as particulate matter), carbon monoxide, sulfur dioxide, and nitrogen dioxide. For each of these pollutants, EPA has established national air quality standards to protect public health. Ground-level ozone and airborne particles are the two pollutants that pose the greatest threat to human health in this country.

How Does the AQI Work?

Think of the AQI as a yardstick that runs from 0 to 500. The higher the AQI value, the greater the level of air pollution and the greater the health concern. For example, an AQI value of 50 represents good air quality with little potential to affect public health, while an AQI value over 300 represents hazardous air quality. An AQI value of 100 generally corresponds to the national air quality standard for the pollutant, which is the level EPA has set to protect public health. AQI values below 100 are generally thought of as satisfactory. When AQI values are above 100, air quality is considered to be unhealthy-at first for certain sensitive groups of people, then for everyone as AQI values get higher.

How is AQI Calculated?

Consult the above figure (1) for the actual AQI calculation.

See AQI Calculation for more detail on how the AQI is calculated.

NOTE: By definition, the AQI is calculated using data from a 24-hour period. That’s because the science we have about air pollution exposure and health is based on 24 hours and therefore EPA’s air quality standards are based on 24 hours average of sampled AQ. It is not valid to use shorter-term (e.g. hourly) data to calculate an AQI value.

Finally, it's important to always use the most current breakpoints when calculating AQI. Below are the newly revised (12/19) breakpoints from US EPA which we use in BackpAQ:

"AQI Category","Low AQI","High AQI","Low Breakpoint","High Breakpoint"

  • "GOOD",0,50,0.0,12.0
  • "MODERATE",51,100,12.1,35.4
  • "UNHEALTHY FOR SENSITIVE",101,150,35.5,55.4
  • "UNHEALTHY",151,200,55.5,150.4
  • "VERY UNHEALTHY",201,300,150.5,250.4
  • "HAZARDOUS",301,400,250.5,350.4
  • "HAZARDOUS",401,500,350.5,500.4
  • "HAZARDOUS",501,999,500.5,99999.9

See also Revised 2019 US EPA Air Quality Breakpoints

Making AQI More Useful Now: Nowcasting

The AQI is used to deliver a daily air quality report which means at the end of the day, we attain an effective reading for the air quality but this also means that we defeat the purpose of the AQI in the first place. The AQI is intended to help users take immediate actions if air is of harmful quality. This is where the Nowcasting algorithm comes into place. A mixture of the words “now” and “forecasting”, Nowcasting in air quality is a method to give readings for concentrations of harmful substances in the air in a form that immediately usable.

Obviously, simply giving a reading for a harmful concentration in an environment of frequently changing air would be misleading as the immediate reading would in most cases present just an anomaly to an overall cleaner air than what is depicted. This means that even on days when the AQI forecast at the end of the day predicts unhealthy conditions, it is possible that pollution levels might be lower during some parts of the day and vice versa.

Thus the NowCast allows current condition maps to align more closely with what people are actually seeing or experiencing. The technique of Nowcasting is to take a weighted average instead of taking the average of the last relevant span of time. The equation (2) above is used to Nowcast a concentration at any given time.

So to separate the two, for momentary AQI readings, Nowcasting is used; for a daily report the general formula is practiced.

Here is an excellent overview of where AQI and Nowcasting are headed.

Step 20: AQ Monitoring and Data Analysis

Ready, set, go!

Now that you've built your BackpAQ device and configured the software, you're ready to do some AQ monitoring. This is where the opportunity to learn about where air pollution exists in your community and what you, as a concerned citizen, can do about it (and encourage others to join in!). See here for more insights.

Among the first things you'll want to consider are:

  • Where can/should I monitor AQ?
  • Is it OK to go onto private property? How do I go about asking permission?
  • Where are likely sources of air pollution?
  • What are the kinds of pollution that I can monitor with BackpAQ?
  • What kinds of data will I be collecting?

Then, once you've monitored in a few places, you'll want to consider:

  • How will I analyze the data I've collected? Are there Thingspeak or other tools I need to learn?
  • How does my data correspond or correlate with my classmates data?
  • How does my data correlate with official or regulatory data (ie, BAAQMD)?
  • Do I need to calibrate my BackpAQ with "official" monitors? With other BackpAQs? Why is this important?

We'll cover these and many more in the next module. Stay tuned and happy monitoring!

Step 21: What Can Communities Do?

Because the mobile monitoring devices are handheld, cost-effective (e.g. multiple samples with high frequency and mobility), and can provide real-time PM or VOC measurements, there is a possibility that communities could deploy these units after a training program conducted by skilled exposure or air pollution scientists.

Active neighborhood sampling could improve residents’ knowledge about local air pollution concentrations, and enable residents to investigate areas where air pollution is perceived to be elevated. By following a time- and location-specific approach, communities could collect a significant amount of repeated measures data to better understand pollution concentrations where they reside, and to identify high-pollution events.

Finally, mobile monitoring could be investigated for use in community based participatory research (CBPR) to provide neighborhood residents with the opportunity to proactively investigate potential air pollution. However, interpretation of the results will still require skilled professional analysis.

Step 22: Futures...

If you've made it this far then congratulations are in order! I realize that with all of the software and cloud configuration it's quite a task but I hope you've found it worth the trouble. Part of the very reason so much is done in the software and cloud is extensibility and future proofing. If everything was hard-coded in the hardware, it would be difficult indeed to make changes and try new things.

So, what new things might we try? Well, here's a starter list...


  • Send or share data to other clouds, such as WeatherUnderground or other environmental-related
  • Add analytics (graphs, tables, charts) to your Thingspeak/Matlab channels
  • Add NowCast calculation for more accurate realtime AQI
  • Add real-time-clock to allow more accurate timing
  • Add local SD-card data storage (this is partly implemented in V1)
  • Add NeoPixels multicolor LED display for AQI
  • More robust WiFi/credentials handling
  • Add/Change communications to Cellular or Bluetooth Low Energy (BLE)


  • Automate data collection and analytics/reporting with Thingspeak & Matlab
  • Develop more sophisticated analytics on Matlab or similar platform
  • Calibrate with similar quality and accuracy monitors/sensors
  • Add accelerometer to measure and compensate for forces on the PM sensor
  • Add time/location-based recording capability
  • Evolve device to fit other use cases, such as mobile for use in Taxis, Uber/Lyft, Scooters, etc.
  • Connect and trigger alerts to SmartHome devices such as Alexa, Google, Siri


  • Add additional sensors Monitor gases such as CO, CO2, Nox, Sox, O3, maybe TVOC
  • Calibrate/co-locate with BAAQMD or other high-precision monitors

What's on your list?

Be the First to Share


    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Make it Fly Challenge

      Make it Fly Challenge
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge



    1 year ago on Step 19

    Hi, very detailed and interesting project, thanks. Modestly i started one with a PMS7003 and a MH-Z19, driven by an arduino and a 3D printed case. My findings are : 1) when possible use serial link over pwm or analog info, 2) arduino uno may not be the best candidate to get infos from 2 serial links, even in sequence, 3) the design of openings in the the casing in which everything is installed is super important. Outside the casing i get a 250ppm reading, inside the casing it dropped to 100, with larger openings it raises up to 150...still not satisfactory. I would like to avoid the use of an additional tiny fan (PMS is already fitted with one). All in all, this is super fun, but still a work in progress. Thanks again for sharing yours.


    1 year ago

    THis is a really good idea! I just favorited to come see your analytics when they're up!