The AirGradient ONE Air Quality Sensor (Presoldered-Version, PCB Version 9)

Introduction

These build instructions cover the pre-soldered version of the AirGradient ONE monitor kit for PCB version 9. It is the successor of the DIY Pro series and combines the best features of the DIY and (formerly closed source) AirGradient ONE series. If you have a different version please find your correct build instructions in this overview. The version number is printed on the PCB.

The AirGradient ONE monitor measures PM, CO2, TVOC, NOx, temperature and relative humidity. These measures can be shown on the display and sent to a server (e.g. the AirGradient platform or any other cloud backend) for data logging.

You can purchase the kit with all components from our Online Store and be sure that everything fits. We ship world-wide.

Fully assembled AirGradient ONE PCB

This new version contains a RGB LED bar on the backside of the PCB that can be used to visualize the air quality with different colors. All 11 LEDs are individually addressable.

New RGB LED bar that shines through the enclosure

Video Tutorial (for previous version)

In case you have any problems after completing the build, you can check the trouble shooting section.

Skills And Equipment Required

For this project you should be familiar with the following:

Skill Description
Computer A Linux, Mac, or Windows computer with the Arduino IDE installed to flash the software onto the ESP-C3. You can also flash the software directly from the browser.
Screwdriver You need a Torx (T6) screwdriver which is included in the kit.

Components

Below is the list of components that you will receive with the pre-soldered kit:

Component Approx. Price
AirGradient ONE PCB v9 with ESP32-C3-MINI, OLED Display, connectors and pin sockets
Plantower PMS5003 PM Sensor with cable
Senseair S8 CO2 Sensor with pre-soldered pins
SHT4x Temperature and Humidity Sensor Module with pre-soldered pins
SGP41 TVOC / NOx Sensor Module with pre-soldered pins
USB-C Cable 90-degree head
Enclosure UV-resistant injection molded ASA plastic
Screws for Enclosure M1.8x10 (Torx T6)
Screws for PCB M2*4.5 (Torx T6)
Screws for PM Sensor M2*4.5 (Torx t6). Same screws as for PCB.

Schematics

The schematics (right click and open image in new tab for full screen)

Assembly

The assembly of the pre-soldered parts is very simple, just make sure you mount the components in the correct direction. The labels on the components should match the labels on the PCB. The PCB might come in blue or black color but are functionally identical.

Location of the Components on the PCB

We recommend you start in the following order:

ESP32-C3 Mini

The board already contains the ESP-C3-MINI microcontroller installed so there is nothing you need to do. Please note that it is connected to the USB connector on the board so that it can be flashed through the USB port.

There are also two buttons below which you might need during the flashing process.

ESP32-C3-MINI

SHT40 Module (Temperature and Humidity Sensor)

Install the SHT4x module as per the picture below. It is put on the pin headers at the bottom left of the board labelled “SHT1”. Note that the SGP4x (TVOC) module looks very similar. So make sure you install the SHT module which is labelled “SHT4x”.

Please make sure that the module faces outwards.

SHT4x Module

Senseair S8 Module (CO2 Sensor)

Put the CO2 Module onto the pin sockets labelled “CO2 Sensor”. Make sure that the orientation is correct and all pins slide into the sockets.

SHT Module

The CO2 sensor uses a 7-day automatic baseline calibration and thus might need some time to become accurate.

PMS5003 (PMS Sensor)

The PMS Sensor is connected with the enclosed cable to the PCBs JST connector labelled “PMS”. Please note that we use a cross-over cable and thus the longer cable that is often shipped with the PMS5003 sensor will not work. You need to press the cables into the PM sensor and connector tightly.

Please ensure that the cable is fully plugged in on both ends.

PMS Location
PMS JST Connector
Screws for PMS Sensor

Then screw the PMS5003 onto the PCB.

SGP41 AirGradient TVOC / NOx Module

The TVOC / NOx module is mounted in the slot in the top left corner labelled “I2C3”.

Please make sure you mount the module in the correct orientation. The sensor needs to face outwards.

Testing And Putting It Into The Enclosure

Now you can power on the device, and you should be able to see the display lighting up. If you flashed the Wi-Fi version, you need to connect it to the Wi-Fi. To do this open you Wi-Fi settings on the phone and look for a hot spot called “airgradient-______” and use the password “cleanair” to connect to it. Then follow the instructions and enter your Wi-Fi network credentials. It will then connect to Wi-Fi and start displaying and sending the air quality data. To use the AirGradient dashboard, you also need to register the device. To do so please follow the onboarding process.

If everything works, you can screw the PCB into the top cover of the enclosure and close the enclosure.

Screws for PCB

Then screw them on both sides (each 2 screws).

Location for PCB screws

Once the PCB is firmly screwed on the top part of the enclosure, you can close the enclosure with the longer screws.

Screws for enclosure

The enclosure screws are going on the four sides into the ventilation vents:

Location for enclosure screws

Please note that the mini screwdriver enclosed with the kit might not have enough torque to screw these screws in. In that case, please use a larger T6 screwdriver, or you can also put some oil/soap on the screws to make them go in easier.

Soap helps getting the screws into the enclosure in case you use the mini screwdriver

Power Supply

The power supply is not included in the kit. Please get a standard 5v, 2A power supply.

Direct Flashing Through The Browser

In case you have received the new AirGradient 9PSL as a kit version, we strongly recommend you update the firmware because we have recently fixed a few bugs that might affect your device.

You can either manually flash the code through the Arduino software or use the simple button below. Connect the board to your computer through a data-capable cable and press the button below. Make sure you use the Chrome or Edge browsers on your computer for this to work.

Version 3.1.4 Release

Your browser doesn't support this. Please use Chrome or Edge on Mac or PC. You are not allowed to use this on HTTP!

Older firmware versions and change logs are available here.

BOOT Error During Flashing

In case you get an error called “Failed to initialize. Try resetting your device or holding the BOOT button while clicking INSTALL” during the flashing, you need to put the board into a special boot mode. To do this please follow below steps:

  1. Push the button labelled "BOOT SW" on the PCB and keep it pushed. This is also the button behind the small hole next to the USB connector on the enclosure. So if you don't want to open the enclosure you can also press it with a small screwdriver through the enclosure.
  2. Plug in the USB C cable
  3. Release the button. If you do not do this, the board will not get into the flash mode.
  4. Press the blue button above
  5. Select the serial port your monitor is connected to. It is typically called “USB JTAG / Serial Debug”
  6. Follow the instructions for flashing. In case you want to delete previously saved WiFi passwords on the device, check the box 'Erase the Device'.
  7. After the flashing is complete, restart the monitor by unplugging the USB C cable (and plugging it back in)

Once the code is flashed, it will open a hotspot for 180 seconds to which you can connect (if prompted for a password use ‘cleanair’) and then set your Wi-Fi credentials. By default it will connect to the AirGradient Dashboard. If you want to use another endpoint you can change the code with the manual flashing method below.

If you do not connect it to Wi-Fi within the 180 seconds after startup it will go into the offline mode and show the air quality parameters without sending the data.

Logging Instructions

Follow below to see debug messages and logs of the monitor:

  1. Plug in the USB C cable
  2. Press the blue button above
  3. Select the serial port your monitor is connected to. It is typically called “USB JTAG / Serial Debug”
  4. Click on “Logs & Console”
  5. Click on “Reset Device” to reboot the monitor
  6. Now you can see the debug messages and also identify the serial number.

AirGradient Dashboard

Connecting the monitor to the AirGradient Dashboard is a two-step process. You need to connect your monitor to the WiFi network and register it on the dashboard. To do so, the easiest way is to use our onboarding wizard:

https://app.airgradient.com/onboarding/welcome

In case you only want to connect the WiFi or have some problems, please check out our knowledge base articles.

Configuration

From version 3 of the firmware upwards, the following configurations can be set on the AirGradient dashboard:

  • Unit of temperature (°C or °F)
  • LED bar on or off
  • PM2.5 in μg/m³ or US AQI
  • CO2 baseline calibration
  • Set CO2 baseline duration
  • TVOC and NOx sensor module settings

If you like to switch the LED bar off or change what is displayed (PM or CO2), you can do so under the ‘Location Administration’ for each monitor. In that location list click, ‘Actions, ‘Edit Location’ and then you can select the LED mode in the dialog box.

Forced CO2 Baseline Calibration

The firmware version 3 and higher now also supports to force calibration of the CO2 sensor to 400ppm (average outdoor CO2 level). To do the calibration, please follow these steps:

  • Put the monitor outside or open all windows for at least 20 minutes. Ensure you have ambient CO2 levels at the monitor
  • Go to the ‘Hardware Administration’ page on the dashboard and click on ‘Actions’, ‘Edit Sensor’.
  • Check “Request CO2 calibration”
  • Click Save

Wait for a few minutes. The monitor should then display around 400ppm.

Home Assistant and Local Server

From version 3 onwards, the firmware also has native Home Assistant support and should get auto discovered. Additionally, there is a local server exposed that can be used to read data directly from the monitor in a local network (and set configuration parameters).

Trouble Shooting

Here is a list of common issues and how to resolve them.

Behavior Potential Reason Fix
Nothing happens when powering on the device. No text on the display. TVOC or Temp/RH modules mounted the wrong way. Make sure that the small modules for TVOC and Temperature/Humidity measurement are mounted correctly with the chip and small airgradient logo facing outwards.
Device does not open WiFi hotspot. Old firmware version. Reflash the firmware through the steps outlines above.
Device does not remember WiFi password after reboot. Old firmware version. Reflash the firmware through the steps outlines above.
Enclosure screws hard to put in with small screwdriver. Put some soap on the screws or use a larger T6 one.
PM or CO2 shows -1 or -3 on the display Sensor module not connected properly. Make sure that the sensors are plugged in correctly and that the cable is firmly connected.
TVOC shows 0 Sensor module not warmed up yet. The TVOC module needs around 1-2 minutes to warm up before it shows values.
TVOC shows 0 NOx module not very sensitive. In most cases NOx is around 0 or 1. Only in cases of very high concentrations it will rise above that.
PM shows 0 Very good air quality. It is not uncommon to have very good air quality and to have 0 PM. If you are unsure if your PM sensor works, create a bit of smoke e.g. with a candle and check if the PM goes up.

Manual Flashing With The Arduino Software

The above direct flashing is the easiest way to get the firmware onto the board but if you want to make changes to the code, you can also flash the code through the Arduino software environment. All software for the AirGradient DIY sensor is open source, and thus you can make any changes you’d like.

Please read the following blog post on how to install the Arduino software, set up the ESP32-C3 and the AirGradient Arduino library.

AirGradient Arduino Software Setup Instructions

Flashing Of The AirGradient Firmware

Once you have the Arduino Software setup for the ESP32-C3, you can flash it with the AirGradient firmware.

Step Description
1 Go to Tools, Manage Libraries, and then search for AirGradient and install the AirGradient library.
2 Once it is installed, go to File, Example, AirGradient and select the OneOpenAir.ino code
3 Read the instructions on top of the example code and install the additional libraries
4 Then flash this code the same way you flashed the BLINK example

CC BY-SA 4.0 Attribution-ShareAlike 4.0 International

This work is licensed under CC BY-SA 4.0.

This license requires that reusers give credit to the creator. If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

Copyright AirGradient Co. Ltd.