DHT 11 Humidity Sensor with OLED Display

 

See the blog using the Si7021 here.
See the blog using the DHT22 here.

The sketch for this project on my GitHub page here.

I wanted to see how the DHT11 compared with the Si7021 Humidity Sensor. As I already had the circuit set up for the Si7021 it did not take long to modify it for use with the DHT11.

There is an in depth discussion of humidity sensors here and the relative accuracy of different sensors as well as methods used to test them is shown. There are a number of libraries available for using this sensor with an Arduino, but I found the one used in the Arduino Playground and available on GitHub here to work well and is the one I have used.

The author of the library included a method to calculate Dew Point, using Humidity and Temperature, and I have included this in my sketch.

The OLED Display shows temperature in both Centigrade and Fahenheit as well as Humidity in percent and Dew Point in centigrade. I have used the U8Glib library for the OLED Display and the code uses much of the code used for the Si7021 project.

Connect the OLED AS follows, taking care to connect the power supply to the display correctly,  Vcc to 5 volts and Gnd to Gnd, as reversing the power will destroy the display. Connect SDA to Arduino pin A4 and SCL to Arduino pin A5. Connect Vcc on the DHT11 to Arduino 5volts, the Gnd to Arduino Gnd. Connect the Data Out on the DHT11 to Arduino pin 2.

Upload the sketch and the display should be as shown in the picture at the top of this page, the output is also sent to the Serial Monitor to help with debugging. The reading is updated every 2 seconds as this is the fastest recommended for this sensor.

Comparison with the Si7021

The first obvious difference is size, the Si7021 is a fraction of the size of the DHT11. The DHT11 can only be read once in 2 seconds, but the Si7021 seems to have no such restrictions. Although the Si7021 is about three times more expensive than the DHT11 on eBay, it is about the same cost as the DHT22. Without a doubt the Si7021 wins hands down and the extra accuracy provided makes it the sensor of choice, even though it is more expensive.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s