We're pretty much in the dark about what our 3D printers are emitting and how much of that we're breathing in. There are some great studies about what types of emissions are relevant, but of course that's telling me very little about what levels of air contaminations my specific printer, print settings and filaments are exposing me to. So I built this sensor box and packed my findings into a video.
These are the files for building a similar sensor box yourself. Programming an Arduino firmware and then graphing the results is heaps more work than it needs to be, so I opted to base the project around the excellent ESPHome project that integrates nicely into Home Assistant, and while that somewhat limited the selections of sensors that I could use, it perfectly supports the ones I wanted to use anyway.
Please note that you will need an ESPHome environment already set up to customize the sensor setup, ideally within a Home Assistant environment so that you can use the data in automations for e.g. turning on ventilation when needed. I am providing a compiled ESPHome binary that can be flashed using the ESPHome web flasher, and that will display values on screen and allows for some communication over WiFi, but really, it should be part of a full Home Assistant setup.
Any of the sensors can be omitted, and ESPHome will simply display nan instead of a sensor reading. Pins for hooking up the sensors can be found in the config file - the I²C connections are all going to the same SDA / SCL pins on the ESP32, so you'll need to either create a splitter cable or solder up some pins on a stripboard. Info on what pins are used for which peripherals can be found in the ESPHome config, additional documentation on the display or serial connections can be found on the ESPHome site for each of the devices.
There are some basic features provided inside the enclosure to mount sensors. The right side is spacious enough to mount a standard particle sensor - either the PMS5003S particle + formaldehyde sensor that I used, or alternatively the smaller PMS7003 or the larger SDS011.
The left side has ledges up top to mount various breakout boards like the BME680 and ENS160. I hot glued jumper cables to the ledges to make the sensors pluggable.
Underneath the sensor ledges is another large, open spot intended for mounting one or two of the cheaper MQ sensors, like the modified MQ-7 carbon monoxide sensor I used. However, the MQ sensors get pretty hot, so I decided to run it on a separate ESP to not overheat the box.
The bottom front of the box has a well-ventilated spot to wedge some jumper cables for a temperature / humidity sensor. I'd recommend something like an AHT21, though the config and precompiled binary is currently set up for an SHT40.
The 2.8" screen is held up by the front of the inner frame - use some M3 threaded inserts here. You can either use it without the outer shell and screw the screen directly to the inner frame, but with the outer shell, it simply gets sandwiched between the inner frame and outer shell, then fastened with some countersunk screws through the front.
For screen dimming, connect a simple 6mm tactile switch from GPIO 4 to GND and pressing it will cycle between full, half, minimum and zero brightness. Of course, you can also have the button do other stuff with ESPHome.
All links go to Aliexpress (affiliate) - most of the sensors are pretty ubiquitous, but Aliexpress tends to have the best prices for them.
ESP32 WROVER board - the standard WROOM should also work in theory, but I could only get the display to run with the WROVER
ESP32 breakout board
2.8" SPI LCD These are mediocre quality TN panels, but they're good enough for the task. You might need to change the RGB order in the config to get colors to display correctly. Better IPS screens that work with ESPHome are available, but not in the same form factor.
PMS5003S particle + formaldehyde sensor - make sure you actually get the "S" variant if you want the formaldehyde sensor, the basic PMS5003 only provides PM1, PM2.5 and PM10
SDS011 particle sensor An alternative sensor that's generally accepted as being very close to professional equipment, but does not report PM1 (only PM2.5 and PM10)
Bosch BME680 VOC, temperature and humidity sensor
SCD40 CO2 Sensor (optional)
ScioSense ENS160 VOC sensor (alternative: AGS10)
MQ-7 CO sensor - very basic sensor, needs to be modified for ppm readings
The precompiled binary includes the proprietary Bosch Sensortech BSEC library and requires the following notice to be included:
The binaries and includes for the core BSEC library in this repository are licensed
under the Software license agreement described in the link
https://www.bosch-sensortec.com/media/boschsensortec/downloads/bsec/2017-07-17_clickthrough_license_terms_environmentalib_sw_clean.pdf
The Arduino wrapper and BME68x Sensor API are licensed under the following license.
Copyright (c) 2021 Bosch Sensortec GmbH. All rights reserved.
BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The author marked this model as their own original creation.