Sensors, Sensors everywhere

It’s been a while since the last update, so I really need to get this update out there before I fall into the trap of not maintaining this website for 2 years again.
Luckily I have not been sitting idle the last months and have been making good progress on my Home Assistant installation (after needing to restart 5 times due to corrupt SD cards, dammit).
Nonetheless, I now have 3 ESPEasy powered sensor boxes.

In April in decided I wanted to keep track of the air quality in my home. I’m often in the same room for hours on end (in front of the PC) and I tend to forget to open the windows to let fresh air in.
It would be fun if my home could tell me that I really should open the window or air vents right? Indeed!

Some research later I settled on the DHT22 sensor connected to a Wemos D1 mini with ESPEasy as the documentation for this was easy to understand and the sensors are cheap. But since that only does temperature and humidity I also opted to get the MH-Z19 for Co2 levels because there is documentation for that sensor also.

Quickly after finishing this build on a breadboard I realized I did not like the results that the DHT22 gave me, they seemed off. Maybe the sensors I got where bad or something but whatever it was the temperature readings where a few degrees Celsius too high and rather then addressing that I went ah fuck it and ordered 5 BME280 sensors, which are smaller and also measure air pressure because why not.

I also ordered a couple of triple bases for the Wemos D1’s thinking that would make a huge difference in the ease of mounting it all in a 3D printed enclosure, but to be honest, those are probably not needed at all. Anyway, I wired it all up and got to work on the Home Assistant side of things. Luckily, pushing to HA from ESPEasy is really straightforward, so it was a breeze to setup.

But then the BME280 did not return any values, the MH-Z19 was working fine so I knew the ESP was working as it should have. I had no clue how to check if the sensor was working correctly although as I’m writing this I figure I should have spend some more time diving into the inner workings of the BME280 but instead of that I just opted to replace the part, I had 5 of them anyway and I only plan to build 3 sensor boxes. The replacement worked like a charm.

Next up, printing an enclosure

Thingiverse is a incredible place to start looking for anything you could think of. Search for Wemos enclosures produced this handy case. While useful as is I wanted more sensors in one enclosure so I began modifying the design to be 3 times as wide and include holes for the sensors using Tinkercad. I had only used Autodesk 123d before this once and while I would have preferred to do this in open source software like Openscad the learning curb is just a bit to high for this instance, otherwise I would not have opted for Tinkercad because of the cloud based nature of the service.

Even in Tinkercad I had some difficulty getting the design I wanted, most edits I did left small lines and surface height differences as seen on the left here 🙂
But I figured that with the resolution of my 3D printer that would just not matter and i was right about that.

After exporting the design I started up the 3D printer and got to printing, only I made a mistake with bottoming out the design so the print failed hilariously.

After quickly fixing that mistake I tried again, this time with more success.

Then all that was left was placing the sensors, connecting everything and closing the enclosure with 2 M6 bolts.

I used a hot-glue to make sure the sensors say in place for the first build but for the next two boxes the tension of the wires keeps them from going anywhere so I left the hot-glue off.


I have not cleaned up the model or made a V2 yet as I wanted but i’m sharing the V1 files with the ugly lines anyway 🙂

Thingiverse link
Self-Hosted mirror


Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.