DHT22 accuracy

Hi all,

I have a DHT22 humidity/temperature sensor on approximately 70m UTP wire. Readings are OK, but I'm not sure that values are correct because comparing the temperature from DHT22 and 18B20 temp sensor, the difference is about 2 degrees (C). I also have another unknown humidity sensor (it costs 300$) and there is also difference about 2%. The strange thing is that first reading (after powering the sensor) is almost the same as readings from other sensors, but the next readings are with differences mentioned before.
I don't get any CRC errors and readings are stable.
What could be the reason for that? I also noticed that there are different values when powering DHT22 sensor with 4V, 5V and 6V. The delay between readings is 20 seconds. What do you thing about solution that I power sensor through some digital pin, and cut the power off after first correct reading? Something like

while (reading){
pin 10 HIGH (connected to VCC pin on DHT22 sensor)
read humidity and temperature
pin 10 LOW
delay(20000);
}

Could that cycling with power on/off harm the sensor?

Thank you

There may be an element of self-heating at play here that in turn influences the readings - the DHT manufacturer may be using a thermistor in there to help establish the actual humidity. Turning the chip on and off may help with that thermistor experiencing too much self-heating. If the offset is consistant and constant, the easiest approach may be to simply map the differences and code an offset instead.

Keep in mind that the accuracy of the DS18B20 is only +/- 0.5*C per the datasheet.

Turning the DHT22 on and off is likely permissible, but I'd check with the manufacturer to be sure. Using the Arduino in this fashion is likely OK as well, but I'd verify that the Atmel CPU can handle the required currents at all times (also consider all other external loads, there is a hard limit for the Atmel chip). If the CPU can do it and you have oodles of remaining power handling capacity, fine. Otherwise, consider switching the power on and off with an external transistor.

If you want to take more accurate readings you need forced-air-circulation - both to counteract self-heating effects and thermal-radiation effects (absorbing your body-heat for instance). Set up a computer fan pointing at the devices and take readings after a minute or so to stabilise...

Turning the DHT22 on and off is likely permissible, but I'd check with the manufacturer to be sure. Using the Arduino in this fashion is likely OK as well, but I'd verify that the Atmel CPU can handle the required currents at all times (also consider all other external loads, there is a hard limit for the Atmel chip). If the CPU can do it and you have oodles of remaining power handling capacity, fine. Otherwise, consider switching the power on and off with an external transistor.

You can switch an external powersupply for the DHT22 with the Arduino.

The DHT22 needs 2 seconds between readings (see datasheet) do you wait between readings?

He'd be getting errors if he was trying to read faster than the allowed 2s/cycle rate, no? At least that's what I remember happening to me when I did it accidentally.

As I said, I'm waiting about 20s between readings.

But the strange thing is that I'm getting different humidity values for 4V, 5V and 6V and CRC is correct in all cases. I'll have to check my program again, maybe there is an error...

Not strange at all if there is an element of self-heating going on. How do the temperatures compare?

From what I recall (and memory = leaky) the DHT may be using a resistive humidity sensor that requires (among other things) a 1kHz alternating signal to be applied to it. The resulting output has to be run through an op-amp (or a sensitive ADC) and temperature-compensated. It wouldn't surprise me if this humidity sensor and the thermistor providing the correcting temperature are self-heating at different rates depending on the voltage input. Have you tried blowing a fan across the DHT22?

BTW, I don't think the unit is supposed to be run at 6V.

Good day ladies and gentlemen. I am a newbie with Raspberry Pi. Since December 2016, I started to build a low cost temperature and humidity data logger using a Raspberry Pi 3 and 4 DHT22 sensors. I bought 5 DHT22 sensors, unfortunately 1 of them is faulty because it gives ridiculous temperature and humidity reading.

The screenshot in the link above is some of the sample of the temperature and data recorded using 4 data sensors. All the sensors were put side by side with each other during the recording. As you can see, the value of the temperature and humidity for all the sensors are different from each other.

I tried to search the inaccuracy values for both the temperature and humidity for DHT22. However, I found 2 slightly different inaccuracy values from 2 different versions of data sheet The link to the sources and their declared inaccuracy is listed below:

  1. Temperature: ± 0.2 °C, Humidity: ± 2% RH (Max 5% RH)
    Data Sheet Source 1

  2. Temperature: ± 0.5 °C, Humidity: ± 2% RH (Max 5% RH)
    Data Sheet Source 2
    Data Sheet Source 3
    Data Sheet Source 4

If I follow the first inaccuracy values, al least one of my DHT22 sensors is/are faulty for temperature reading, because the biggest Max Value Sensor - Min Value Sensor for all recording is 0.7 °C, which is greater than 0.4 °C (± 0.2 °C). However, all my sensors are fine if I follow the second inaccuracy values for temperature and humidity.

At this moment, I decided to follow the second inaccuracy values (unless if someone can confirm with me that the first accuracy value is the most accurate/latest. Please also advise me if there is any other way for me to improve the accuracy of my sensors.

Thank you and have a nice day.

Hello ,

i've tested DHT22 versus ds18b20

Mesure: each 1 minute (60s), mean temperature (infrared) 23.4°C (straight black line)
Mesure point 352: door opened, humidity increased, less difference between DHT22 and 18B20

DS18B20: quickly react with wind, mouvement (perfekt for a cooling system, fan...)
DHT22: high thermodynamic inerty (box + humidity sensor), problem with temperature below 0 (-0.5°, -1°...), the DHT22 stay with positive mesurements (0.1°, 0.0°C...), we can wait 5 minutes to get a significal mesure.

In my code, i will substract 0.4°C to the DHT22 measurement.

The DS18B20 in contact with material (cooling the APS canon EOS in my case) has no difference with an infrared sensor (Precision: +/- 0.1°C). Too sensitive for a weathercast system (dewpoint, freeze temperature forecast).