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

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.

The DC-DC converter allows the AA batteries to be much further discharged, without the boost converter the atmega 328 would brown out at about 2.5V. With the converter the battery can be discharged to about 1V. Thus gains us about 3 months of extra battery life looking at the real work discharge curve:

Real World emonTH Battery Life - Blog | OpenEnergyMonitor

See the blog post for the boost converter design decisions:

The quiescent current draw of the converter is minimal (about 7uA).

In theory it looks fine, and accrording to my calculations, 2xAA cells should be able to drive the EmonTH for about 9-10 months with the DHT22. Assumptions: old booster setup, 2s uptime at each measurement, 1-minute intervals, about 28 uA sleeping current (7 uA MCU@8MHz + 7 uA booster, 50% efficiency), and about 10 mA average wake including 95% efficiency current including transmission. Yet you only seem to have 7 months. Naturally it’s a short span and a relatively high average consumption so 2-3 months theory vs. real lifie is not very big.

However, if you use any of the modern chips, their consumption is practically nonexistent. In that case, without the booster you can go down to about 1.9V or 0.95V/battery, but let’s be safe and say 2V. Standard specs are down to 0.8V usually. That’s about 73% of nominal mAh, 2200 mAh for an AA cell (3.1V - 1.6V vs. 3.1V - 2V). Assuming no booster, 7 uA sleep current, 50 mA wake current with transmission, 10 ms wake time, 1 measurements/minute, we get 14 years. There is only one kind of battery that lasts that long, the lithium primary. They’re 1.5V and a little more expensive. Every other kid of battery needs to be replaced in 3-4 years at most. No booster can help with that. Since a booster is not free amperage-wise, it wouldn’t prolong the lithium battery usage either.

Brown-out is not a problem, you can set it as low as you feel comfortable. In practice, 8 MHz is good down to ~1.8V.

Calculator I used: Oregon Embedded - Battery Life Calculator

Well, just my 2cents.

1 Like

I am about six months late to the party, but for what it is worth, here are my comments.

I too have adopted the BME280 as my device of choice for the time being. It is more expensive but when only buying a handful for myself that is fine. Your considerations for emonTH are inevitably more complicated. In my tests which you have already seen (http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.html) it gave the most accurate results, particularly in terms of thermal and long term stability. Some of the others were great at a certain temperature but then drifted when the temperature changed. I am a little nervous making that statement publicly because I can only speak to the specific devices I tested, not the average device off-the-shelf. Also, when I look at my SHT71 data (http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.html#results_ht) the humidity vs temperature plane is extremely ‘flat’, in fact just as flat as the BME280. The problem is that it is tilted so on the basis of this one device the BME280 definitely wins, but one tiny tweak to the internal calibration parameters could fix it and make it just as good. Was I unlucky to get a bad one? I have no idea. Mind you, the SHT71 is even more expensive still and does not have a barometer so I still favour the Bosch device. The BME280 also has a variety of options for internal filtering and averaging which is all very nice.

On the temperature accuracy, the data sheet does as you say caution that they do not really consider the device to be intended for precision temperatures, but my tests have looked perfectly fine for my needs. I must stress this is just my own “home made” experiment, not based on proper lab certified references or anything, but the six BME280 I tried gave errors of +0.3, -0.1, +0.7, +0.2, 0.0 and -0.5 deg C. The write up, if you are interested is here:
http://www.kandrsmith.org/RJS/Misc/Hygrometers/absolutetemperature.html

1 Like

Sorry to wake an ancient thread, but there is a packaged version of this that supports BLE and runs on a CR2032 - Avnet: Quality Electronic Components & Services

2 Likes

that’s impressive. Thanks for the link