# Air Quality Sensor 3D Printed Enclosure

## Overview

https://youtu.be/6KpKyPQaUaE

## IOT Air Sensor Monitor

Build a 3D printed enclosure for your IOT Air Quality Sensor. This project [is similar to our other air quality sensor guide](https://learn.adafruit.com/diy-air-quality-monitor), except it uses Adafruit STEMMA sensors and _has minimal soldering required_.

&nbsp;

![sensors_iphone-hero.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/792/medium640/sensors_iphone-hero.jpg?1604601153)

This project uses sensors to **measure PM2.5 (particles that are 2.5 microns or smaller in diameter) dust concentrations, temperature and humidity**.&nbsp;

This weatherproof enclosure is modeled after a silo-home. We've included different types of mounting holes and brackets for different mounting configurations.

## Adafruit IO

Build an [Adafruit IO](https://io.adafruit.com/welcome) Dashboard to visualize your air quality sensor's data at a glance. [Adafruit IO](https://io.adafruit.com/welcome) is free and includes up to 30 days of storage for your sensor's data.&nbsp;

You can view and interact with this data from anywhere in the world with a wireless connection.

![sensors_hero-aio.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/803/medium640/sensors_hero-aio.jpg?1604606811)

## Enclosure Design

The case is themed to resemble a modern silo grain bin house. The roof is removable by unscrewing the top from the case. The Feather boards are securely mounted inside via heat set inserts. A mounting plate is used to secure the enclosure to a surface. Weatherproof cable gland is used to keep moisture out. The bottom cover is modular allowing for a different set of sensors.

![sensors_hero-case-open.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/793/medium640/sensors_hero-case-open.jpg?1604601456)

## Choose Your Sensors

The enclosure and code accommodate for two different sets of sensors. Take a moment to choose your set up.

- BME280 & PMS5003
- BME680 & PMSA003i

![hero-sensors-setup.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/802/medium640/hero-sensors-setup.jpg?1604606618)

## Prerequisite Guides

Take a moment to walk through the following guides to get familiar with the board, sensors and Adafruit IO.

- [Feather M4 Guide](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51)
- [Airlift FeatherWing Guide](https://learn.adafruit.com/adafruit-airlift-featherwing-esp32-wifi-co-processor-featherwing)
- [PM2.5 Air Quality Sensor](https://learn.adafruit.com/pm25-air-quality-sensor)
- [Adafruit PMSA003I Air Quality Breakout](https://learn.adafruit.com/pmsa003i)
- [Adafruit IO Welcome Guide](https://learn.adafruit.com/welcome-to-adafruit-io)

## Parts
### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
![Angled shot of a Adafruit Feather M4 Express. ](https://cdn-shop.adafruit.com/640x480/3857-10.jpg)

### Adafruit AirLift FeatherWing – ESP32 WiFi Co-Processor

[Adafruit AirLift FeatherWing – ESP32 WiFi Co-Processor](https://www.adafruit.com/product/4264)
Give your Feather project a _lift_ with the Adafruit AirLift FeatherWing - a FeatherWing that lets you use the powerful ESP32 as a WiFi co-processor. You probably have your favorite Feather ([like the Feather M4](https://www.adafruit.com/product/3857)) that comes with its own...

In Stock
[Buy Now](https://www.adafruit.com/product/4264)
[Related Guides to the Product](https://learn.adafruit.com/products/4264/guides)
![Angled shot of Adafruit AirLift FeatherWing.](https://cdn-shop.adafruit.com/640x480/4264-07.jpg)

### PM2.5 Air Quality Sensor and Breadboard Adapter Kit

[PM2.5 Air Quality Sensor and Breadboard Adapter Kit](https://www.adafruit.com/product/3686)
Breathe easy, knowing that you can track and sense the quality of the air around you with th **e PM2.5&nbsp;Air Quality Sensor with Breadboard Adapter** particulate sensor. [Mad Max & Furiosa definitely should have hooked up one of...](https://en.wikipedia.org/wiki/Mad_Max)

In Stock
[Buy Now](https://www.adafruit.com/product/3686)
[Related Guides to the Product](https://learn.adafruit.com/products/3686/guides)
![Person soldering next to sensor, which detects the fumes and lights up an LED red](https://cdn-shop.adafruit.com/product-videos/640x480/3686-04.jpg)

### Adafruit PMSA003I Air Quality Breakout

[Adafruit PMSA003I Air Quality Breakout](https://www.adafruit.com/product/4632)
Breathe easy, knowing that you can track and sense the quality of the air around you with this **&nbsp;Adafruit PMSA003I Air Quality Breakout**. This sensor is great for monitoring air quality, in a compact plug-in format.

Best of all, unlike almost all other sensors...

In Stock
[Buy Now](https://www.adafruit.com/product/4632)
[Related Guides to the Product](https://learn.adafruit.com/products/4632/guides)
![Adafruit PMSA003I PM2.5 Air Quality Breakout](https://cdn-shop.adafruit.com/640x480/4632-10.jpg)

### Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor

[Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor](https://www.adafruit.com/product/2652)
Bosch has stepped up their game with their new BME280 sensor, an environmental sensor with temperature, barometric pressure&nbsp;and&nbsp;humidity! This sensor is great for all sorts of indoor environmental sensing and can even be used in both I2C and SPI!

This precision sensor from...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2652)
[Related Guides to the Product](https://learn.adafruit.com/products/2652/guides)
![small, rectangle-shaped, BME280 temperature humidity pressure sensor breakout board.](https://cdn-shop.adafruit.com/640x480/2652-04.jpg)

### Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor

[Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor](https://www.adafruit.com/product/3660)
The long awaited BME680 from Bosch gives you&nbsp;_all the environmental sensing you want_&nbsp;in one small package. This little sensor contains&nbsp; **temperature** ,&nbsp; **humidity** ,&nbsp; **barometric pressure,** &nbsp;and&nbsp; **VOC...**

In Stock
[Buy Now](https://www.adafruit.com/product/3660)
[Related Guides to the Product](https://learn.adafruit.com/products/3660/guides)
![Angled shot of black, square-shaped pressure-humidity-temperature-gas sensor breakout.](https://cdn-shop.adafruit.com/640x480/3660-08.jpg)

### FeatherWing Doubler - Prototyping Add-on For All Feather Boards

[FeatherWing Doubler - Prototyping Add-on For All Feather Boards](https://www.adafruit.com/product/2890)
This is the **FeatherWing Doubler** - a prototyping add-on and more for all Feather boards. This is similar to our [FeatherWing Proto](https://www.adafruit.com/products/2884) except there are two! The magic of the Doubler comes when stacking a Feather and another...

In Stock
[Buy Now](https://www.adafruit.com/product/2890)
[Related Guides to the Product](https://learn.adafruit.com/products/2890/guides)
![Double prototyping feather wing PCB with socket headers installed](https://cdn-shop.adafruit.com/640x480/2890-01.jpg)

### Part: STEMMA QT Cable
quantity: 1
Qwiic JST SH 4-pin Cable - 100mm Long
[STEMMA QT Cable](https://www.adafruit.com/product/4210)

### Part: USB Extension Cable
quantity: 1
3 meters / 10 ft long
[USB Extension Cable](https://www.adafruit.com/product/993)

### Part: USB A/Micro Cable - 2m
quantity: 1
USB A/Micro Cable - 2m
[USB A/Micro Cable - 2m](https://www.adafruit.com/product/2185)

### Part: PG7 Cable Gland
quantity: 1
Cable Gland PG-7 size - 0.118" to 0.169" Cable Diameter - PG-7
[PG7 Cable Gland](https://www.adafruit.com/product/762)

### Part: USB Micro B Connector
quantity: 1
USB DIY Slim Connector Shell - MicroB Plug
[USB Micro B Connector](https://www.adafruit.com/product/1826)

### Part: M3 Heat-Set Inserts
quantity: 1
Brass Heat-Set Inserts for Plastic - M3 x 4mm - 50 pack
[M3 Heat-Set Inserts](https://www.adafruit.com/product/4255)

### Part: Silicone Cover Stranded-Core Ribbon Cable
quantity: 1
10 Wire 1 Meter Long - 28AWG Black
[Silicone Cover Stranded-Core Ribbon Cable](https://www.adafruit.com/product/3890)

### Part: M2.5 Hardware
quantity: 1
Black Nylon Screw and Stand-off Set – M2.5 Thread
[M2.5 Hardware](https://www.adafruit.com/product/3299)

### Part: M3 Hardware
quantity: 4
M3 screws, hex nuts and standoffs
[M3 Hardware](https://www.adafruit.com/product/4685)

### Part: M3 x 20mm Standoffs
quantity: 4
M3 x 20mm Standoffs
[M3 x 20mm Standoffs](https://www.mcmaster.com/93655A358/)

### Part: USB Power Supply
quantity: 1
5V 1A (1000mA) USB port power supply - UL Listed
[USB Power Supply](https://www.adafruit.com/product/501)

## Hardware List

- 4x M3 x 4mm heat-set inserts (silo case)
- 4x M3 x 6mm flat head machine screws (silo standoffs)
- 4x M3 hex nuts (silo standoffs)
- 2x M3 x 8mm button head machine screws (PCB mount for silo)
- 2x M3 x 6mm thumb screws (bottom cover for silo)
- 8x M2.5 x 4mm button head machine screws (PCB mount for FeatherWing Doubler)
- 4x M2.5 x 6mm FF standoffs (PCB mount for FeatherWing Doubler)
- 2x M5 x 8mm button head screws (silo mounting plate to wall)

For PMSA003i

- 2x M3 x 6mm button head machine screws

For BME280

- 2x M2.5 x 4mm flat head machine screws

For BME680

- 4x M2.5 x 4mm flat head machine screws

# Air Quality Sensor 3D Printed Enclosure

## Circuit Diagram

The diagram below provides a visual reference for wiring of the components. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Use Adafruit's Fritzing parts library to create circuit diagrams for your projects. Download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

## Choose Your Sensors

This project can use two different sets of sensors. The first set uses the BME280 and the PMS5003. The second set uses the BME680 and the PMSA003i. The wiring is slightly different and noted below.

The code accommodates for both setups.

## PMSA003i & BME680
![](https://cdn-learn.adafruit.com/assets/assets/000/096/695/medium800/sensors_pmsa3i_bb.png?1604346717)

 **Make the following connections between the BME680 and the FeatherWing:**

- **Board 3V** &nbsp;to&nbsp; **sensor VIN**
- **Board GND** &nbsp;to&nbsp; **sensor GND**
- **Board SCL** &nbsp;to&nbsp; **sensor SCL**
- **Board SDA** &nbsp;to&nbsp; **sensor SDA**

**Then, make the following connections between the PMSA003i and the BME680:**

- **Sensor VIN&nbsp;** to **&nbsp;board 5V**
- **Sensor GND&nbsp;** to **&nbsp;board GND**
- **Sensor SCL** to **board SCL**
- **Sensor SDA** to **board SDA**

## PMS5003 & BME280
![](https://cdn-learn.adafruit.com/assets/assets/000/096/696/medium800/sensors_temperature___humidity_wiring_bb.png?1604346765)

 **Make the following connections between the BME280 and the FeatherWing:**

- **Board 3V** &nbsp;to&nbsp; **sensor VIN**
- **Board GND** &nbsp;to&nbsp; **sensor GND**
- **Board SCL** &nbsp;to&nbsp; **sensor SCK**
- **Board SDA** &nbsp;to&nbsp; **sensor SDI**

**Then, make the following connections between the PM2.5 adaptor and the FeatherWing:**

- **Sensor VCC&nbsp;** to **&nbsp;board 5V**
- **Sensor GND&nbsp;** to **&nbsp;board GND**
- **Sensor TX&nbsp;** to **&nbsp;board RX**
  - Remember:&nbsp; **RX does not connect to RX!**

# Air Quality Sensor 3D Printed Enclosure

## Wiring

## Wire for BME280

Use a piece of 4-wire silicone ribbon cable, 15cm (6in) in length.

![sensors_bme280-wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/632/medium640/sensors_bme280-wire.jpg?1604328043)

## Wired BME280

Solder the ribbon cable to the pins on the BME280 breakout board.

- VIN
- GND
- SCK
- SDI

![sensors_bme280-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/633/medium640/sensors_bme280-wiring.jpg?1604328067)

## Wiring for PMS5003

Use a piece of 4-wire silicone ribbon cable, 7cm (3in) in length. Solder the wires to the pins on the breakout adapter for the PMS5003.

- VCC
- GND
- TXD
- RST

![sensors_psm5003-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/634/medium640/sensors_psm5003-wired.jpg?1604328114)

## Doubler FeatherWing + I2C (BME280 or BME680) Wiring

Use the photo and labels to reference the wiring. The BME280 and BME680 use exact same pins on the FeatherWing Doubler.

![sensors_featherwing-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/635/medium640/sensors_featherwing-wiring.jpg?1604328175)

## Doubler FeatherWing + PMS5003 Wiring

Use the photo and labels to reference wiring. The PMS5003 requires dedicated wiring to the Doubler FeatherWing.

The PMSA003i plugs directly into the STEMMA port on the BME680, essentially daisy chained I2C.

![sensors_featherwing-pms5003.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/636/medium640/sensors_featherwing-pms5003.jpg?1604328215)

## Feather Headers

Install the male 12pin and 16pin headers to the Feather M4 and Airlift FeatherWing. Solder the headers to the pins.

![sensors_feathers-topdown.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/798/medium640/sensors_feathers-topdown.jpg?1604604173)

![sensors_feathers-headers-side.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/799/medium640/sensors_feathers-headers-side.jpg?1604604185)

## Install Feathers to Doubler

Line up the male header pins with the female header pins on the FeatherWing Doubler. Press firmly to fully seat the headers.

![sensors_feathers-doubler-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/800/medium640/sensors_feathers-doubler-preinstall.jpg?1604604247)

![sensors_feathers-doubler-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/801/medium640/sensors_feathers-doubler-install.jpg?1604604273)

## USB micro B Connector

Wire up the micro USB b connector to a piece of 4-wire ribbon cable, about 12cm (5in )in length. This is used as the power cable for the Feather. Use the USB extension cable to increase the length of the cable.

Do not wire the micro USB connector to the USB extension cable just yet. The USB cable must be installed into the cable gland in the case first before wiring.

![sensors_usb-diy-cable.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/637/medium640/sensors_usb-diy-cable.jpg?1604328328)

# Air Quality Sensor 3D Printed Enclosure

## Adafruit IO Setup

## Obtain Adafruit IO Key

You will need your Adafruit IO username and secret API key.

[**Navigate to Adafruit IO**](https://io.adafruit.com/profile) and **click the Adafruit IO Key button** to retrieve these values. Write them down in a safe place, you'll need them later.

## Create Group

This guide will use multiple Adafruit IO feeds to store sensor values. To organize these feeds, you will need to create a new group.&nbsp;

 **Navigate** to [your Adafruit IO Feeds page](https://io.adafruit.com/feeds).

**Click** _Actions -\> Create a New Group_

**Name the group** _Air Quality Sensor_. You can optionally set a description.

**Click Create**

![temperature___humidity_create_new_group.png](https://cdn-learn.adafruit.com/assets/assets/000/095/444/medium640/temperature___humidity_create_new_group.png?1602101870)

![temperature___humidity_name_group.png](https://cdn-learn.adafruit.com/assets/assets/000/095/445/medium640/temperature___humidity_name_group.png?1602101902)

## Add Feeds to Group

Lets add a few feeds to the Air Quality Sensor group to hold sensor measurements and metadata.&nbsp;

 **Click** _Actions -\> Create a New Feed_

**Name the feed** _AQI_

**Click** _Add to Groups&nbsp;_and&nbsp; **select&nbsp;the Air Quality Sensor group**

**Click Create**

![temperature___humidity_IO_-_Feeds.png](https://cdn-learn.adafruit.com/assets/assets/000/095/448/medium640/temperature___humidity_IO_-_Feeds.png?1602102614)

![temperature___humidity_IO_-_Feeds.png](https://cdn-learn.adafruit.com/assets/assets/000/095/449/medium640/temperature___humidity_IO_-_Feeds.png?1602102712)

![temperature___humidity_IO_-_Feeds.png](https://cdn-learn.adafruit.com/assets/assets/000/095/450/medium640/temperature___humidity_IO_-_Feeds.png?1602102824)

Repeat the process in the step above to **create feeds for category (AQI category), temperature, and humidity**.

![temperature___humidity_IO_-_Feeds.png](https://cdn-learn.adafruit.com/assets/assets/000/095/451/medium640/temperature___humidity_IO_-_Feeds.png?1602102929)

![temperature___humidity_IO_-_Feeds.png](https://cdn-learn.adafruit.com/assets/assets/000/095/452/medium640/temperature___humidity_IO_-_Feeds.png?1602102963)

![temperature___humidity_IO_-_Feeds.png](https://cdn-learn.adafruit.com/assets/assets/000/095/453/medium640/temperature___humidity_IO_-_Feeds.png?1602102997)

Before proceeding, make sure your Air Quality Sensor group looks exactly like the screenshot below.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/454/medium800/temperature___humidity_IO_-_Feeds.png?1602103078)

## Adafruit IO Dashboard

Dashboards allow you to visualize data and control Adafruit IO connected projects from any modern web browser. We'll be adding gauge widgets to visualize data from the air quality sensor in real-time and charts to display data historically.

Navigate to&nbsp;[the dashboards page on Adafruit IO](https://io.adafruit.com/dashboards).&nbsp;

**Click Actions -\> Create New Dashboard**

**Name the dashboard** My Air Quality Sensor&nbsp;

**Click Create&nbsp;**

![temperature___humidity_IO_-_Dashboards.png](https://cdn-learn.adafruit.com/assets/assets/000/095/457/medium640/temperature___humidity_IO_-_Dashboards.png?1602104346)

![temperature___humidity_IO_-_Dashboards.png](https://cdn-learn.adafruit.com/assets/assets/000/095/458/medium640/temperature___humidity_IO_-_Dashboards.png?1602104370)

You should see your new dashboard pop-up in the list of Dashboards. **Click the My Air Quality Sensor dashboard link** to navigate to the dashboard page.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/460/medium800/temperature___humidity_IO_-_Dashboards.png?1602104592)

You should see an empty dashboard. Let's fill it with blocks!

**Click the '+' button on your dashboard to add a new block**.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/462/medium800/temperature___humidity_IO_-_Air_Quality_Sensor.png?1602104632)

Let's add a text block to display the air quality condition (Good, Acceptable, Moderate, etc) sent by the sensor.

From the Create a New Block picker, **click the Text Block**

From the Create a New Block picker,&nbsp; **click the Text Block**

On the Choose Feed picker, **select the category feed** &nbsp;

Under Block Settings:

- **Set Block Title** to AQI Category
- **Set Font Size** to Large
- **Click** Create Block

![temperature___humidity_IO_-_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/464/medium640/temperature___humidity_IO_-_Air_Quality_Sensor.png?1602104881)

![temperature___humidity_IO_-_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/465/medium640/temperature___humidity_IO_-_Air_Quality_Sensor.png?1602104960)

![temperature___humidity_IO_-_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/468/medium640/temperature___humidity_IO_-_Air_Quality_Sensor.png?1602105040)

You should see the AQI Category text box appear on the dashboard. We'll organize the dashboard last - let's add the next block.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/470/medium800/temperature___humidity_IO_-_Air_Quality_Sensor.png?1602105255)

## Add Gauge Block for Real-Time AQI

The United States Environmental Protection Agency [uses an Air Quality Index (AQI) to communicate air quality.](https://www.airnow.gov/aqi/) While computing the AQI according to the EPA requires a 24 hour average, this gauge displays the real-time AQI.

- **Note:** This guide uses air quality breakpoints and conditions developed by the USA EPA. Other countries have environmental protection agencies with similar countries with air quality indexes using PM2.5 particles. [Check out this Wikipedia page for more info](https://en.wikipedia.org/wiki/Air_quality_index#Indices_by_location).

 **Click** Create a New Block

**Select&nbsp;** the Gauge Block

**Select** the _aqi_ feed

Under Block Settings:

- **Set Block Title** to _Real-Time AQI_
- **Set the Gauge Max Value** to 500
- **Set Gauge Width** to 50px
- **Remove the "Value" text placeholder**  **from Gauge Label** , AQI is a unit-less value.
- **Set High Warning Value to 151**
  - [This AQI value corresponds with the EPA's "unhealthy" AQI category](https://en.wikipedia.org/wiki/Air_quality_index#Computing_the_AQI).

- **Set Decimal Places** to **0**
- **Tick the Show Icon checkbox**
- **Set Icon&nbsp;** to&nbsp; **w:cloudy-windy**
- **Click Create Block**

![temperature___humidity_create_new_block_gauge_1.png](https://cdn-learn.adafruit.com/assets/assets/000/095/472/medium640/temperature___humidity_create_new_block_gauge_1.png?1602106558)

![temperature___humidity_create_new_gauge_2.png](https://cdn-learn.adafruit.com/assets/assets/000/095/473/medium640/temperature___humidity_create_new_gauge_2.png?1602106576)

![temperature___humidity_IO_-_My_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/483/medium640/temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1602163902)

Your dashboard should now show the AQI category text block and the Real-Time AQI gauge.

## Add Gauge Block for Humidity

We'll add another gauge block to display the BME280's humidity reading.

 **Click** &nbsp;Create a New Block

**Select&nbsp;** the Gauge Block

**Select** &nbsp;the _humidity_ feed

Under Block Settings:

- **Set Block Title** &nbsp;to&nbsp;_Current Humidity_
- **Set Gauge Width** &nbsp;to 50px
- **Remove the "Value" text placeholder** &nbsp; **from Gauge Label**
- **Tick the Show Icon checkbox**
- **Set Icon&nbsp;** to&nbsp; **w:humidity**
- **Click Create Block**

![temperature___humidity_create_new_block_gauge_1.png](https://cdn-learn.adafruit.com/assets/assets/000/095/475/medium640/temperature___humidity_create_new_block_gauge_1.png?1602106960)

![temperature___humidity_IO_-_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/476/medium640/temperature___humidity_IO_-_Air_Quality_Sensor.png?1602106996)

![temperature___humidity_IO_-_My_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/477/medium640/temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1602107111)

## Add Gauge Block for Temperature

We'll add another gauge block to display the BME280's temperature reading.

 **Click** &nbsp; **Create a New Block**

**Select&nbsp;** the **Gauge**  **Block**

**Select** &nbsp;the&nbsp;_humidity_&nbsp;feed

Under Block Settings:

- **Set Block Title** &nbsp;to&nbsp;_Current Temperature_
- **Set Gauge Width** &nbsp;to 50px
- **Set the Gauge label** to **Degrees F or Degrees C**
- **Click the Show Icon checkbox**
- **Set Icon&nbsp;** to&nbsp; **thermometer**
- **Click Create Block**

![temperature___humidity_create_new_block_gauge_1.png](https://cdn-learn.adafruit.com/assets/assets/000/095/478/medium640/temperature___humidity_create_new_block_gauge_1.png?1602107268)

![temperature___humidity_IO_-_My_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/479/medium640/temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1602107373)

![temperature___humidity_IO_-_My_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/480/medium640/temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1602107492)

## Add Line Charts

While real-time visualization of PM2.5 measurements over time is immediately useful - looking at the air quality index over time will help you understand the AQI as a more accurate average. Adafruit IO's Line Charts update dynamically whenever new values are pushed to the feed.

Since most environmental groups use a 24-hour average of AQI measurements, we'll create a new line chart block to display the AQI measurements for the past day.

 **Click**  **Create a New Block**

**Select** the **Line Chart Block**

**Select** the _aqi_ **feed**

Under Block Settings:

- **Set Block Title** to **AQI - 24 Hours**
- **Set Show History&nbsp;** to **24 Hours**
- Click the **Draw Grid Lines** checkbox

**Click Create Block**

![temperature___humidity_line_block_1.png](https://cdn-learn.adafruit.com/assets/assets/000/095/485/medium640/temperature___humidity_line_block_1.png?1602164986)

![temperature___humidity_line_chart_2.png](https://cdn-learn.adafruit.com/assets/assets/000/095/486/medium640/temperature___humidity_line_chart_2.png?1602164998)

![temperature___humidity_line_chart_3.png](https://cdn-learn.adafruit.com/assets/assets/000/095/487/medium640/temperature___humidity_line_chart_3.png?1602165021)

Let's make another line chart block to display the AQI&nbsp; from the past week.

 **Click** &nbsp; **Create a New Block**

**Select** &nbsp;the **&nbsp;Line Chart Block**

**Select** &nbsp;the&nbsp;_aqi_&nbsp; **feed**

Under Block Settings:

- **Set Block Title** &nbsp;to&nbsp; **AQI - 24 hours**
- **Set Show History&nbsp;** to **7 Days**
- Click the **&nbsp;Draw Grid Lines** &nbsp;checkbox

**Click Create Block**

![temperature___humidity_line_block_1.png](https://cdn-learn.adafruit.com/assets/assets/000/095/510/medium640/temperature___humidity_line_block_1.png?1602188870)

![temperature___humidity_line_chart_2.png](https://cdn-learn.adafruit.com/assets/assets/000/095/511/medium640/temperature___humidity_line_chart_2.png?1602188877)

![temperature___humidity_IO_-_My_Air_Quality_Sensor.png](https://cdn-learn.adafruit.com/assets/assets/000/095/512/medium640/temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1602188896)

## Organize Dashboard
You can drag the dashboard blocks around to re-organize your dashboard.&nbsp;

Before moving on, make sure your dashboard contains the same blocks as the screenshot below

![](https://cdn-learn.adafruit.com/assets/assets/000/095/513/medium800/temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1602189022)

# Air Quality Sensor 3D Printed Enclosure

## CircuitPython Setup

## Install CircuitPython

Some CircuitPython compatible boards come with CircuitPython installed. Others are&nbsp;_CircuitPython-ready_, but need to have it installed. As well, you may want to update the version of CircuitPython already installed on your board. The steps are the same for installing and updating.&nbsp;

- To&nbsp;**install (or update) your CircuitPython board**,&nbsp;[follow this page and come back here when you've successfully installed (or updated) CircuitPython.](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)

## CircuitPython Library Installation

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://github.com/adafruit/circuitpython/releases)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle)&nbsp;matching your version of CircuitPython.&nbsp;

CircuitPython hardware shows up on your computer operating system as a flash drive when connected via usb. The flash drive is called&nbsp; **CIRCUITPY** &nbsp;and contains a number of files. You will need to add additional files to enable the features of this project.

First, create a folder on the drive named lib if it is not already there.

Ensure your board's&nbsp; **lib** &nbsp;folder has the following files and folders **&nbsp;** copied over. The version of the files must be the same major version as your version of CircuitPython (i.e. 5.x for 5.x, 6.x for 6.x etc.)

- **adafruit\_bus\_device**
- **adafruit\_esp32spi**
- **adafruit\_io**
- **adafruit\_logging.mpy**
- **adafruit\_requests.mpy**
- **adafruit\_pm25**
- **neopixel.mpy**
- **simpleio.mpy**
- **adafruit\_bme280.mpy**

# Air Quality Sensor 3D Printed Enclosure

## Internet Connect!

# Connect to WiFi

OK, now that you have your&nbsp; **settings.toml** file set up - you can connect to the Internet.

To do this, you need to first install a few libraries, into the lib folder on your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file. Extract the contents of the zip file, open the directory **examples/** and then click on the directory that matches the version of CircuitPython you're using and copy the contents of that directory to your **CIRCUITPY** drive.

Your **CIRCUITPY** drive should now look similar to the following image:

![CIRCUITPY](https://adafruit.github.io/Adafruit_CircuitPython_Bundle/esp32spi_esp32spi_simpletest.py.png )

Info: Update to CircuitPython 9.2.x or later to use this example.

https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/blob/main/examples/esp32spi_simpletest.py

And save it to your board, with the name **code.py**.

Don't forget you'll also need to create the **settings.toml** file as seen above, with your WiFi ssid and password.

In a serial console, you should see something like the following. For more information about connecting with a serial console, view the guide [Connecting to the Serial Console](https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console).

```terminal
&gt;&gt;&gt; import wifitest
ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. 1.7.5
MAC addr: 24:C9:DC:BD:0F:3F
	HomeNetwork             RSSI: -46
	HomeNetwork             RSSI: -76
	Fios-12345              RSSI: -92
	FiOS-AB123              RSSI: -92
	NETGEAR53               RSSI: -93
Connecting to AP...
Connected to HomeNetwork 	RSSI: -45
My IP address is 192.168.1.245
IP lookup adafruit.com: 104.20.39.240
Ping google.com: 30 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------

Fetching json from http://wifitest.adafruit.com/testwifi/sample.json
----------------------------------------
{'fun': True, 'company': 'Adafruit', 'founded': 2005, 'primes': [2, 3, 5], 'pi': 3.14, 'mixed': [False, None, 3, True, 2.7, 'cheese']}
----------------------------------------
Done!
```

Going over the example above, here's a breakdown of what the program is doing:

- Initialize the ESP32 over SPI using the SPI port and 3 control pins:

```python
esp32_cs = DigitalInOut(board.ESP_CS)
esp32_ready = DigitalInOut(board.ESP_BUSY)
esp32_reset = DigitalInOut(board.ESP_RESET)

#...

else:
    spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
```

- Get the socket pool and the SSL context, and then tell the `adafruit_requests` library about them.

```python
pool = adafruit_connection_manager.get_radio_socketpool(esp)
ssl_context = adafruit_connection_manager.get_radio_ssl_context(esp)
requests = adafruit_requests.Session(pool, ssl_context)
```

- Verify an ESP32 is found, checks the firmware and MAC address

```auto
if esp.status == adafruit_esp32spi.WL_IDLE_STATUS:
    print("ESP32 found and in idle mode")
print("Firmware vers.", esp.firmware_version)
print("MAC addr:", ":".join("%02X" % byte for byte in esp.MAC_address))
```

- Perform a scan of all access points it can see and print out the name and signal strength.

```python
for ap in esp.scan_networks():
    print("\t%-23s RSSI: %d" % (ap.ssid, ap.rssi))
```

- Connect to the AP we've defined here, then print out the local IP address. Then attempt to do a domain name lookup and ping google.com to check network connectivity. (Note sometimes the ping fails or takes a while; this isn't a big deal.)

```python
print("Connecting to AP...")
while not esp.is_connected:
    try:
        esp.connect_AP(ssid, password)
    except OSError as e:
        print("could not connect to AP, retrying: ", e)
        continue
print("Connected to", esp.ap_info.ssid, "\tRSSI:", esp.ap_info.rssi)
print("My IP address is", esp.ipv4_address)
print(
    "IP lookup adafruit.com: %s" % esp.pretty_ip(esp.get_host_by_name("adafruit.com"))
)
```

Now we're getting to the really interesting part of the example program. We've written a library for web fetching web data, named [adafruit\_requests](https://github.com/adafruit/Adafruit_CircuitPython_Requests). It is a lot like the regular Python library named [requests](https://requests.readthedocs.io/en/latest/). This library allows you to send HTTP and HTTPS requests easily and provides helpful methods for parsing the response from the server.

- Here is the part of the example program is fetching text data from a URL.

```python
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"  # Further up in the program

# ...

print("Fetching text from", TEXT_URL)
r = requests.get(TEXT_URL)
print('-' * 40)
print(r.text)
print('-' * 40)
r.close()
```

- Finally, here the program is fetching some JSON data. The `adafruit_requests` library will parse the JSON into a Python dictionary whose structure is the same as the structure of the JSON.

```auto
JSON_URL = "http://wifitest.adafruit.com/testwifi/sample.json"   # Further up in the program

# ...

print("Fetching json from", JSON_URL)
r = requests.get(JSON_URL)
print('-' * 40)
print(r.json())
print('-' * 40)
r.close()
```

# Advanced Requests Usage

Want to send custom HTTP headers, parse the response as raw bytes, or handle a response's http status code in your CircuitPython code?

We've written an&nbsp;example to show advanced usage of the requests module below.

To use with CircuitPython, you need to first install a few libraries, into the lib folder on your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file. Extract the contents of the zip file, open the directory **examples/** and then click on the directory that matches the version of CircuitPython you're using and copy the contents of that directory to your **CIRCUITPY** drive.

https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/main/examples/esp32spi/requests_esp32spi_advanced.py

Your **CIRCUITPY** drive should now look similar to the following image:

![CIRCUITPY](https://adafruit.github.io/Adafruit_CircuitPython_Bundle/requests_esp32spi_requests_esp32spi_advanced.py.png )

# WiFi Manager

The way the examples above connect to WiFi works but it's a little finicky. Since WiFi is not necessarily so reliable, you may have disconnects and need to reconnect. For more advanced uses, we recommend using the `WiFiManager` class. It will wrap the connection/status/requests loop for you - reconnecting if WiFi drops, resetting the ESP32 if it gets into a bad state, etc.

Here's a more advanced example that shows using the `WiFiManager` and also how to fetch the current time from a web source.

https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/blob/main/examples/esp32spi_localtime.py

# Further Information

For more information on the basics of doing networking in CircuitPython, see this guide:

### Networking in CircuitPython

[Networking in CircuitPython](https://learn.adafruit.com/networking-in-circuitpython)
# Air Quality Sensor 3D Printed Enclosure

## Code Usage

## Text Editor

Adafruit recommends using the Mu editor for editing your CircuitPython code. You can get more info in&nbsp;[this guide](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor).

Alternatively, you can use any text editor that saves simple text files.

## Secrets File Setup

Open the&nbsp; **secrets.py&nbsp;** file on your CircuitPython device using Mu or your favorite text editor. You're going to edit this file to enter your WiFi credentials along with your keys.&nbsp;

- **Change** &nbsp;`ssid`&nbsp;to&nbsp; **the name of your WiFi network**
- **Change&nbsp;** `password`&nbsp;to&nbsp; **your WiFi network's password&nbsp;**
- **Change&nbsp;** `aio_user`&nbsp;to&nbsp; **your Adafruit IO Username**
- **Change&nbsp;** `aio_key`&nbsp;to&nbsp; **your Adafruit IO Key**.

```python
secrets = {
    'ssid' : 'home ssid',
    'password' : 'my password',
    'timezone' : "America/New_York", # http://worldtimeapi.org/timezones
    'aio_user' : 'MY_ADAFRUIT_IO_USERNAME',
    'aio_key' : 'MY_ADAFRUIT_IO_KEY',
    'latitude': MY_LAT, # https://www.latlong.net/
    'longitude': MY_LON,
    'elevation': MY_ELE
    }
```

Next, let's to add your location's latitude, longitude and altitude data to the secrets file. Entering your location will allow the Map Block to show an image of your sensor's location.

**For privacy reasons, we suggest limiting your location data to your city, town, or municipality**. Instead of setting our sensor's location to Adafruit's exact address, we'll set it to New York City.

[Navigate to this website to find your location's GPS latitude, longitude and altitude coordinates](https://www.maps.ie/coordinates.html) and enter your city/town.

![](https://cdn-learn.adafruit.com/assets/assets/000/096/741/medium800/sensors_temperature___humidity_GPS_coordinates_on_Google_Maps___Latitude_Longitude_Search.png?1604507976)

In the secrets file, change `MY_LAT`, `MY_LON`, and `MY_ELE` to the values obtained from the website above.

## Code

Click the Download: Project Zip File link below in the code window to get a zip file with all the files needed for the project. Copy&nbsp; **code.py** &nbsp;from the zip file and place on the&nbsp; **CIRCUITPY** &nbsp;drive which appears when your board is plugged into your computer via a known good USB cable.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Adafruit_IO_Air_Quality/code.py

Once all the files are copied from your computer to the Feather, you should have the following files on your&nbsp; **CIRCUITPY** &nbsp;drive:

![](https://cdn-learn.adafruit.com/assets/assets/000/096/743/medium800/sensors_lib.png?1604511291)

## Modify Code

The **code.py** file is configured for an Air Quality Sensor using a BME280 and PMS5003 sensors. You'll need to open a text editor and make the following modifications in the **code.py** file for the BME680 and PMSA003l.

**Change out the following lines** from

`uart = busio.UART(board.TX, board.RX, baudrate=9600)`

`pm25 = adafruit_pm25.PM25_UART(uart, reset_pin)`

to

`# uart = busio.UART(board.TX, board.RX, baudrate=9600)`

`# pm25 = adafruit_pm25.PM25_UART(uart, reset_pin)`

**Change the following line** from

`bme_sensor = adafruit_bme280.Adafruit_BME280_I2C(i2c)`

to&nbsp;

`# bme_sensor = adafruit_bme280.Adafruit_BME280_I2C(i2c)`

Then, **uncomment the following lines** to enable the PMSA003I and BME680 sensors:

```python
# Uncomment below for PMSA003I Air Quality Breakout
pm25 = adafruit_pm25.PM25_I2C(i2c, reset_pin)

# Uncomment below for BME680
import adafruit_bme680
bme_sensor = adafruit_bme680.Adafruit_BME680_I2C(i2c)
```

## Code Usage

Before permanently installing the sensor, you should test the sensor to make sure the sensors are wired correctly and the board can publish data to Adafruit IO.

 **Plug the sensor into a mini-USB power cable**. and **navigate to the Adafruit IO Dashboard you created earlier**. Every ten minutes all the blocks populate with values.

Since the air quality index values are measured in real-time, they may be higher than EPA NowCast real-time AQI values. After a day of the sensor capturing and logging data, the AQI - 1 Day line chart block will display air quality measurements every hour for the previous day.

![](https://cdn-learn.adafruit.com/assets/assets/000/096/742/medium800/sensors_temperature___humidity_IO_-_My_Air_Quality_Sensor.png?1604508207)

Note - the BME280 sensor may fluctuate +/- 1 to +/- 2 degrees due to the temperature of the sensor inside the case.

# Air Quality Sensor 3D Printed Enclosure

## 3D Printing

## Parts List

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below.

![sensors_3d-parts-b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/630/medium640/sensors_3d-parts-b.jpg?1604327151)

 **File names**

- silo-case.stl
- silo-roof.stl
- bottom-pms5003.stl
- bottom-pmsa003i.stl
- mounting-plate.stl
- pcb-mount.stl
- tripod-plate.stl
- PG7-plug.stl
- pmsa003i-bracket.stl

[Download STLs](https://cdn-learn.adafruit.com/assets/assets/000/096/631/original/STLs.zip?1604327222)
[Download source (STEP, F360)](https://cdn-learn.adafruit.com/assets/assets/000/096/870/original/cad.zip?1604718336)
## Heat Set Inserts

The case uses 4x M3 x 4mm long heat set inserts to secure the PCB mount and bottom cover. The case is sized for the heat set inserts that are stocked in the Adafruit shop.

![sensors_heatsets-m3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/641/medium640/sensors_heatsets-m3.jpg?1604328660)

## Heat Set Rig

Optionally use our 3D printed Heat Set rig to install the heat sets.

![sensors_heatset-rig.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/643/medium640/sensors_heatset-rig.jpg?1604328721)

[Heat Set Rig Learn Guide](https://learn.adafruit.com/heat-set-rig)
## Install Heat Set Inserts

Use a heat-set insert for your soldering iron to install the heat set inserts.

![sensors_heatsets-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/642/medium640/sensors_heatsets-installed.jpg?1604328673)

### Brass Heat-Set Inserts for Plastic - M3 x 4mm - 50 pack

[Brass Heat-Set Inserts for Plastic - M3 x 4mm - 50 pack](https://www.adafruit.com/product/4255)
Wanna improve the connection strength between your project's 3D-printed parts, and also have nice clean surfaces? Instead of gluing bits together, or screwing plastic screws directly into your 3D prints, use strong and reusable machine screws and heat-set inserts. Heat set inserts are only...

In Stock
[Buy Now](https://www.adafruit.com/product/4255)
[Related Guides to the Product](https://learn.adafruit.com/products/4255/guides)
![pile of 50 Brass Heat-Set Inserts for Plastic - M3 x 4mm.](https://cdn-shop.adafruit.com/640x480/4255-02.jpg)

# Air Quality Sensor 3D Printed Enclosure

## Assembly

## Install PG-7 Cable Gland

Fit the PG-7 size cable gland into the 3d printed PG7-plug.stl part. Fit the cable gland into the&nbsp; hole on the side of the case. It should have a tight fitting. Optionally use hot glue to seal the hole.

![sensors_pg7-plug-insatlled.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/657/medium640/sensors_pg7-plug-insatlled.jpg?1604332111)

![sensors_pg7-plugged.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/658/medium640/sensors_pg7-plugged.jpg?1604330304)

## Installing USB Extension Cable

Cut the USB Micro B end off the USB extension cable, leaving the Type A connector in-tacked. Insert and thread the USB wires through the PG7 size cable gland.

![sensors_usb-silo-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/654/medium640/sensors_usb-silo-install.jpg?1604332065)

## Micro USB connector Wired

Solder the wires from the USB cable to the micro USB B connector from earlier. Use pieces of heat shrink tubing to insulate exposed wires.

![sensors_usb-micro-silo-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/655/medium640/sensors_usb-micro-silo-installed.jpg?1604330222)

## Hardware for Case Mounting Plate

Use the following hardware to secure the mounting plate to the case.

- 4x M3 hex nuts
- 4x M3 x 20mm M-F standoffs
- 4x M3 x 8mm flat head machine screws

![sensors_silo-hardware.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/665/medium640/sensors_silo-hardware.jpg?1604332409)

## Install Standoffs to Silo Case

Insert and place the M3 hex nuts into the recesses inside the case. While holding hex nuts in place, insert and fasten the M3 standoffs. Repeat process for all four standoffs.

![sensors_silo-nuts-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/659/medium640/sensors_silo-nuts-install.jpg?1604330429)

![sensors_silo-standoffs-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/660/medium640/sensors_silo-standoffs-install.jpg?1604332133)

## Install Mounting Plate

Place the mounting plate over the standoffs and line up the mounting holes. Insert and fasten 4x M3 x 8mm flat head machine screws to secure the mounting plate.

![sensors_silo-plate-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/668/medium640/sensors_silo-plate-install.jpg?1604332447)

![sensors_usb-cable-long.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/669/medium640/sensors_usb-cable-long.jpg?1604332821)

## Hardware for FeatherWing Doubler

Use the following hardware for the FeatherWing Doubler.

- 8x M2.5 x 6mm button head machine screws
- 4x M2.5 x 6mm FF standoffs

![sensors_featherwing-hardware.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/638/medium640/sensors_featherwing-hardware.jpg?1604328409)

## FeatherWing Hardware Installed

Secure the M2.5 screws and standoffs to the corner mounting holes on the FeatherWing Doubler. Use the screws to secure the standoffs.

![sensors_featherwing-mount-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/639/medium640/sensors_featherwing-mount-installed.jpg?1604329234)

## Install PCB Mount to FeatherWing Doubler

Place the PCB mount over the standoffs and line up the mounting holes. Use the M2.5 screws to secure the PCB mount to the FeatherWing Doubler.

![sensors_featherwing-mount-installed-side.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/640/medium640/sensors_featherwing-mount-installed-side.jpg?1604328537)

## Install and Secure PMSA003i

Use 2x M3 x 6mm long button head machine screws to secure the PMSA003i to the bottom cover. Fit the PMSA003i into the bottom cover and line up the holes. Fit the 3D printed bracket over the PMSA003i and secure using the 2x M3 screws.

![sensors_pmsa003i-mount.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/644/medium640/sensors_pmsa003i-mount.jpg?1604329655)

![sensors_pmsa003i-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/645/medium640/sensors_pmsa003i-install.jpg?1604328824)

## Secure and Install BME680

Use 2x M2.5 x 6mm flat head machine screws to secure the BME680 to the bottom cover. Use the photo to reference correct placement and orientation.

![sensors_bme680-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/650/medium640/sensors_bme680-screws.jpg?1604330607)

![sensors_bme680-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/651/medium640/sensors_bme680-installed.jpg?1604329234)

## BME680 + PMSA003i Connect STEMMA

Use the STEMMA cable to connect the BME680 to the PMSA003i.

![sensors_feather-bme680-stemma.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/652/medium640/sensors_feather-bme680-stemma.jpg?1604330693)

## Install & Secure BME280

Use 2x M2.5 x 6mm flat head machine screws to secure the BME280 to the bottom cover. Use the photo to reference correct placement and orientation.

![sensors_bme280-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/646/medium640/sensors_bme280-screws.jpg?1604328863)

![sensors_bme280-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/647/medium640/sensors_bme280-secured.jpg?1604329234)

## Install PMS5003

The PMS5003 press fits into the holder that's built into the bottom cover. Use the holes in the bottom to correctly line up the PMS5003.

![sensors_pms5003-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/648/medium640/sensors_pms5003-installed.jpg?1604329937)

![sensors_pms5003-bottom.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/649/medium640/sensors_pms5003-bottom.jpg?1604329966)

## BME280 + PMS5003 Connect

Connect the included cable to the PMS5003 and the breakout adapter. The breakout can optionally be secured to the bottom of the PCB mount.

![sensors_pms5003-feather-connect.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/653/medium640/sensors_pms5003-feather-connect.jpg?1604329300)

## Install & Secure PCB Mount

Fit the PCB mount through the bottom of the case and pull it out from the top. Plug in the AirLift FeatherWing and Feather M4 to the Doubler. Plug in the micro USB cable to the Feather M4.

Use 2x M3 x 6mm button head machine screws to secure the PCB mount to the tabs inside the case. Reference photo for best placement and orientation.

![sensors_silo-feather-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/663/medium640/sensors_silo-feather-install.jpg?1604332406)

![sensors_silo-feather-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/664/medium640/sensors_silo-feather-secure.jpg?1604331037)

## Install & Secure Bottom Cover

Fit any excess wiring into the case. Fit the bottom cover into the case and line up the mounting holes. Press fit the bottom cover into the case.

Use 2x M3 x 6mm thumb screws to secure the bottom cover to the case.

![sensors_silo-psma003i-bottom-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/662/medium640/sensors_silo-psma003i-bottom-install.jpg?1604332289)

![sensors_silo-pmsa003i-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/671/medium640/sensors_silo-pmsa003i-secured.jpg?1604332969)

## Install Top Roof

Fit the roof piece over the top of the case. Line up the threads and begin to screw the top cover . Unscrew the top cover to remove it.

![sensors_silo-top-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/670/medium640/sensors_silo-top-install.jpg?1604332880)

## Final Build

Hurray! The build is complete. Start to plan where this thing is going to be mounted. Depending on your application, you my need to create your own method of mounting.

![sensors_final-build.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/693/medium640/sensors_final-build.jpg?1604343372)

## Wall Mount

Find a good spot to secure the mounting plate. Outside our entrance was a key lockbox that we repurposed for the screw holes. Use M5 (sheet metal or wood) screws to secure the mounting plate. Optionally use double-sided foam tape, hotglue, 3M adhesive or the like.&nbsp;

To power the Feather, plug in the USB cable to a 5V wall adapter.

![sensors_wall-mount.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/683/medium640/sensors_wall-mount.jpg?1604336829)

![sensors_wall-mount-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/096/684/medium640/sensors_wall-mount-installed.jpg?1604336870)

![](https://cdn-learn.adafruit.com/assets/assets/000/096/694/medium800/sensors_hero-guide.jpg?1604343612)


## Featured Products

### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
### Adafruit AirLift FeatherWing – ESP32 WiFi Co-Processor

[Adafruit AirLift FeatherWing – ESP32 WiFi Co-Processor](https://www.adafruit.com/product/4264)
Give your Feather project a _lift_ with the Adafruit AirLift FeatherWing - a FeatherWing that lets you use the powerful ESP32 as a WiFi co-processor. You probably have your favorite Feather ([like the Feather M4](https://www.adafruit.com/product/3857)) that comes with its own...

In Stock
[Buy Now](https://www.adafruit.com/product/4264)
[Related Guides to the Product](https://learn.adafruit.com/products/4264/guides)
### PM2.5 Air Quality Sensor and Breadboard Adapter Kit

[PM2.5 Air Quality Sensor and Breadboard Adapter Kit](https://www.adafruit.com/product/3686)
Breathe easy, knowing that you can track and sense the quality of the air around you with th **e PM2.5&nbsp;Air Quality Sensor with Breadboard Adapter** particulate sensor. [Mad Max & Furiosa definitely should have hooked up one of...](https://en.wikipedia.org/wiki/Mad_Max)

In Stock
[Buy Now](https://www.adafruit.com/product/3686)
[Related Guides to the Product](https://learn.adafruit.com/products/3686/guides)
### Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor

[Adafruit BME280 I2C or SPI Temperature Humidity Pressure Sensor](https://www.adafruit.com/product/2652)
Bosch has stepped up their game with their new BME280 sensor, an environmental sensor with temperature, barometric pressure&nbsp;and&nbsp;humidity! This sensor is great for all sorts of indoor environmental sensing and can even be used in both I2C and SPI!

This precision sensor from...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2652)
[Related Guides to the Product](https://learn.adafruit.com/products/2652/guides)
### FeatherWing Doubler - Prototyping Add-on For All Feather Boards

[FeatherWing Doubler - Prototyping Add-on For All Feather Boards](https://www.adafruit.com/product/2890)
This is the **FeatherWing Doubler** - a prototyping add-on and more for all Feather boards. This is similar to our [FeatherWing Proto](https://www.adafruit.com/products/2884) except there are two! The magic of the Doubler comes when stacking a Feather and another...

In Stock
[Buy Now](https://www.adafruit.com/product/2890)
[Related Guides to the Product](https://learn.adafruit.com/products/2890/guides)
### Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor

[Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor](https://www.adafruit.com/product/3660)
The long awaited BME680 from Bosch gives you&nbsp;_all the environmental sensing you want_&nbsp;in one small package. This little sensor contains&nbsp; **temperature** ,&nbsp; **humidity** ,&nbsp; **barometric pressure,** &nbsp;and&nbsp; **VOC...**

In Stock
[Buy Now](https://www.adafruit.com/product/3660)
[Related Guides to the Product](https://learn.adafruit.com/products/3660/guides)
### Adafruit PMSA003I Air Quality Breakout

[Adafruit PMSA003I Air Quality Breakout](https://www.adafruit.com/product/4632)
Breathe easy, knowing that you can track and sense the quality of the air around you with this **&nbsp;Adafruit PMSA003I Air Quality Breakout**. This sensor is great for monitoring air quality, in a compact plug-in format.

Best of all, unlike almost all other sensors...

In Stock
[Buy Now](https://www.adafruit.com/product/4632)
[Related Guides to the Product](https://learn.adafruit.com/products/4632/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)

## Related Guides

- [Adafruit BME680](https://learn.adafruit.com/adafruit-bme680-humidity-temperature-barometic-pressure-voc-gas.md)
- [Adafruit Feather M4 Express](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51.md)
- [Adafruit AirLift FeatherWing - ESP32 WiFi Co-Processor](https://learn.adafruit.com/adafruit-airlift-featherwing-esp32-wifi-co-processor-featherwing.md)
- [Adafruit PMSA003I Air Quality Breakout](https://learn.adafruit.com/pmsa003i.md)
- [Daily Cheer Automaton](https://learn.adafruit.com/daily-cheer-automaton.md)
- [Easy Alexa (Echo) Control of your ESP8266 Huzzah](https://learn.adafruit.com/easy-alexa-or-echo-control-of-your-esp8266-huzzah.md)
- [Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller](https://learn.adafruit.com/ocean-epoxy-resin-lightbox-with-rgb-led-matrix-image-scroller.md)
- [CircuitPython displayio Setup for TFT FeatherWings](https://learn.adafruit.com/using-circuitpython-displayio-with-a-tft-featherwing.md)
- [No-Code Offline Data Logger with WipperSnapper](https://learn.adafruit.com/no-code-offline-data-logging-with-wippersnapper.md)
- [Google Docs Sensor Logging From Your PC](https://learn.adafruit.com/gdocs-sensor-logging-from-your-pc.md)
- [32x32 Square Pixel Art Animation Display](https://learn.adafruit.com/32x32-square-pixel-display.md)
- [Feather + Raspberry Pi Weather Monitoring Network with LoRa or LoRaWAN](https://learn.adafruit.com/multi-device-lora-temperature-network.md)
- [Make It Glow With Crickit](https://learn.adafruit.com/make-it-glow-with-crickit.md)
- [Haunted Air Blaster](https://learn.adafruit.com/automated-air-blaster.md)
- [DIY Robotic Sky Tracking Astrophotography Mount with CircuitPython](https://learn.adafruit.com/diy-robotic-sky-tracking-astrophotography-mount.md)
- [Adafruit IO Environmental Monitor for Feather or Raspberry Pi](https://learn.adafruit.com/adafruit-io-air-quality-monitor.md)
- [MIDI Laser Harp with Time of Flight Distance Sensors](https://learn.adafruit.com/midi-laser-harp-time-of-flight-sensors.md)
- [Spinning Disc Step Sequencer](https://learn.adafruit.com/spinning-disc-step-sequencer.md)
- [CircuitPython 101: Functions](https://learn.adafruit.com/circuitpython-101-functions.md)
