DHT22 humidity sensor


Ive been using a dht22 to measure humidity of coffee beans. I measured a few samples and they gave me different readings to what the different humidity was in each sample. I plotted them and came up with a curve to convert those readings into readings of humidity given by a pro humidity tester. This was about 5 months ago. A reading of 63% on dht22 was about 16%. My curve y=2.21x+0.295.

But now a reading of 10.5% on the pro tester gives me 63%.

Anybody have tips or experience building a similar tester?

#include <LiquidCrystal.h>
#include "DHT.h"
////for lcd
LiquidCrystal lcd(2,4,9,10,11,12); //pcb prototype
//for dht22 grove pro
#define DHTPIN A1     // what pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)

void setup() {
  lcd.begin(16, 2);
  lcd.print("DHTxx TEST");
  Serial.println("DHTxx test!");

void loop() {
 //if using grove dht22
//If using DHT22/Grove for T&H
void printTempUndHum(){
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  lcd.setCursor(0,0); //col0,row0
  lcd.setCursor(7,0);//col7, row0

Does the professional tool measure the same? Air humidity? Or does that tool test the humidity of the product itself and not the surrounding air? That's about the same as comparing apples to pears.

True...the professional tool is this one:

You place a sample in the container and it takes about 5 seconds to read.

I guess I thought it wouldn't really read the moisture of the bean itself. If you can see the inside, there is a small opening in the sample container where the humidity sensor must be. If it did measure the humidity of the product itself, the sensor would only be in contact with the first two beans in front of it. This led me to believe that the reason why the entire container is filled with sample is that the sensor measures the humidity of the air in the container with the sample in it. Of course that could be completely wrong and I see how it wouldn't make sense, but well, if someone could explain how it measures the humidity of the beans itself it'd be great.

Im still not sure how that would account for such a huge jump in measurement from month 0 to month 6?

That tool claims to measure the coffee's moisture and not air humidity. So the two tools are measuring completely different things. That's about the same as to bury a DHT22 into the ground to measure soil moisture. It won't work and the readings from a actual soil moisture meter won't have a direct relation to the values measured with the DHT22.