Firmware & Software

Software Architecture

Polverine firmware follows a modular architecture designed for flexibility and ease of customisation. Built on the Arduino/ESP-IDF framework, it leverages the full capabilities of the ESP32-S3 dual-core processor while remaining accessible to developers of all skill levels.

The complete data flow follows a proven IoT pipeline:

Sensors → ESP32-S3 → MQTT → Node-RED → MongoDB → Dashboard

Each stage is independently configurable, allowing you to replace or extend any component without affecting the rest of the stack.

End-to-end Polverine data flow. BMV080 particulate matter and BME690 environmental sensors feed the ESP32-S3 firmware via SPI and I2C. The ESP32-S3 runs sensor drivers, an application layer, and an MQTT client that publishes telemetry over WiFi or BLE to an MQTT broker. Node-RED consumes the topics and routes data to a MongoDB time-series collection, which backs a web dashboard.
Fig. — Polverine end-to-end data flow: sensors → ESP32-S3 firmware layers → MQTT broker → Node-RED → MongoDB → Dashboard. Each stage is replaceable.

Demo Applications

Six ready-to-use firmware examples are included in the repository, progressing from simple sensor reads to a full cloud-connected dashboard.

BMV080 Basic

Read PM2.5 data from the BMV080 particulate matter sensor and output readings to the serial console. A minimal starting point for air quality monitoring.

Arduino SPI Serial

BME690 Environmental

Read temperature, humidity, pressure, and VOC gas data from the BME690 environmental sensor. Demonstrates I²C communication and multi-parameter acquisition.

Arduino I²C Serial

Combined Sensors

Read both BMV080 and BME690 sensors simultaneously with formatted output. Combines PM2.5 with environmental data for comprehensive air quality assessment.

Arduino SPI I²C

WiFi MQTT Publisher

Connect to WiFi and publish sensor data to an MQTT broker. Enables wireless data collection from multiple Polverine devices to a central server.

Arduino WiFi MQTT JSON

BLE Beacon

Broadcast sensor readings via BLE advertising packets. Ideal for mobile app integration and short-range deployments without WiFi infrastructure.

Arduino BLE Beacon

Full Dashboard

Complete end-to-end solution: dual sensor reading, MQTT publishing, Node-RED processing, MongoDB storage, and real-time dashboard visualisation. See the detailed MQTT demo tutorial on Hackster.io.

Arduino WiFi MQTT Node-RED MongoDB

Data Flow

The Polverine data pipeline uses MQTT as its messaging backbone, providing a lightweight and scalable path from sensor to dashboard.

Polverine
BMV080PM1 / PM2.5 / PM10
BME690Temp / Hum / Press / VOC
ESP32-S3MQTT Client + WiFi
InternetWiFi → MQTT Broker
Server
MQTT Broker
Node-REDFlows + OpenWeatherMap API
MongoDBTime-series collections
DashboardNode-RED UI / Grafana
  1. Publish: Polverine devices publish sensor readings to MQTT topics such as polverine/pm25, polverine/temperature, polverine/humidity, and polverine/voc. Each message is JSON-formatted for easy parsing.
  2. Subscribe & Process: Node-RED subscribes to the MQTT topics, applies transformations, threshold alerts, and data enrichment rules via visual flow programming. Optionally integrates with the OpenWeatherMap API for external environmental data (temperature, humidity, barometric pressure, wind speed, cloud cover) to correlate with indoor sensor readings.
  3. Store: Processed data is persisted to MongoDB time-series collections, enabling efficient historical queries and trend analysis.
  4. Visualise: Node-RED Dashboard or Grafana renders real-time charts, gauges, and maps from the stored data, accessible from any web browser.

Repository Structure

  • firmware/
    • bmv080_basic/
    • bme690_basic/
    • combined_sensors/
    • mqtt_publisher/
    • ble_beacon/
    • full_dashboard/
  • hardware/
    • schematic/
    • pcb/
  • docs/
  • README.md

Development Tools

Polverine supports several development environments. Choose the one that best fits your workflow:

  • Arduino IDE — the easiest way to get started. Install the ESP32 board support package by Espressif and open any demo sketch.
  • PlatformIO — recommended for larger projects. Provides dependency management, multi-board builds, and integrated debugging via VS Code.
  • ESP-IDF v5.3 — Espressif’s native framework for advanced users who need full control over the ESP32-S3 SDK and FreeRTOS configuration.
  • Espressif Tools — includes esptool.py for flashing, idf.py monitor for serial output, and the ESP32-S3 partition table editor.

For step-by-step setup instructions, see the Getting Started guide.