Skip to main content
Version: ACS CC

AeroGuard: Solar-Powered Atmospheric Pollution Monitor with GPS

Fixed/portable air quality monitoring system, solar-powered, based on Raspberry Pi Pico 2 2350 W

info

Author: DEFTA OVIDIU, 335CC
GitHub Project Link: AeroGuard Project

Description

AeroGuard is a solar-powered air quality monitoring system that measures particulate matter, nitrogen oxides, volatile organic compounds and others. The device detects pollution from combustion and traffic, stores data on a microSD card, and provides access to information through a web server with JSON API and a mobile application.

Motivation

Air pollution is a serious health concern, and having a portable device that can collect accurate data can help people identify polluted zones and take appropriate measures. The system can track pollution trends over time and provide useful information for research.

Another reason I picked this project is that even the sensors can be (are) quite expensive, similar commercial products can be even more expensive. Professional air quality monitors with solar power can cost hundreds of dollars, and many require ongoing subscription fees. Plus, most commercial solutions only measure a limited set of parameters. By building the project myself, I can customize exactly which pollutants to measure based on local needs.

I also designed the project to be completely autonomous with its solar power and local data storage. This means it can work in places without constant electricity or internet access, which is really useful for monitoring remote locations or during power outages.

Finally, I built the system to be modular so it's easy to add new sensors or features as needed. If new pollution concerns emerge or better sensor technology becomes available, I can upgrade parts of the system without having to redesign everything from scratch.

Architecture

Architecture Diagram

The AeroGuard architecture includes the following main components:

  • Sensor Module - collects data about particulate matter, nitrogen oxides, volatile organic compounds, temperature, and humidity
  • GPS Module - provides geolocation data for the measurements
  • Solar Power System - ensures the energy autonomy of the device
  • Storage Module - saves data on the microSD card for later analysis
  • Web Server - provides access to data through JSON API
  • Mobile Application - allows graphical visualization of data, statistics, and map location

Data is collected from sensors, associated with GPS coordinates, stored locally, and transmitted via WiFi to the mobile application or other systems.

Log

Week 24 April - 1 May

I ordered all the necessary components for the project, with most of them already delivered. I conducted initial testing on some components to verify their basic functionality. I've begun developing the hardware schematic in KiCad, but due to the complexity and number of components involved, this work is still in progress. I have specified the interface types and pin connections for all components as detailed below in the hardware section.

Challenges encountered:

  • Lack of appropriate KiCad symbols for the Raspberry Pi Pico 2 W 2350, as only symbols for older versions are readily available
  • No Rust drivers are currently available for the MICS-4514 gas sensor (maybe developing a custom driver or implementing an FFI interface to existing C libraries?)
  • Some uncertainty remains regarding the optimal breadboard connections for certain sensors, particularly those with non-standard pin layouts
  • Still researching the exact design for the power management system to integrate the solar panel, TP4056 charging module, and battery with the Raspberry Pi Pico

Week 5 - 11 May

Week 12 - 18 May

Week 19 - 25 May

Hardware

AeroGuard uses a Raspberry Pi Pico 2 2350 W as the central microcontroller, connected to a series of specialized sensors for air quality monitoring. The system includes:

Sensors

  • PMS5003 particulate matter sensor for PM1.0, PM2.5, and PM10 (UART interface, connected to GPIO0/1)
  • MICS-4514 dual-channel gas sensor for NOx/CO detection (Analog interface, connected to ADC0/ADC1)
  • SGP40 VOC sensor (I2C interface, connected to GPIO4/5)
  • BME280 temperature, humidity, and pressure sensor (I2C/SPI interface, shared I2C bus with SGP40)
  • NEO-6M GPS module (GYNEO6MV2) for position (Lat/Long), altitude, and time/date (UART interface, connected to GPIO8/9)

Power System

  • Solar Panel 12V, 350mA, 4.2W (higher capacity than initially planned)
  • TP4056 Charger with battery charging controller and over/under voltage protection
  • 18650 Battery (3.7V Li-Ion, ~3000mAh capacity) providing power supply for the system

Storage

  • MicroSD Card Module (SPI interface, connected to GPIO16-19) for storing pollution history logs, GPS coordinates tracking, and time series data

Connectivity

  • WiFi Access Point using the Pico 2 W's built-in wireless capabilities
  • Server Web & API JSON endpoints for current data, historical data, battery status, and GPS location
  • Mobile Application interface for pollution trend graphs, map visualization, battery/solar charging monitoring, and pollution level alerts

Additional Components

  • Breadboard for prototyping
  • Jumper wires for connections
  • Resistors (10kΩ, 4.7kΩ) for pull-ups and voltage dividers
  • Capacitors (100nF, 10μF) for power stabilization
  • Protective enclosure (TBD to accommodate all components)

Schematics

The hardware schematic is being developed in KiCad.

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico 2 2350 WCentral microcontroller40 RON
PMS5003 Particle SensorMeasuring particulate matter (PM1.0, PM2.5, PM10)139 RON
MICS-4514 NOx/CO SensorDetection of nitrogen oxides and carbon monoxide63 RON
SGP40 VOC SensorMeasuring volatile organic compounds112 RON
BME280 SensorMeasuring temperature and humidity120 RON
NEO-6M GPS ModuleGeolocation70 RON
12V/4.2W Solar PanelSolar power70 RON
TP4056 Charging ModuleBattery charging management15 RON
[18650 Li-Ion Battery]Energy storage (3.7V, 2000mAh)35 RON
[Modul MicroSD]Data storage4 RON
BreadboardPrototyping30 RON
[Jumper Wires, Resistors, Capacitors, etc.]Component connections60 RON

Software

LibraryDescriptionUsage
embassy-rsAsynchronous framework for microcontrollersBasic application architecture
embassy-timeTime functionalities for EmbassyManagement of timed operations
embassy-rpSupport for Raspberry Pi PicoInterfacing with Pico hardware
embassy-netNetwork stack for EmbassyWiFi communication
embedded-halHardware abstractions for embeddedPeripheral interfacing
serdeData serialization/deserializationData processing
serde_json_coreJSON support for embeddedJSON API
heaplessData structures without dynamic allocationEfficient memory management
defmtLogging for embeddedDebugging and monitoring
embedded-sdmmcSupport for microSD cardData storage on SD card
bme280Driver for BME280 sensorTemperature/humidity/pressure measurement
picoserveLightweight HTTP serverServing data via web
nmea0183Parser for GPS dataProcessing location data
sgp40-driverDriver for SGP40 sensorMeasuring volatile organic compounds
pms5003-driverDriver for PMS5003 sensorMeasuring particulate matter
  1. Raspberry Pi Pico W Documentation
  2. Embassy-rs Framework
  3. Embedded Rust Programming