3

Background: My project is to have several raspberry pis measuring and record temperature and humidity throughout our factory. DHT22 AM2302 sensor seemed like the best option at the time, do to its ability to measure both humidity and temperature at the same time. Also its affordable cost seemed to good to be true.

Problem: The current issue I am having is with the accuracy of the DHT22 AM2302 readings on humidity. I'm using the AdafruitDHT driver with a python script. We have several other handheld temperature and humidity sensors we use to manually check our factories conditions. The humidity seems to be 10+ degrees off. Which when calculating heat-index greatly effects the the HI value.

Questions: Has anyone else had this issue? Can you re-calibrate the sensor if though it is pre-calibrated during production? Should I not waste my time and invest in a more reliable industrial grade humidity sensor? Any help would be wonderful.

JKMartinez
  • 89
  • 1
  • 5

4 Answers4

2

You need to ensure each sensor is measuring exactly the same environment before making a judgement.

Have a look at the I2C based Si7021.

I left a Pi plus DHT11/DHT22/Si7201 under a plastic tub for seven hours, taking a reading every 3.3 seconds.

The DHT22 and Si7021 are clearly in the same ball park. The Si7021 seems to have a lot less jitter.

Relative Humidity % Relative Humidity %

Temperature C Temperature C

I left the DHT11 off this plot as it obscured the view of the other two sensors. It had broad bands as above.

joan
  • 71,852
  • 5
  • 76
  • 108
1

With regards to controlling the environment, there is an old chemistry trick to produce a stable humidity value using water and a saturated salt solution. By changing the salt you can adjust the humidity. This is a very reproducible method.

Here is a table showing you some of the values.

http://www.omega.com/temperature/z/pdf/z103.pdf

For example, sodium chloride (table salt) produces about 78% humidity and potassium acetate produces about 23% humidity. Pure water should be nearly 100% (save for any contamination). Keep in mind these need to be in sealed containers and can take a few hours to a day to reach equilibrium. Table salt and potassium acetate are probably the only two you can get your hands on easily.

I would also focus on equilibrium values and not the transient values. It looks like your sensor is responding slower to the increased humidity in one of the charts. That response rate is another variable all together. Make sure the equilibrium values match up before you start chasing down differences in response rate.

Once you eliminate that variable you can move onto any hardware/software issues. If nothing else, you might use this information to establish a calibration offset for each sensor. Sounds like a pain, but if it works you can have a very accurate system. With regards to industrial sensors, they are probably the same components you are dealing with, they just have an eeprom on board with calibration values, power filtering, some snazzy package and someone's time somewhere to run the calibration. Hence the increased price. You are on the right track.

Good luck.

bk79
  • 132
  • 9
0

Update: Over the past weeks I bought more DHT22 AM2302 sensors from a collection of Amazon sellers. Five sensors were ordered and testing all of them, one after the other on a single Pi showed some interesting results.

All DHT22 AM2302 sensors had different readings of humidity. While temperature was only .4 or so apart, at the highest. Here is some background to the kind of environment the sensors are in. I work in a air-conditioned office so temperature is generally constant with 74-76 being the norm.

At first I had my sensors out in the open after, I then created a small container out of some near by office supplies. It's not a air tight container but its main purpose was to prevent a change in conditions due to the air-conditioned going off or someone breathing on it. Not state of the art but it does a okay job and its a start.

The results are similar to the initial test. The sensors still had large differences in the humidity readings. I collected the data over the past day or so. This is a taste of what I'm dealing with.

  1. Sensor-D T:75.74 H:68.1;
  2. Sensor-1 T:75.56 H:58.6;
  3. Sensor-2 T:75.56 H:48.1;
  4. Sensor-3 T:75.74 H:48.4;
  5. Sensor-4 T:75.74 H:59.1;

My Thoughts: I could continue to do more controlled test. Which I plan to in hopes of helping someone else out later. But it seems fairly obvious that its the sensors at fault and not my environments conditions. I've been doing some research on humidity sensors in general. After reading some other experiments and reports(sorry don't have to the sources atm). Measuring humidity accurately is just something very difficult to do in the first place. I also assume that since the sensor are pre-calibrated during production they might have been made by different manufacturers in different locations and environments. DHT22 cheap and a good temperature sensor but for humidity seems extremely unreliable.

JKMartinez
  • 89
  • 1
  • 5
0

I use the BME280 (and the related BMP family sensors). You may want to research other sensors (the Lobachevsky way, reading other's research). For a good comparison, see for instance http://www.kandrsmith.org/RJS/Misc/Hygrometers/calib_many.html

softweyr
  • 31
  • 3