ESP8266 question with DHT22 power Supply

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
xmenne
Normal user
Posts: 22
Joined: 17 Jul 2019, 17:38
Location: Saint Ouen sur Loire France

ESP8266 question with DHT22 power Supply

#1 Post by xmenne » 02 Nov 2020, 17:13

Hello all,
For some reasons I would like to power my DHT22(kit with all Pull resistor etc..) with 5V.
Can I simply connect the output to a GPIO in ESP8266 or this is not compatible with 3.3V limitation on GPIO ?
Signed XMenne from France

User avatar
Ath
Normal user
Posts: 3494
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 question with DHT22 power Supply

#2 Post by Ath » 02 Nov 2020, 17:28

You shouldn't do that, the inputs aren't 5V compatible. Either power the DHT with 3V3 or use a level convertor.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 question with DHT22 power Supply

#3 Post by TD-er » 02 Nov 2020, 19:49

The data for a DHT22 looks a lot like 1-wire.
So for this you need a bi-directional level converter.

There is some debate about whether the GPIO pins of the ESP are 5V tolerant.
Let's assume it is 5V tolerant, then the output levels will not be at 5V levels, which still requires the level converter.

So I wonder why you need to power the sensor with 5V?

xmenne
Normal user
Posts: 22
Joined: 17 Jul 2019, 17:38
Location: Saint Ouen sur Loire France

Re: ESP8266 question with DHT22 power Supply

#4 Post by xmenne » 03 Nov 2020, 16:23

Hello, many thanks
I will not do that then.

The reason is taht I have many DHT22 failure, with dht stop transmitting data to ESP (device display NAN).
I have that on R120 and Mega version.
ESP is working fine with other sensors or relay . No problem.
I recover the transmission after a complete power off and on sequance.

I was wondering if it was not a question of power supply on DHT22; My cable are not long; Around 30cm. max

Rgds
Signed XMenne from France

User avatar
Ath
Normal user
Posts: 3494
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP8266 question with DHT22 power Supply

#5 Post by Ath » 03 Nov 2020, 16:28

xmenne wrote: 03 Nov 2020, 16:23 The reason is taht I have many DHT22 failure, with dht stop transmitting data to ESP (device display NAN).
I have that on R120 and Mega version.
ESP is working fine with other sensors or relay . No problem.
I recover the transmission after a complete power off and on sequance.
You should not use a version of ESPEasy that is over 2 years old to report issues on that. Newer releases of ESPEasy have been released in the mega branch that are quite stable, and have improved performance and stability, most likely your issues will go away if you upgrade to a more recent version. Download from https://github.com/letscontrolit/ESPEasy/releases
Coming from that old version it is advised to first do a wipe of the ESP (flash with a blank.bin of the matching size after taking notes/backup of all your settings), then re-flash with the desired bin file, and reconfigure your device.
/Ton (PayPal.me)

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: ESP8266 question with DHT22 power Supply

#6 Post by ThomasB » 03 Nov 2020, 20:44

In addition to the other comments, I've heard reports of users experiencing your DHT22 latch-up (non-response) problem. For example, see this discussion:
https://forum.arduino.cc/index.php?topic=432544.0

That discussion mentions that measurements faster than two second intervals might invite the problem. This timing limitation can be affected by a combination of ESPEasy's device task interval setting, your rules, and any command readings. So review/update your device measurement scheduling.

But I suspect that a 100% successful solution may require switching to a different sensor.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 100 guests