DHT22 Shows wrong values... how do I address this?

My sensor shows the right temperature but humidity likewise 1%

COM Port monitor gives:

Received:
0, A, 0, D9, E3 =? E3
Temperature: 21.70 *C
Humidity: 1.00%
Received:
0, A, 0, D9, E3 =? E3
Temperature: 21.70 *C
Humidity: 1.00%
Received:
0, A, 0, D9, E3 =? E3
Temperature: 21.70 *C
Humidity: 1.00%

My RH is constantly 1% (I live in Thailand so NO WAY that is correct.) Temp is about a degree off the reading I get from a BMP180 at the same location, so I can live with that. It's the RH value I'm really interested in (which should be around 45% according to my local airport weather stations data.)
As with the other post, if I breathe on the sensor, it'll rise to 30% or so but drop again back to 1% as soon as I stop.

Did anyway manage to resolve this? Perhaps I should just replace the sensor?

My reading are coming out really low. I'm just getting 0 for the temperature all the time and 1-3 for the humidity. Any ideas?

you should use

#define DHTTYPE DHT22 // for dht22 type sensor

but i see you using #define DHTTYPE DHT11 which is wrong

Forget all talk about bad libraries, bad source voltages and wrong connections.
The problem is in the DHT11 itself.

I have about 10 samples of the sensor and I'm rather disappointed. Most of them differ about 10% of each other. Then there is also some bad apples with difference of about 20%. And the temperature can be wrong as well as the humidity.

As far as I know, there is no way to give calibration values to the sensor. Please tell me, if you have found.
The best way is to select the best sencor, calibrate it with known values. Use either the salt method or a good Waisala sensor.
When you have some 4-5 calibration points, build a polynome and use it to fix the values with the program.

The las bad apple I have gives 17%RH, 34C, when a good device tells me that there is 44%RH, 21C.

Another thing is that if you are using an ESP8266-01 with a DHT11 module, you will get errors due the geometry of the packet. The ESP8266-01 module gets rather warm in itself causing many degrees of error in temperature. I inserted a piece of cardboard between the plates and got much better values.

1 Like

I'm resurrecting this post as I don't see any answers for why people are getting 1% on their humidity sensor?

I'm showing proper Temp and it changes properly.

The only difference I see is that when I breathe on mine I can make it go to 99% but then it falls back to 1%.

I recently debugged a similar issue with DHT22 sensor. I found the following details that was not obvious from the data sheet:

DataSheet: https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf
1. Extra pulse before start:

After MCU start signal the DHT22 responds like this:

_

    21      75      26      26      26      71       66
    __      __      __      __      __      __      __
   /  \    /  \    /  \    /  \    /  \    /  \    /  \  . . . 
__/    \__/    \__/    \__/    \__/    \__/    \__/    \ . . .

17      71      30      40      40      40      40

There is an extra ~20us low and high signal before the real start of 70us down and 70us up.

Rest of the 0/1 pulse width is correct. After a 40us low, a high of ~30us is 0 and ~70us is 1.

The first issue was that the pre pulse of 20us down and up was not accounted correctly. So the actual start pulse was
detected as 1 and error out because we will count the bits one off and not read the last bit to match the checksum.

2. Values are 16-bit int and not 8-bit parts of integral and decimal respectively:

Second issue that was not obvious from the data sheet was that the response is actually a 16-bit integer in hex and not two 8-bit parts.

Example:

40 bit response sequence from DHT 22 sensor

00000010 01101011 00000001 00011111 10001101
      02       6B       01       1F       8D

Humidity = 0x026B  Temperature = 0x011F Checksum = 0x8D
Checksum = 0x02 + 0x6B + 0x01 + 0x1F = 0x8D (ok)

Humidity in 16-bit hex is 0x026b, decimal 619 which is 61.9%
Temperature in 16-bit hex is 0x011F, decimal 287 which is 28.7 C

With the above understanding the sensor works as expected and provides pretty accurate values for temperature and humidity.

My experiment involves coding for these sensors from scratch for PIC micro-controller in C and using sdcc compiler. Hence I have not used any existing libraries. However I do benefit from the arduino library code and forums for my education. Thanks to all forum contributors.

1 Like

Bump.

Hello There I have different wrong value with dht 22 and library adafruit 1.4.2 I try sketch from DHT sensor library (dht tester).

The Temperature in degree Celsius and Relative Humidity % seem works fine ( have little bit difference compare to accu weather), but my problem is Heat index degree Celsius that has value totally difference , temperature in my location right now is average 30 - 34 with RH 80 to 84 % but Heat Index Reading is 27 ,

According to Heat Index Calculator Result my heat index should be greater than actual air temperature (35 degree Celsius).

whats wrong?? fyi ( I did not change anything on sketch .. just upload to my board)
I use LOLIN V3 board whit arduino IDE 1.8.12

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.