IOT Based Humidity Control

nish abe
2 min readJul 1, 2018

--

Experiencing the midwest winter for the first time taught few things. One of that was the importance of keeping the correct humidity within the home. Because it does have a direct effect on your breathing.

During winter, the outside humidity will go down. The heater inside the home will be running almost all the time which will make the inside humidity also go down.

Interestingly, the ideal humidity inside a home is also a factor of outside temperature. The ideal humidity percentage vary as the outside temperature varies. The following is a list, supplied by the Minnesota Department of Public Service.

Solution?

Create a system that can:

  1. Monitor both outside temperature and inside humidity
  2. Determine the ideal inside humidity
  3. Capable of controlling a humidifier in order to reach the ideal inside humidity percentile.

Implementation

Mix software, hardware, sensors and let them talk each other. In no time, we will reach the realm of IOT.

The high level steps in the implementation were:

  1. Make an outside unit to record outside humidity which will also upload the data to cloud.
  2. Make an inside unit to record inside humidity which will also upload the data to cloud.
  3. Make a humidifier
  4. Create and run an application that gets both streams of data, calculate the ideal inside humidity, and controls the humidifier as needed.

1. Outside Sensor Unit

The outside unit was based on an Arduino Uno board. A DHT22 sensor was attached to it, which can read both temperature and humidity. Arduino does not come with a wifi. So I had to connect a Wifi module, ESP8266 to the board. The idea here is to create an account with ThingSpeak and use their http based API to upload the data to their cloud.

The sketch that I have used is below.

2. Inside Sensor Unit

The inside unit consists of a Raspberry Pi in which a DHT-22 sensor is connected. A python program reads the data from the sensor and uploads the data to Ubidots, which is another IOT platform. I used two different platform for two sensors mainly in order to learn the implementation.

Also an LED display(0.96 inch 128x64 SSD1306) was integrated to show the inside and outside readings.

Here is the github link that contain the source code used for this step.

3. Making a DIY humidifier

This turned out be very easy and cheap. A humidifier for < $15. I posted my experience in an instructables article here.

4. Controlling the humidifier

The last step is to switch on and switch off the humidifier. The concept here is to control a relay while the signal wire connected to the Raspberry Pi. Here is an article that explains the details.

--

--

nish abe
nish abe

Written by nish abe

"Curious to know how things work and interested in making things work". https://nishabe.github.io/

No responses yet