Introduction: Quick Arduino Hygrometer (Humidity Sensor)

Picture of Quick Arduino Hygrometer (Humidity Sensor)

We have been having some condensation and mould issues in our apartment recently due to, I think, the humidity levels. Our property is relatively newly built and, as such, has very good insulation properties (double glazed windows etc.). The side effect of this is that there is very little ventilation and therefore humidity rises over a period of time and water then condensates on windows causing puddles on the sills and mould in dark, cool corners.

Our solution to this problem was to buy a dehumidifier (pictured), however I would still like to know what the relative humidity in the room is (the target is between 40%RH and 50%RH) and thus the need for a hygrometer. I could of course have bought one, but having an Arduino and OLED display to hand I thought I would make one (obviously!).

Step 1: Design & Assembly

Picture of Design & Assembly

The design is dead simple. As I said, I had an Arduino and an OLED display to hand so all I needed was a humidity sensor which I picked up on eBay for ~£3. The full parts list is as follows:

  • Arduino Leonardo Pro Micro (clone)
  • Adafruit SSD1306 0.96" OLED Display
  • DHT11 Digital Temperature and Humidity Sensor
  • USB cable and mobile phone charger or similar to power it all

The schematic shows how the various components were connected together and the picture show how they were arranged on a breadboard.

Step 2: Software

The code was created using the Arduino IDE and is attached. I created my own class for communicating with DHT11 sensor (which has it own particular protocol) and used the Adafruit and Wire libraries to communicate with the display which uses the I2C protocol.

The design is very simple indeed. The setup() function quite literally sets up the display. The loop() function then reads the temperature and humidity values from the sensor and prints them on the display via the displayData() function. If an error occurs when reading data from the sensor then it is displayed via the displayError() function.

Step 3: Future...

I'm probably going to add an SD card into the mix so I can log the temperature and humidity every 15mins or so throughout the day and night so I can see when its necessary to run the dehumidifier and how long for to try and save power.

Comments

GavinF2 (author)2016-05-03

Thank You. This saved me a lot of time learning how to work with this screen. I have been messing around with a BMP280 and this LCD but the Code demonstrations from Adafruit were confusing as they had code for multiple different screens in one.
I found that the text size was 4 and it filled the entire screen but changing it to 2 fixed that but it may be because the screen I have is slightly different.

jazzycamel (author)GavinF22016-05-03

Glad I could be of some help :)

botronics (author)2016-03-13

I made one with a Uno. Works great. Thanks for sharing. Looking forward to when you make it log.

abass made it! (author)2016-02-06

I made it with adruino uno send data to vb.net app and gsm shield
dth 11
ldr

About This Instructable

8,256views

173favorites

License:

More by jazzycamel:Quick Arduino Hygrometer (Humidity Sensor)Non-blocking Ultrasonic Sensor for ArduinoOptical Mouse Odometer for (Arduino) Robot
Add instructable to: