-->
Page 1 of 1

DHT11 board questions.

PostPosted: Sun Oct 14, 2018 2:29 pm
by OG Style
Has anyone one used of these board and how did you get it to quit picking up the heat from the ESP. I noticed that the temp didn't match my thermometer and figured out that the sensor was reading heat from the ESP.

Thanks

Re: DHT11 board questions.

PostPosted: Sun Oct 14, 2018 4:31 pm
by btidey
I use ds18b20 for temperature sensing but the issue is the same. If the sensor is mounted in same enclosure as the rest of the electronics then it is likely to be raised a few degrees above outside ambient.

My solution is to mount the sensors on a short stub outside of the enclosure which still keeps it fairly neat and then there is negligible temperature change. See second picture in https://www.thingiverse.com/thing:2166068 for the general idea.

One could probably significantly reduce the effect on an internal sensor by running the esp in deep sleep between readings so that the ambient inside the enclosure doesn't get a chance to warm up before a reading is taken. That assumes the powering arrangements aren't contributing background heat. That wasn't gone to work for me as my sensors are doing other tasks and need to be on all the time.

Re: DHT11 board questions.

PostPosted: Sun Oct 14, 2018 7:11 pm
by OG Style
Is there a simple way to get it to deep sleep? I'm using someone else's code and it takes a reading about every 20 seconds.

Re: DHT11 board questions.

PostPosted: Mon Oct 15, 2018 4:08 am
by btidey
Deep sleep with periodic wake up requires 2 things.

1) A hardware connection between GPIO16 and reset. As you are using a ESP-01 that is problematic as the access to GPIO pins is very limited. This is one reason why I don't use ESP-01 modules.

2) Software that triggers deep sleep for a period of time. That is pretty straightforward as it just needs a call to ESP.deepSleep(t); where t is duration of sleep in microseconds.

Check out https://www.instructables.com/id/Enable ... SP8266-01/ for the mod necessary to deep sleep on this module. Personally I would switch to either a NodeMCU / Wemos if you want easy development, or ESP-12F modules to keep size down.

20 seconds may be a bit short for the deep sleep if you want to minimise heating effects, as it will probably spend about 3 seconds taking and reporting the measurement. 40 seconds and up may be better.

You also don't need the code to make repetitive measurements. It should be wake up, take and report measurement, go into deep sleep for required period.