What an Arduino Air Quality Monitor Is and Why It Matters
An Arduino air quality monitor is a DIY electronic system that uses microcontroller hardware and particulate sensors to measure indoor pollution levels in real time, helping you track PM2.5 and related metrics for health, research, or smart home automation. In this guide, you will build one using the Arduino GIGA R1 WiFi and the DFRobot PM2.5 Sensor SEN0460. The GIGA R1 is a powerful STM32H747XI‑based board with dual cores running at 480 MHz and 240 MHz, plus generous RAM and flash, so it can collect sensor data, log measurements, and connect over Wi‑Fi without strain. The DFRobot PM2.5 sensor uses laser scattering to detect particles from 0.3 µm to 10 µm and reports PM1.0, PM2.5, and PM10 values. This combination is well suited for monitoring air in homes, offices, or labs and for integrating into IoT dashboards.
Hardware You Need and How to Wire the PM2.5 Sensor
To build your DIY air quality sensor, you need an Arduino GIGA R1 WiFi, a DFRobot PM2.5 Sensor SEN0460 (Gravity I2C version), a USB‑C cable, and jumper wires or a Gravity adapter. The GIGA R1 runs at 3.3 V logic, so avoid applying 5 V to GPIO pins, but the SEN0460’s I2C interface accepts 3.3 V signals even when powered from 5 V. According to DFRobot’s documentation, this PM2.5 sensor measures 0–500 µg/m³ (up to 1000 µg/m³ maximum) with 1 µg/m³ resolution, which is suitable for detailed indoor measurements. Use the default I2C bus (Wire) on the GIGA R1: connect sensor VCC to 5 V, GND to GND, SDA to pin 20, and SCL to pin 21. After wiring, you can run an I2C scanner sketch to confirm that the sensor responds at address 0x19 before writing the main program.
Setting Up Arduino GIGA R1 and Installing the PM2.5 Library
Before you start coding, set up the Arduino environment for GIGA R1 projects. Install the latest Arduino IDE from the official site, then open Boards Manager and add the “Arduino Mbed OS GIGA Board Package.” Next, select “Arduino GIGA R1 WiFi” under the Arduino Mbed OS GIGA Boards menu and choose the correct USB‑C port. With the board recognized, you can prepare software support for your PM2.5 sensor Arduino build. Open Library Manager and search for “DFRobot AirQualitySensor,” then install the official library, which handles all low‑level I2C communication and parsing. After installation, example sketches appear under File → Examples → DFRobot_AirQualitySensor, allowing you to verify that the hardware and driver work together. This setup step ensures your air quality monitor can read stable, calibrated PM1.0, PM2.5, and PM10 values once you upload the main sketch.
Writing and Uploading Code for Real‑Time PM2.5 Data
With hardware and libraries ready, you can write code to turn raw readings into a functional Arduino air quality monitor. Include DFRobot_AirQualitySensor.h, define the sensor’s I2C address as 0x19, and create a DFRobot_AirQualitySensor object on the Wire bus. In setup(), begin Serial at 115200 baud, then call particle.begin() in a loop until the sensor responds, printing a message if wiring is wrong. You can also read the firmware version through gainVersion() for confirmation. In loop(), read PM1.0, PM2.5, and PM10 using gainParticleConcentration_ugm3() with the STANDARD particle constants, then print the values in µg/m³. A simple if/else block can classify PM2.5 as Good (≤35), Moderate (≤75), or Unhealthy. Upload the sketch, open Serial Monitor, and you will see live data that you can later push to dashboards, log to SD, or feed into home automation rules.
Expanding to IoT Dashboards and Smart Home Automation
Once you have reliable readings, you can extend this PM2.5 sensor Arduino setup into a richer IoT system. The Arduino GIGA R1’s dual‑core STM32H747XI, 2 MB flash, 1 MB RAM, and 8 MB SDRAM leave plenty of headroom for Wi‑Fi communication, Bluetooth links, or local displays. You can send data to an online dashboard, trigger alerts when PM2.5 crosses thresholds, or integrate with smart plugs and air purifiers. For example, the monitor can switch on ventilation when PM2.5 enters the Unhealthy range, or log detailed histories for environmental research and health tracking. As a DIY air quality monitor, this build avoids the limitations of fixed commercial devices and can be updated with new firmware, extra sensors, or custom enclosures. It is a flexible base for Arduino GIGA R1 projects in smart homes, offices, or educational labs.






