DHT22/11 Readings dont stop changing

Hi,

Im using a DHT11 and DHT22 to measure humidity in a PVC chamber of a small volume about 1/3 Liter.

Readings always start out and circle around the correct value, but as time goes by (1 min...2 mins...3 or more) the readings keep increasing. For example they start around 56.1 but end up going up to 58 or even 59.3.

My code is:

#include <DHT.h>;

#define DHTPIN 2     // what pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino

int chk;
float hum;  //Stores humidity value
float temp; //Stores temperature value

void setup(){
    Serial.begin(9600);
	dht.begin();

}

void loop(){
    hum = dht.readHumidity();
    temp= dht.readTemperature();
    Serial.print("Humidity: ");
    Serial.print(hum);
    Serial.print(" %, Temp: ");
    Serial.print(temp);
    Serial.println(" Celsius");
    delay(2000); //Delay 2 sec.
}

Is this normal? What reading do I take?

I think that the DHT22 is functioning alright. The Technical Specification says that the max accuracy of humidity is +/- 5% which accounts for: 53.2 - 56.1 - 58.9

Readings always start out and circle around the correct value, but as time goes by (1 min...2 mins...3 or more) the readings keep increasing. For example they start around 56.1 but end up going up to 58 or even 59.3.

Which readings? The temperature? The humidity? Forget the DHT11 (+/-2°C) if you want accurate temperature readings, forget both if you need accurate humidity readings (+/-5%RH).

Humidity sensors generally speaking f'ing suck, and the super cheap DHT ones are not going to be the creme of the crop. That sounds within spec, as noted above.

We're not terribly good at building accurate humidity sensors in general; it turns out it's much harder to sense than something like temperature. Maybe try a BME/BMP280?

We're not terribly good at building accurate humidity sensors in general; it turns out it's much harder to sense than something like temperature. Maybe try a BME/BMP280?

Very genuine comment. The BME280 has humidity accuracy: +/- 3%!

I believe I have a bmp280. I'll look it up.

About the pins used, will there be a difference using analog vs digital pins?

I believe I have a bmp280. I'll look it up.

BMP280 doesn't containd humidity sensor; it is the BME280 that has humidity sensor.

One of the best affordable temperature/humidity sensor I'm aware is the SHT35. It has a temperature accuracy of 0.1°C and a humidity accuracy of 1.5%. I agree with DrAzzy that you probably won't get much more accuracy with standard components.