introduction
I had wanted to measure the level of carbon dioxide inside my house for a while, but had never gotten around to putting together the electronics despite having them.. until now! This design is fairly straightforward; I use a ESP8266 and a SCD30 from Adafruit. This sensor is nice (and a bit expensive) because it directly measures the level of carbon dioxide with a narrowband gas spectrometer (I think). The hardest part about this small project was modelling and printing the enclosure.
design
The information from the HomeAssistant component page and the Adafruit product page were enough to get the thing up and running in 15 minutes or so. I had the electronics sitting on a breadboard for a few days, just to make sure everything was working as expected. I did run into issues with the sensor dropping out after a while, which was solved by just assigning the ESP8266 a static IP.
However, I don’t want to leave it exposed for my cat to play with (she likes wires), so it needs an enclosure. I started by making a block model of the sensor board for clearance areas and connector location. I wanted to try a design different from a standard box with flat lid, so I decided to make a sort of clamshell case to clamp the sensor board in place, with screws threading into the lid from the base. This concept is illustrated in Fig. 1, which shows an exploded view of the enclosure and block model. Making the enclosure this way took a bit of effort, but I think having a device that looks like a single piece of plastic gives it a nice and polished appearance.
finished product
I 3D-printed the two parts out of black PLA, and used my soldering iron to put the heated inserts into the lid. Four M3x20 hex socket screws clamp the board in-between the base and the lid. There isn’t too much more to say about it, but I’ve included some photos of the finished parts. Please pay attention to the inclusion and (very nice) alignment of the USB-C connector, it makes me happy.
The sensor works perfectly. With reference to Fig. 6, I can see when gas appliances are turned on/off, despite the sensor being in another part of the house. I don’t think my calibration is perfect, but it gives me a good estimate nonetheless.
As with anything 3D-printed on a FDM machine, the layer lines are kinda ugly. I am looking into how to finish the surface to get a nicer appearance, which I might do later for this project as a test run.
notes
As I finish this little writeup, I’ve had the idea to not recess the screws into the base, and instead print some small TPU feet to sit between the base and the screw cap. If I get around to doing that, I’ll post it here.
Leave a Reply