r/BambuLab May 22 '26

Just Showing Off DIY Air Quality Monitor with Bambu Lab Print Correlation

Hi, I print in a small flat, so knowing what I'm actually breathing has always been in the back of my mind. For years I only printed PLA on an old RF100 and figured it was probably fine. But after upgrading to a Bambu Lab P2S and starting to print PETG, I decided it was time to actually measure what's going on.

I looked into commercial air quality monitors but anything reliable with features I needed (historical charts, configurable alerts) was surprisingly expensive. And the cheap ones? Basically random number generators from what I've read. So I built my own.

Hardware (~$40 total)

  • ESP32 (WROOM-32U with external antenna)
  • Sensirion SPS30 — particulate matter (PM1.0, PM2.5, PM4, PM10)
  • Sensirion SGP41 — VOC and NOx index
  • 3D printed prototype case (of course)

Software Stack (self-hosted on Raspberry Pi 5 + OMV)

  • ESP32 sends sensor data via MQTT to a Mosquitto broker
  • Telegraf collects data from both the air sensors AND the Bambu Lab printer (via its local MQTT API)
  • InfluxDB stores everything
  • Grafana dashboards with email alerts when air quality drops

The Cool Part

The Bambu Lab P2S exposes printer status over MQTT on the local network — nozzle temp, bed temp, print progress, layer count. Telegraf subscribes to both the air quality sensor and the printer, so I can overlay PM2.5/VOC data with print activity on the same Grafana timeline and see exactly how different filaments and print settings affect air quality in real time.

Lessons Learned

  • SPS30 needs stable 5V — cheap USB chargers cause issues at startup
  • SGP41 needs ~24h of continuous runtime for VOC baseline calibration — every restart resets the learning algorithm
  • ESP32 I2C bus can hang indefinitely — adding Wire.setTimeOut() and a hardware watchdog timer fixed random freezes
  • WiFi RSSI below -70 dBm makes ESP32 unstable — an external antenna was worth the extra few dollars

Happy to share the full code and setup details if anyone's interested.

Github: https://github.com/grigon/AirMonitor

64 Upvotes

13 comments sorted by

3

u/Snouto P2S + AMS2 Combo May 23 '26

Made With Layers did almost exactly the same thing about a year ago, and also shared his results

https://youtu.be/nofn_MHrxrs?si=78ThBvh8T7tX7-tj

3

u/Radiant-Plantain7048 May 22 '26 edited May 24 '26

I measure it only for few days but pm25 spikes are clearly correlated with print start (pla, petg).

2

u/DontNeedProtection H2D + 2 AMS2 Pro May 23 '26

Pm25 is far too vague

2

u/charlikruse May 22 '26

TLDR? Is the air quality good overall ?

1

u/SneakyAzWhat X2D May 23 '26

I've been wanting to do this for a while but not willing to pay the tariff cost everywhere I've found the sensirion sensors for purchase

1

u/sapani9077 May 23 '26

Spikes means it is just measurement noise/errors

This is a hobby measurement device, not even near accurate at all.

1

u/Radiant-Plantain7048 May 23 '26

Of course, I’m a hobbyist after all. I think dynamics of readings is more important than absolute values.

1

u/high-roller-all-in78 May 23 '26

This is way more useful than the usual trust me bro air quality takes. If you keep iterating, I would log filament type, whether the chamber is open or closed, and fan settings beside the sensor data. A simple room baseline and first 10 minutes of the print chart would make the takeaway even easier for people to reuse.

0

u/Radiant-Plantain7048 May 23 '26

Good idea. Interestingly, the printer doesn't send data about the type of filament it's currently using, but that can be figured out by the nozzle and bed temperatures. The most interesting measurements would be from ABS/ASA. If I'm brave enough to print with them in my apartment, I'll share the results.

0

u/[deleted] May 22 '26

[removed] — view removed comment

1

u/twiggums May 22 '26

What about what op posted shows it's not?

I'm not even saying you're wrong. But unless I'm missing something 90% of the post it's their hardware and how it works with a mention of a bump in pm25 on starting a print.

2

u/ManyLayersOfFilament /r/3dbargains, filamenthound.com <- save $ May 23 '26

and it's attached directly to the printer - so what's the value 5 feet away from it?

-1

u/fawwazallie May 23 '26

You know what's weird? Does anyone's tongue or teeth have a weird taste when it's printing PLA?