Intermittend wrong temperature readings on DHT11 #81

Closed
opened 2017-12-23 18:16:31 +00:00 by ir-fuel · 6 comments
ir-fuel commented 2017-12-23 18:16:31 +00:00 (Migrated from github.com)

I just installed everything and it seems to work, but I regularly get wrong values.
Here are 2 screenshots:
screen shot 2017-12-23 at 19 10 41
screen shot 2017-12-23 at 19 11 16

where do those weird values come from?

I just installed everything and it seems to work, but I regularly get wrong values. Here are 2 screenshots: <img width="674" alt="screen shot 2017-12-23 at 19 10 41" src="https://user-images.githubusercontent.com/1573715/34321691-c12d32ac-e815-11e7-85f9-f667a41113a7.png"> <img width="649" alt="screen shot 2017-12-23 at 19 11 16" src="https://user-images.githubusercontent.com/1573715/34321692-c1444672-e815-11e7-9fbc-4f4cf865a794.png"> where do those weird values come from?
ir-fuel commented 2017-12-26 15:43:07 +00:00 (Migrated from github.com)

Some addition: I would like to add temperature control to my enclosure (engaging fans when temps get too high) but I guess with these weird readouts it will constantly switch on and off since every X seconds it will detect a way too low temperature?

Some addition: I would like to add temperature control to my enclosure (engaging fans when temps get too high) but I guess with these weird readouts it will constantly switch on and off since every X seconds it will detect a way too low temperature?
vitormhenrique commented 2018-01-02 15:18:28 +00:00 (Migrated from github.com)

Dht sensors are inherently buggy on raspberry pi.

raspberry pi can barley keep up with the timing necessary to talk to dht sensors. Power your dht sensor on a higher voltage, like 5V, and use a level shifter on the read pin, you can get away without it but I recommend using one. 3.3V + voltage drops are not enough to power the sensor and get reliable values.

My recommendation: change the sensor, the plugin supports plenty options.

Dht sensors are inherently buggy on raspberry pi. raspberry pi can barley keep up with the timing necessary to talk to dht sensors. Power your dht sensor on a higher voltage, like 5V, and use a level shifter on the read pin, you can get away without it but I recommend using one. 3.3V + voltage drops are not enough to power the sensor and get reliable values. My recommendation: change the sensor, the plugin supports plenty options.
ir-fuel commented 2018-01-02 15:33:18 +00:00 (Migrated from github.com)

Unless I am mistaken it is already running on 5V. If this is a general problem with that sensor type maybe add it to the readme?

Unless I am mistaken it is already running on 5V. If this is a general problem with that sensor type maybe add it to the readme?
vitormhenrique commented 2018-01-02 15:41:58 +00:00 (Migrated from github.com)

yes, i should do that... sometimes on some installations it works without a problem, I can one enclosure using a dht22 no errors what so ever, bot one on my garage kept giving me incorrect numbers.

I read online many people having issues like this, but it's not clear what is causing, if you have any other sensor try changing the sensor and wiring first, and double check the your power temperate, if it's 3.3V try with 5V, if it's 5V try 3.3V. It's going to me a trial and error, but maybe you can get it working for you.

Double check your pull up resistor, add an 10K if needed.

yes, i should do that... sometimes on some installations it works without a problem, I can one enclosure using a dht22 no errors what so ever, bot one on my garage kept giving me incorrect numbers. I read online many people having issues like this, but it's not clear what is causing, if you have any other sensor try changing the sensor and wiring first, and double check the your power temperate, if it's 3.3V try with 5V, if it's 5V try 3.3V. It's going to me a trial and error, but maybe you can get it working for you. Double check your pull up resistor, add an 10K if needed.
ir-fuel commented 2018-01-02 15:43:00 +00:00 (Migrated from github.com)

I added a 10K resistor.
I bought the sensor because it was in your list and it seemed easy to wire up :)
If I would have known I would have ordered a different one.

I added a 10K resistor. I bought the sensor because it was in your list and it seemed easy to wire up :) If I would have known I would have ordered a different one.
vitormhenrique commented 2018-01-02 15:51:02 +00:00 (Migrated from github.com)

sorry about that.. yeah, it's one of those things, it "works" but it's a little bit more difficult to get it working, try my suggestions and see if improves the values.

You can also change the dht sensor routine and add more tests to filter incorrect values:

https://github.com/vitormhenrique/OctoPrint-Enclosure/blob/master/octoprint_enclosure/getDHTTemp.py

I added the caution warning to the read-me.

sorry about that.. yeah, it's one of those things, it "works" but it's a little bit more difficult to get it working, try my suggestions and see if improves the values. You can also change the dht sensor routine and add more tests to filter incorrect values: https://github.com/vitormhenrique/OctoPrint-Enclosure/blob/master/octoprint_enclosure/getDHTTemp.py I added the caution warning to the read-me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#81