Remote Humidity Detector

By David Crookes. Posted

After building a new house, Jamie Bailey went where no person ever really wants to go – into the dark, cramped crawl space beneath the property to check for humidity. “It wasn’t fun and I only got a single humidity reading,” he confesses. But since this particular crawl space uses external vents and Tennessee, where Jamie lives, is very humid in the summer, it was
certainly a necessary trip.

Excess humidity is a problem, particularly in the dark. It can cause mould to grow and infiltrate a home's air, and that's a potential health hazard for those living there. “I became worried about the humidity causing long-term issues, including wood rot in the floor joists which is super-expensive to repair,” Jamie says. “So, I went in with a handheld humidity meter and realised I needed to log the levels over many weeks and months. Going down there every day wasn't going to happen. Thus, the idea of using a Raspberry Pi computer to do the work for me was born.”

Humidity hardware

Crawl spaces promote the circulation of air and allow access to essential utilities, but they can be a magnet for insects, moisture, and mould

Jamie's checklist of hardware was relatively small. As well as a Raspberry Pi 3, 4, Zero W, or Zero WH model with pre-soldered headers, he reckoned on needing a humidity sensor and a power outlet. “There was no power down there and using batteries was a non-starter for me, but getting electricity under the house was easy because of the existing wiring,” he says. He also sought an accurate humidity sensor. “This was harder than it should have been because I thought the popular DHT22 temperature/humidity sensor would be perfect, but it turned out to be a bust after testing four of them and getting completely different readings from each one,” he tells us. Jamie tried an inexpensive BME280 temperature/humidity sensor and got it working with Python in just five minutes. “I knew I had a winner.” The sensor easily connected to the pins of Raspberry Pi, leaving the rest of the work down to the software. Jamie installed Raspberry Pi OS, hooked up to his home’s wireless LAN, and got to work on the Python script. He used Initial State for the data streaming and visualisations needed to make sense of the information.

Gathering data

Remote humidity sensor - annotationBy hanging the project from a floor joist, it's kept away from any water that may be pooling on the ground

“A huge part of this project that I didn’t realise I needed was outside temperature and humidity,” he says. “Just reading relative humidity in the crawl space wasn't enough because of the vents – I needed to know what was going on outside too. The crawl space stays much cooler than the outside during summer, and cooler air holds less moisture than warmer air. “When that hot humid air gets sucked into the crawl space, the relative humidity goes up about 2.2 percent per each degree in Fahrenheit. I needed to log what was happening outside along with what was happening under the house, so I used Weatherstack to get the outside weather information into my dashboard, although I could have also used a second Raspberry Pi outside to do the same thing.” Jamie can now monitor the average outside temperature and humidity and see the average within his crawl space. “The project is a good framework to monitor just about anything with a sensor,” he says. “I plan to use it for many more projects that are currently swirling around in my head.”

From The MagPi store

Subscribe