Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By schufti
#51242 Hi,
I'm not 100% sure on the DHTxx but in general if the sensor has a wider supply range (e.g. 1.8-5V) it is totally ok to connect its Vcc to a gpio to control supply.

One thing to obey: if you use external pull-ups on i2c, several sensors will not accept Vcc disconected while parasiticly being supplied via pull-ups on i2c (e.g. BME280 specifically warns about!).

If you're not using external pull-ups (only esp8266 internal), keep connections short.
If you power pull-ups and sensor via gpio, think on providing time for Vcc to settle and sensor to startup.

BUT: most modern sensors usually go to deep sleep (only several µA) between measurements, making this "trick" unnecessary.
Last edited by schufti on Fri Jul 22, 2016 11:58 am, edited 1 time in total.
User avatar
By martinayotte
#51262
Barnabybear wrote:Hi schufti & martinayotte, I think the method of connecting RESET and GPIO16 hasn't really been discussed properly and deserves its own post rather than distracting this one. I suggest a new post tomorrow as I think there are some interesting arguments.

Of courses we should avoid distractions, but here it was to remove the confusion about the "direct wire" usage, so I've posted this history reminder (as people usually doesn't do searches). There is no real needs for separate thread since it have been thoroughly discussed back in February when discovered, but also in March and April :
viewtopic.php?p=41537#p41537
viewtopic.php?p=43300#p43300
viewtopic.php?p=45650#p45650
User avatar
By Joe Job
#51265 The info was useful thanks. Also using light sleep and powering up the sensors from gpio I now have the moisture sensor and the dht running one is being tested on a 9v and one on two x aa batteries will pos how long they last for when tested thanks for the help guys.