DHT22 AM2302 - sensor stops working - NaN

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
MonkeyTown
Normal user
Posts: 25
Joined: 08 May 2016, 02:29

DHT22 AM2302 - sensor stops working - NaN

#1 Post by MonkeyTown » 27 May 2016, 01:01

I am using DHT22 ( wired version with the pull up resistor - AM2302) - https://www.adafruit.com/product/393

using two of them on two different boards:

Lolin - NodeMcu V3 with the NodeMcu Base Board - http://www.aliexpress.com/item/NodeMcu- ... 29505.html
http://www.aliexpress.com/item/Free-Shi ... 09072.html
Amica - http://www.aliexpress.com/item/Update-I ... 64766.html

both connected using du-pont connectors, on GPIO13, all wired up properly, secured with hot glue.

The problem seems to be the same on both, happening on stable r_78, and 105 and 106.

Everything seems to work fine for a day, or several days and then suddenly I get a NaN (Not a Number) displayed on the little OLED and when looking at the web interface, serial stops reporting readings, just keep updating uptime.
One of the boards has BMP180 running alongside the DHT22, the other DS18b20 and they work just fine, even after dropping the DHT, they keep updating my domoticz server and thingspeak (so it's not the server settings).
None of the board freeze, just drops the DHT22 but continues to work.


To get it working again:
- sometimes the web interface reboot feature is enough (that leads me to believe that it's not a mechanical connection issue as I don't even touch the board to reset it)
- sometimes I have to physically disconnect power to get the readings back

One board is powered by a dedicated 2A power supply, another directly from USB on my MB. No other issues, disconnects or whatnot....

I am not sure what else I can do to provide more info on this or how to debug further but will be very happy to try anything you guys would suggest, Thanks in advance (and in general for this awesome software!).

nightshark
Normal user
Posts: 25
Joined: 29 Apr 2016, 06:54

Re: DHT22 AM2302 - sensor stops working - NaN

#2 Post by nightshark » 27 May 2016, 14:48

Mine does this too. It will eventually come back up. I'd like to know what others think.

MonkeyTown
Normal user
Posts: 25
Joined: 08 May 2016, 02:29

Re: DHT22 AM2302 - sensor stops working - NaN

#3 Post by MonkeyTown » 28 May 2016, 01:06

nightshark wrote:Mine does this too. It will eventually come back up. I'd like to know what others think.
Thanks. At least I know I'm not the only one.
It sometimes does come back, 20 min later, but sometimes 8 hours later still NaN.. This makes it useless, AFAIK. I might switch to BMP280 in the meantime... But I would love to see this fixed as I am quite fond of the AM2302/DHT...

MonkeyTown
Normal user
Posts: 25
Joined: 08 May 2016, 02:29

Re: DHT22 AM2302 - sensor stops working - NaN

#4 Post by MonkeyTown » 06 Jun 2016, 05:46

Any updates? Anyone?

Is there any chance that the am2302 has a pull-up resistor already in place? People using the DHT22 on RasPi with 3.3V recommend not using one. I have a DHT22 in another project so I want to pull it out and use without the resistor.
I have had my last two NaN failures only remedied after disconnecting 3.3V and GND of the sensor so this really sucks as the AM2302 has been my sensor of choice with Arduinos, always performing great...

Can anyone help in fixing this? I'll report back after my trial without the resistor.

pbertra
New user
Posts: 8
Joined: 30 May 2016, 12:19

Re: DHT22 AM2302 - sensor stops working - NaN

#5 Post by pbertra » 06 Jun 2016, 10:21

I also have the issue with nodeMCU v2 and am2301 but mine is battery powered... And I guess the issue is coming from there as the minimum voltage is 3.3v.

What is noticed is that the nodemcu board can continue working and sending data when the battery voltage gets lower but the am2301 doesn't work anymore. And the voltage drops quite quickly below 3.3V because the AM1117 regulator (and potentially a diode I think) imply a voltage drop of nearly 1V!

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: DHT22 AM2302 - sensor stops working - NaN

#6 Post by Drum » 06 Jun 2016, 17:05

I have had this happen on a NodeMCU V2 as well, but I think after I fried the diode on the power input and replaced it with a piece of wire, this stopped happening. There is a Power section in the wiki which explains how this can be a problem. The DHT-22 specsheet says 3.3 to 6 V and if there is a diode on the input of the AMS1117 It may not be getting 3.3V.

I also have 2 Olimex MOD-WIFI-ESP8266-DEV boards with DHT-22, and DS18B20 on 2 AA NiMh batteries, a Solar cell and LM3671 to keep the power at 3.3V. Both have been running since February with no problems. Right now I am only using LM3671 or MCP1826 to regulate the power. The AMS1117 I could get had too much overhead and batteries just didn't last very long. They must be cheap, no idea.

I am not a big fan of the AMS1117, but it probably works okay, I just haven't had a lot of success with them. I also don't think NodeMcu's work really well on batteries, but not being an EE, I won't argue that. On my NodeMCU V2 I have a DHT-22, DS18b20, LCD display (5V) with a level shifter and button to turn th e light on, and a couple of good size Capacitors. Of course also no diode, and a 2A USB power supply. The only problems I have had are related to the whole thing currently being on a cheap breadboard, breathe om it and ikt resets, but stay away and it can run for weeks with no problems. I am working on a hardwired system, but that takes a lot more time to build.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 17 guests