Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHT22 and deep sleep #3

Open
consolacion opened this issue Nov 18, 2016 · 3 comments
Open

DHT22 and deep sleep #3

consolacion opened this issue Nov 18, 2016 · 3 comments

Comments

@consolacion
Copy link

consolacion commented Nov 18, 2016

Great project and ofcourse I am not doubting your findings regarding the DHT22 and deep sleep, but I just find it very hard to imagine that deep sleep cycles would affect a DHT22. Then it would also be affected I guess if you power up and power down a normal application a few times. So I really wonder what is going on there.

very odd, but do i understand from your version 2 that you dont have that issue anymore as you have the DHT directly connected to a the Vcc?

Anyway, the DHT22 and DHT11 usually don’t do well on a period of sleep: they need about 20 secs to 'power up' they do give readings in the mean time, but inaccurate.
Another issue with the DHT series as I understand is that the reading is always of the previous read command. So suppose I do a reading every second, then the reading at say 1 sec past noon is actually the temperature and humidity as they were 1 second ago at noon.
That is not really an issue if you do frequent readings, but suppose you do a reading every hour (but have kept your DHT powered up), then your first reading is that of an hour ago.

Finally, if you are using the Adafruit library (which you dont, but others may) there is an error in the cpp file that can stop the proper functioning of the DHTxx https://arduinodiy.files.wordpress.com/2016/10/adafruiterror.png
Finally, I must admit I have been running the DHT11 without pullup as well, didnt see any difference compared to with pullup

@tzapu
Copy link
Owner

tzapu commented Nov 18, 2016

hi, i do not know why it stops working, but that has happened in all my and my friend @chaeplin 's tests. and he has done tens of them with various configurations, including transistors to switch power and so on. i completely agree with you that it shouldn't happen though...
the only way i got it to work reliable, and to give accurate readings was to read twice and power it up/down completely during sleep. so the dht is now tied into both gpio0 and gpio2. also been using another library.
i don t think i managed to upload that sketch, will try to do so.
anyway, as you mentioned, the dht is really bad on power, not even sure if i got 1 - 1.5 months of runtime while the equivalent temp only ds18b20 seems to run for 4-6 months...

this is what i was running last
https://gist.github.com/tzapu/e6e70b4c094be618b714050a252309a3
seems now, i can t get any of my dht sketches to compile... lovely

@mrburns42
Copy link

I have the same problem. I think switching from GPIO_2 to GPIO_3 is a solution. This takes away the RX pin of the ESP-01, but that is only needed for programming in my setup. I put more details to the cause at:

adafruit/DHT-sensor-library#57

@consolacion
Copy link
Author

@tzapu , i hope you managed to compile yr sketches again. I apologize for my late reaction, I must have missed your reply

@mrburns42
In fact I have been using pins of the ESP-01 like this:

GPIO0 -> SDA pin of the I2C port
GPIO1 ->DHT11
GPIO2-> SCL pin of the I2C port
GPIO3-> OneWire Bus

had a BMP and an OLED on the I2C and 2x DS18B20 on the GPIO3
Not sure why switching from GPIO2 to GPIO3 would solve it (but if it does for you that is great)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants