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?
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.
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.
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.
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