PicoSensor (de/en)

For English language version. see below.

Luftqualitätssensor (Überblick)

PicoSensor macht aus einem Raspberry Pi Pico W oder Pico 2 W einen WLAN-Sensor für die Raumluft. Je nach angeschlossenen Sensoren misst das Gerät Temperatur, Luftfeuchte, Luftdruck, CO₂, Feinstaub, VOC/NOx, Formaldehyd, etc..

  • Die Messwerte kann man im Browser komfortabel betrachten: Eine Übersichtsseite mit Kacheln zeigt alle Werte (auch je Sensor) und ein interaktives Diagramm stellt deren zeitlichen verlauf dar (von Stunden bis zu einem Jahr). Ableitbare Werte wie der Taupunkt oder Luftdruck auf Meereshöhe werden aus den Messwerten errechnet. Ein Pico 2 W kann zusätzlich Daten mehrerer Geräte in einem Diagramm vergleichen.
  • Eine LED-Leiste zeigt einen gewählten Messwert einfach an, sodass man auf einen Blick erkennt, man lüften sollte, ein Taster schaltet die angezeigte Messgröße um oder die LEDs für die Nacht ab. Um die Helligkeit der LEDs automatisch zu regeln ist ein Umgebungslichtsensor integriert. Farben der LED-Anzeige können frei konfiguriert werden: Beliebige Farbe jeder LED bei jedem beliebigem Schwellwert.
  • Alle Messwerte lassen sich per MQTT mit automatischer Home-Assistant-Erkennung veröffentlichen; ohne Hausautomatisierung bleibt diese Funktion abgeschaltet.
  • Für anderweitiges automatisiertes Auslesen aller Daten stehen http-Endpunkte, die JSON-Daten liefern, bereit.
  • Die Stromversorgung muss nicht über USB erfolgen – es ist eine zweipolige Federklemme für 5V/500mA vefügbar. Die Stromaufnahme hängt stark von der Helligkeit und Konfiguration der LEDs ab – in Innenräumen bei rund 120-160mA.
  • Im Normalfall ist über die USB-Schnittstelle eine serielle Konsole verfügbar, die verschiedene Diagnose-, Test- und Konfigurationsmöglichkeiten bietet (niemand ist gezwungen sich damit zu beschäftigen ;-))
  • Das Gerät und alle Sensoren lassen sich recht tiefgehend manuell über JSON-Dateien konfigurieren (und somit die Konfiguration auch sichern).
  • Konfiguration und historischen Messwerte werden als Dateien auf einem internen Dateisystem abgelegt (littlefs). Hierauf kann in einem USB Massenspeichermodus, der für den Computer wir FAT16, assieht wie bei einem USB-Stick zugegriffen werden.

Zum Loslegen genügen ein Microcontrollermodul, die Hauptplatine im gedruckten Gehäuse, ein Sensormodul und ein Netzteil oder USB-Kabel. Nach dem Aufspielen der Firmware öffnet das Gerät ein eigenes WLAN namens PicoSensor-Setup; dort trägt man die Zugangsdaten des Heimnetzes ein, danach ist es im Netzwerk erreichbar. Alles Weitere läuft über die Weboberfläche – ohne Benutzerkonto oder Cloudzwang.
Wenn kein WLAN verfügbar ist kann durch den Sensor ein eigenes aufgespannt werden, mit dem man sich mit z.B. mit Laptop verbinden kann um die Daten abzurufen.

Fotos

Handbuch

Ein einfaches Handbuch als pdf-Version ist für technisch weniger versierte Nutzer vorbereitet:

Sensoren

Sensoren werden als Module auf die Hauptplatine gesteckt und lassen sich tauschen oder ergänzen – ein CO₂- oder Feinstaubmodul kann also später dazukommen. Die Hauptplatine nimmt den Pico W oder Pico 2 W auf und stellt zwei I²C-Busse und zwei serielle Anschlüsse für die Module bereit, dazu die LED-Leiste und die Taste. Ein Pico W verwaltet bis zu acht Sensoren (vier je I²C-Bus), ein Pico 2 W bis zu fünfzehn (acht je Bus).

SensorMetrik(en)Schnittstelle
Aosong AHT2xTemperatur, LuftfeuchteI²C
Sensirion SHT4xTemperatur, LuftfeuchteI²C
TI HDC302xTemperatur, LuftfeuchteI²C
Bosch BME280Temperatur, Luftfeuchte, LuftdruckI²C
Bosch BMP581Luftdruck, TemperaturI²C
Sensirion SCD4xCO₂, Temperatur, LuftfeuchteI²C
Senseair S8/S88/S12CO₂UART (9600 Baud)
Sensirion SPS30Feinstaub PM1,0 / PM2,5 / PM4,0 / PM10, typische PartikelgrößeUART (115200 Baud)
Sensirion SGP41VOC-Index, NOx-IndexI²C
ScioSense ENS160Luftqualitätsindex (UBA), TVOC, eCO₂I²C
Sensirion SFA40Formaldehyd (HCHO), Temperatur, LuftfeuchteI²C
2x AnalogeingängeSpannung (Wandlung in Messwert über mx+b, LUT oder NTC/Kopfwiderstand konfiguration)Spannung (0..3V)

Platinen

Die Leiterplatten sind mit KiCAD entworfen und stehen zum Download unter CERN-OHL-S 2.0 Lizenz.

Hauptplatine

Sensormodule

Der Senseair S88/S12 wird aufgesteckt bzw. aufgelötet, der Sensirion SPS30 wird per Kabel angeschlossen. Folgende Module werden in die I2C-Bus-Sockel gesteckt:

Gehäuse

Das Gehäuse ist zum Selbstdrucken ausgelegt; STL-Dateien und die FreeCAD-Quellen sind verfügbar und lassen sich an eigene Wünsche anpassen. Ideale Gehäuseschrauben sind SPAX Senkkopf WIROX T10 3×20 (5 Stück). Ein Wandhalter sowie Tischständer sind enthalten.


Software

Updates holt sich das Gerät auf Wunsch selbst. Sie sind signiert und fallen bei einem Fehlstart automatisch auf die vorherige Version zurück. Der Updateserver (http) kann beliebig auf eigene Quellen zeigen und ist damit nicht vom Autor abhängig. Die Firmware ist freie Software (GPL-3.0-or-later) und in Rust geschrieben. Quellcode, fertige Firmware-Dateien und die Dokumentation und Konfigurationsreferenz sind verfügbar.


Updates, inkl uf2-Dateien und Quellcode: https://project.ich-war-hier.de/picosensor/dist/


Air Quality Sensor (Overview)

PicoSensor turns a Raspberry Pi Pico W or Pico 2 W into a Wi-Fi sensor for indoor air quality. Depending on the sensors connected, the device measures temperature, humidity, air pressure, CO₂, particulate matter, VOCs/NOx, formaldehyde, etc.

  • You can easily view the measured values in your browser: An overview page with tiles displays all values (including those for each sensor), and an interactive chart shows their trends over time (from hours to a year). Derived values, such as the dew point or air pressure at sea level, are calculated from the measured values. A Pico 2 W can also compare data from multiple devices in a single chart.
  • An LED bar easily displays a selected measurement, so you can tell at a glance when you should ventilate; a button switches the displayed measurement or turns off the LEDs for the night. An ambient light sensor is integrated to automatically adjust the brightness of the LEDs. The colors of the LED display can be freely configured: any color for each LED at any threshold value.
  • All measured values can be published via MQTT with automatic Home Assistant detection; without home automation, this feature remains disabled.
  • HTTP endpoints that return JSON data are available for other automated data retrieval.
  • Power does not have to be supplied via USB—a two-pole spring-loaded terminal for 5V/500mA is available. Power consumption depends heavily on the brightness and configuration of the LEDs—typically around 120–160 mA indoors.
  • Normal operation includes a serial console accessible via the USB interface, which offers various diagnostic, testing, and configuration options (no one is forced to use it).
  • The device and all sensors can be configured manually in great detail using JSON files (and the configuration can thus be backed up).
  • Configuration settings and historical measurement data are stored as files on an internal file system (littlefs). These can be accessed in USB mass storage mode, which appears to the computer as FAT16, just like a USB flash drive.

To get started, all you need is a microcontroller module, the main board in its printed enclosure, a sensor module, and a power supply or USB cable. After installing the firmware, the device creates its own Wi-Fi network called „PicoSensor-Setup“; enter your home network’s login credentials there, and the device will then be accessible on the network. Everything else is handled via the web interface – no user account or cloud access required.

If no Wi-Fi network is available, the sensor can set up its own network, which you can use to connect with a laptop, for example, to retrieve the data.

Photos

See German chapter above)

User guide

A simple user guide in PDF format is available for users who are less tech-savvy:

Sensors

Sensors are plugged into the main board as modules and can be swapped out or added to – so a CO₂ or particulate matter module can be added later. The main board accommodates the Pico W or Pico 2 W and provides two I²C buses and two serial ports for the modules, as well as the LED strip and the button. A Pico W can manage up to eight sensors (four per I²C bus), while a Pico 2 W can manage up to fifteen (eight per bus).

SensorMetric(s)Interface
Aosong AHT2xTemperature, HumidityI²C
Sensirion SHT4xTemperature, HumidityI²C
TI HDC302xTemperature, HumidityI²C
Bosch BME280Temperature, Humidity, Air pressureI²C
Bosch BMP581Air pressure, HumidityI²C
Sensirion SCD4xCO₂, Temperature, HumidityI²C
Senseair S8/S88/S12CO₂UART (9600 Baud)
Sensirion SPS30Particulate matter PM1,0 / PM2,5 / PM4,0 / PM10, typical particle sizeUART (115200 Baud)
Sensirion SGP41VOC-Index, NOx-IndexI²C
ScioSense ENS160Air quality index (UBA), TVOC, eCO₂I²C
Sensirion SFA40Formaldehyde (HCHO), Temperature, HumidityI²C
2x analog inputsVoltage (converted to a measured value via mx+b, LUT, or NTC/bias resistance configuration)Voltage (0..3V)

PCBs

The circuit boards were designed using KiCAD and are available for download under the CERN-OHL-S 2.0 license.

Mainboard

Sensor Modules

The Senseair S88/S12 is plugged in or soldered on, while the Sensirion SPS30 is connected using a cable. The following modules are plugged into the I2C bus sockets:

Case

The enclosure is designed for 3D printing; STL files and the FreeCAD source files are available and can be customized to suit your needs. The ideal case screws are SPAX WIROX T10 3×20 countersunk screws (5 pcs). A wall mount as well as a table stand are included.

Software

The device can download updates on demand. Updates are signed and will automatically revert to the previous version in the event of a failed startup. The update server (http) can point to any source of your choice and is therefore not dependent on the author. The firmware is free software (GPL-3.0-or-later) and written in Rust. Source code, pre-compiled firmware files, and the documentation and configuration reference are available.


Updates, incl. uf2 files and source code: https://project.ich-war-hier.de/picosensor/dist/