HTU21D / SI7021 Temperature and Humidity sensor, possible DHT22 replacement?

I’ve been evaluating the HTU21D temperature and humidity sensor made by Measurement Specialties as a possible DHT22 replacement for the emonTH. This is quite a new sensor, released in 2013. The Si7021 is also a possiblity with an identical pin-out.

The metrics speak for themselves:

*Assuming 1 sample per min and sleeping in between samples, 1440 min per day = 86400s per day. See HTU21D testing repo a [sub-repository of the emonTH] (https://github.com/openenergymonitor/emonTH/blob/master/sensor_test/htu21d) for full calculations.

An upgraded emonTH with a HTU21D sensor instead of DHT22 should benefit from substantially increased battery life, increased accuracy and lower cost.

I’ve obtained HTU21D Sparkfun breakout to test and easily got it working with an Arduino using the Adafruit library.


There is some confusion with regard to the variants of this sensor I believe from my research that the HTU21D replaces the SHT21 made by Sensirion .


I hope to get a prototype emonTH with HTU21D up and running soon. I would be interested to hear if anyone has experience working with this sensor.


Thanks to @kobuki for posting an awesome comparison of various low cost temperature and humidity sensors. The HTU21D and si7021 hold their own in the comparison:

4 Likes

I’m nill technically but if you build a model I’m ok to buy one and add it to my small network and play testbed.

1 Like

Footprint has been squeezed onto the emonTH and prototype has been ordered :slight_smile:

2 Likes

I used to use it - then I tried the BME280 (much better).

@glyn.hudson: I recommend this thorough comparison of various sensors. But, any sensor in your list is light years better than the DHT22. I could recommend having a look at the Sensirion SHT31 which is a lot cheaper (and at the same time, more accurate) than its predecessors in the SHT series. I only have experience with the Si7021 besides the DHT22 (not counting the other ones not in your comparison). IIRC the HTU21D is a much more faster reacting sensor than the other 2. From your perspective, probably a stable and reliable supply chain is equally important and in volume, the price difference between the chips should diminish so it should become possible to use the most accurate and technically fitting one.

Just noticed the above. The HTU21D is made by Measurement Specialties and the SHT21/31 is by Sensirion, 2 unrelated companies. Though they can be used as substitutes (by pinout, not by driver software).

1 Like

Thanks for sharing your experience, interested to hear what factors persuaded to your shift to the BME280. It does indeed look like a nice sensor but it is more expensive and possibly not as good at temperature sensing?

Wow! That is a seriously comprehensive comparison. I wish I had found that last weekend when I was researching this sensor. Excellent objective scientific comparison

Totally agree! The DHT22’s days are numbered…

Thanks for the info. I’ll investigate the SHT31. Agree, a solid long-term supply chain is very important. This is what drew me to the HTU21D and Si7021 since these are footprint interchangeable and made by different manufacturers, this should result in some stock of either sensor always being available in the world.

Thanks, apparently Measurement Specialties HTU21D and Silicon Labs Si7021 are both footprint and software protocol interchangeable according to the report linked above

Mostly I wanted good humidity accuracy. < .5C and better with calibration is fine for me in terms of temperature.

I have added the BME280 to my comparison table, see top post:

The datasheet quotes ± 3 RH and ±0.5 deg C accuracy:

An interesting thing about the BME280 is that despide primarily being a barometric pressure/altimeter sensor (though it’s an “environmental sensor” now, so might be an irrelevant statement), according to the linked test site it’s the most accurate RH sensor. It’s more expensive because it’s more than just a T/H sensor. Though I’d be happy to see it as an option for EmonTH :slight_smile:

The conversion time is not accurate in yout table, I think. According to the datasheet, 9. Appendix B: Measurement time and current calculation, it’s around 13 ms if all 3 measurements are taken, not 1 second.

ok, thanks. I’ve updated my table

IMO, measuring the accuracy of %RH at a single temperature is quite misleading. Not sure what use people might have for pressure. It’s super sensitive and with another unit inside the house, it could be used to measure inside to outside pressure differential. This relates to building infiltration/exfiltration. Soon there will be a BME680 which also measures VOCs.

You can view the experiment as a verification of the specs at 25°C. I haven’t seen anything that comes close to that test regarding such sensors. Rather, there’s nothing but the word of the manufacturers.

What is VOC?

And something not entirely related: almost all weather stations contain their baro sensors in the indoors unit. Is that a mistake? From what you write, there might be an offset between outside and inside which is (for me) quite surprising, I thought all differences are temporary and almost all of them are related to wind. I might be entirely mistaken, of course.

Volatile Organic Compound[quote=“kobuki, post:14, topic:1106”]
And something not entirely related: almost all weather stations contain their baro sensors in the indoors unit. Is that a mistake?
[/quote]

The baro sensor is used in the process of calculating the RH.
Even if the indoor/outdoor pressure differential is large, the difference between the two results will be negligible.

HI Glyn, have you planned the replacement of DHT22 in the near future? I want to implement a system to my home based on temperature and humidity monitoring so I’m very interested in these improvements!

I have a prototype PCB which has just arrived, it will probably be closer to the end of the year before the new units go into production. Getting maufacturing set up takes time. If you want to get the PCB made yourself see the V2 design in the dev branch of the hardware repo

unfortunately, I am not so experienced but if you need a beta tester let me know that I will be happy to help you. Ciao

Hi,
This is a very interesting topic.

I am interested in replacing my dht22 humidity sensor of my emonTH sensor node with one that is more reliable measuring RH% (and also temperature). Any recommendations / experiences in that area would be very welcome.

I am especially interested to know which alternative sensor I can use, how I should install it and if someone has successful experience with it.

kr Jan.

@glyn.hudson I’ve taken a peek at the v2 EmonTH schematics, and I noticed that it still uses the boost converter. Wouldn’t it be possible to entirely omit it and just use the 2xAA cells? Given the much lower power consumption of the new sensors and the much lower duty cycle, they can run from the 2xAA for 4-5 years at least, making the MCU sleep between measurements and using 8MHz xtal or even the internal 8 MHz oscillator. The boost converter adds a constant load that could be eliminated and board costs further lowered.