Hi, I'm trying to connect an ESP8266 with a DHT12 using I2C, and I'm having values which feel wrong.
So, to exclude an error in the libraries out there, I tried writing the simplest code using an Arduino UNO to be sure. To double check, I have 2 DHT12 (fed using the 3.3v pin), and a commercial temperature and humidity thermostat bought on Amazon.
My Arduino UNO outputs: Humidity 19.3%, Temperature 21.2°C.
While my Amazon thermostat shows 36% humidity, 21.3°C.
The temperature seems perfect, sometimes being 1°C off, which isn't an issue. But the humidity being almost 25% off is strange, the second sensor detecting exactly the same values as the first one.
I've attached a picture of how I connected everything (holes on the sensor facing right), hoping the proximity of the wires isn't an issue.
Am I missing something? Are there more faulty sensors as usual in this brand, or faulty in the same series (I'm sure my 2 sensors are from the same series)?
What do you mean by « both »? Both « sensors » + the Amazon « Home thermostat » I bought to compare? Or just the 2 DHT-12?
Willpatel_Kendmirez:
Maybe the answer is simply that the DHTs are not commercial grade, and if you want reliable data you need quality equipment?
I understand that and of course, a 3€ sensor may not be super reliable, but what I can’t understand is that the datasheets online say 5% precision on humidity, 0.5° precision on temperature. And I’m precisely have 0.5°C difference, and 3 times the expected difference on humidity... I want to make my basic heater and my basic humidity remover connected, while I can tolerate few degrees off, 15% on humidity is too much to know when to start the remover.
Moreover, it also doesn’t seem to be “shifted”.
According to the seller, i’m The first one complaining about their values, and because 2 of them output the exact same values, he blames my amazon thermostat (https://www.amazon.fr/gp/aw/d/B07717GJD8?psc=1&ref=yo_pop_mb_yo_pop_mb_pd_t2), which I’m also starting to blame because it stays on the same values, after having put drying clothes in the room 2 days ago...
BTW @Paul_KD7HB, is my thermostat not reliable enough for a psychrometer to be needed?
Paul_KD7HB:
"It’s needed only if you want a calibration value to work from.
Are you saying that the DHT12 could give not incorrect but shifted values?
@wvmarle: Please explain « lack of ventilation ». Is it not capable of sending « static » air? I’m asking because I was also thinking about « how » I could make my enclosure. The amazon thing seemed to be completely closed without holes (while it was certainly not watertight, i’m Not sure how it could sense humidity...). And ultimately I’d like to make an enclosure for my project, with a hole for the screen, for a USB to reprogram it and batteries. I don’t know what are the requirements for the sensors to be effective, should they be « outside » of the enclosure, on an edge visibly but without being out, or closed in a box is good?
Anyway, it’s currently on a breadboard, on my desk. I don’t move a lot, I don’t make a lot of air movement, is that what you’re talking about when you say « lack of ventilation » ?
For a sensor like humidity/temperature of course that sensor must be exposed to the humidity/temperature you want it to measure. If you enclose it in a box you measure the humidity and temperature inside that box, which may or may not be what you want.
Polymer humidity sensors take a long time to recover from high humidity back down to low
humidity - so you may have to wait longer than you think. Forced air-flow over both sensors
will equalize them much better than static air conditions.
Ultimately these devices are cheap and cheerful. Wet/dry bulb hygrometer is much more accurate,
although cumbersome.
MarkT:
Forced air-flow over both sensors will equalize them much better than static air conditions.
Ultimately these devices are cheap and cheerful. Wet/dry bulb hygrometer is much more accurate,
although cumbersome.
Thanks for your precisions. Indeed, they're cheap, but what I couldn't understand is the difference in temperature and humidity precisions.
I've asked a friend to bring me his calibrated sensor (which can be wall mounted or stand on a table), which seems to be calibrated (because he also checked with his humidity extractor), and the difference with his and my DHT12 seems to be constant (DHT12 is 9.8 to 10% lower). I'll give him mine for a few days (with the offset hard-coded) and let him tell me how it is.