Temperature-humidity sensor

Temperature & Humidity

Description

This post will outline how I built some temperature-humidity sensors for my home automation setup to use in a couple rooms in my house.  I'll explain some of the options I tried before coming to my final design.  I will also give you links to where you can purchase the parts and to download the 3D printer files for the enclosure.

Introduction

This originally started from an idea I had for my home automation setup to put a temperature and humidity sensor in my main bathroom.  The main reason for this was to help a small problem with occasional small mold spots on my ceiling.  This was most likely due to humidity in the bathroom.  When someone would take a shower, they would turn on the vent fan before showering, and then off shortly after.  The problem is that when the vent fan is shut off, there still may be excess humidity in the room that could eventually cause the mold.

The idea was that I could have a controller on the vent fan for the bathroom that would turn on when the humidity reached a certain level, and then would also turn off when below another level.  The two levels would factor in some hysteresis to the equation to prevent the fan from continually starting and stopping when the humidity is near a certain level.   By doing this, the humidity in the room would be dropped to a safe level before shutting off, thus preventing the mold problem.

The temperature-humidity sensor design ideas

So I needed to figure out everything I would need for the project.  My primary home automation setup revolves around MySensors nodes.  Those nodes talk to my Vera Plus automation controller.  I decided to make the temperature and humidity sensor a MySensors node.  The exhaust fan control, which I have yet to do, will be controlled by a converted Sonoff module.  For this article i'll focus on the Temperature and humidity sensor. 

Below is a list of the things I needed to create the sensor.  The basic list was simple

  • A circuit board for the project.  
  • A micro-controller to control the sensor.
  • A temperature and humidity sensor.
  • Some kind of power source.
  • An enclosure to mount the sensor to the wall.

On to building the prototype

Easy/Newbie PCBFor the circuit board, I had a number of the MySensors Easy/Newbie circuit boards, so I thought that would be a good choice.  For that board I needed an Arduino Pro Mini, and an nRf24L01+ radio.  

Now I needed to choose a temperature-humidity sensor.  I had both some DHT11 and some DHT22 sensors.  The DHT22 is a higher resolution sensor, so I originally decided to try that one.  Through some testing with the DHT22 sensor I found that the power consumption was too high.  HDC1080 thumbnailI did some looking and found the HDC1080 sensor.  This sensor connects to the I2C bus and uses very low power.  It's low power consumption made it ideal for use on a battery operated node.   By removing the regulator and power LED from the Pro Mini I was able to run this sensor for a week with no significant power drain on a set of 2 - AA batteries.

The last piece of the puzzle was an enclosure.  The enclosure had to be vented since I was measuring temperature and humidity.  It also needed to be able to hold a battery  or set of batteries.  I figured that I should find the battery box first, and then design the sensor enclosure around that and the PCB.  I settled on this one.

The enclosure design

I have dealt with temperature sensor enclosures before, so I had some ideas on what the enclosure should look like.  temperature-humidity wall boxI turned to OpenSCAD and came up with a basic design.  The box was vented, it had mounting tabs for the PCB and a place to hold the battery box.  temperature-humidity wall plateI decided to make it easy to remove from the wall if needed and made the wall plate with two tabs that the cover could lock on to. 

Since the creation of the first prototype wall box, I have done a couple revisions to the design.  This is what the final design looks like.temperature-humidity wall box V3
Version 3 of the wall box is highly configurable and can be adapted to other configurations if needed.  All versions of the wall box can be found on my thingiverse page https://www.thingiverse.com/thing:2186286

Related Images: