-->
Page 1 of 2

DHT11 numbers jumping around on a ESP8266-01

PostPosted: Mon Jun 04, 2018 8:32 am
by OG Style
I put together a weather station using code from another site. The site used a different model ESP then what I have. I have a 01. My temp and humidity keep jumping around and are reading different the the thermostat that I have in the same spot. They did not us a resistor in the circuit. I current have a 4.7k and have tried a 10k. I have the resister connected across vcc and data on the DHT11. Does anyone have any recommendations on how to get it more stable? Here is a link to to the code I used.

https://roboindia.com/tutorials/nodeMCU ... ata-upload


Thank you

Re: DHT11 numbers jumping around on a ESP8266-01

PostPosted: Mon Jun 04, 2018 10:24 am
by schufti
a) place a capacitor across Vdd and gnd at the sensor
b) keep the sensor away from the ESP antenna as far as possible
(or use proper shielding)

Re: DHT11 numbers jumping around on a ESP8266-01

PostPosted: Mon Jun 04, 2018 11:40 am
by OG Style
Thanks I will try that. What size cap do you recommend and is the 4.7k resistor ok to use?

Re: DHT11 numbers jumping around on a ESP8266-01

PostPosted: Mon Jun 04, 2018 12:07 pm
by schufti
depending on the quality of your power supply 0.1µ might be sufficient or even 1000µ won't help.
4k7 on data should be ok. As you see the original doesn't use any because gpio0/2 have (weak) internal pull-up - if in doubt, see the DTH11 datasheet for recommendation.