board

The basic idea was to create simple air quality monitor. I have used the PMS7003 sensor which is able to measure PM1.0, PM2.5 and PM10.0. This sensor was connected to the Arduino Nano Every. Received data from sensor is available via serial port in human readable format. Additionally, an alert appears when PM2.5 and PM10 exceed the safe limit (the built in LED is this indicator). Below there is diagram with connections:

diagram

In the final solution will be nice to add three RGB leds which by color could display the air quality based on each factor: PM1.0, PM2.5 and PM10.0. Below there is source code:

#include "PMS.h"

PMS pms(Serial1);
PMS::DATA data;

void setup()
{
  Serial.begin(9600);
  Serial1.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, LOW);
}

void loop()
{
  if (pms.read(data))
  {
    Serial.print("PM 1.0 (ug/m3): ");
    Serial.println(data.PM_AE_UG_1_0);

    Serial.print("PM 2.5 (ug/m3): ");
    Serial.println(data.PM_AE_UG_2_5);

    Serial.print("PM 10.0 (ug/m3): ");
    Serial.println(data.PM_AE_UG_10_0);

    Serial.println();

    if (data.PM_AE_UG_2_5 >= 50 ||
        data.PM_AE_UG_10_0 >= 150) {
            digitalWrite(LED_BUILTIN, HIGH);
        } else {
            digitalWrite(LED_BUILTIN, LOW);
        }
  }
}

 

In the video, I ran a quick test with a lit match which shows that took around 3 minutes until air quality level down to acceptable level (second part of movie was speed up 8 times).