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

Moderator: igrr

User avatar
By devsaurus
#21429
Stoney wrote:now to work out why my DHT22 is working less and less...

You're aware that the DHT22 is specified for min 3.3V supply voltage? It might become unreliable when you run it from 2x 1.5V batteries - your voltage chart shows that the supply is already below spec...
User avatar
By Stoney
#21515
devsaurus wrote:
Stoney wrote:now to work out why my DHT22 is working less and less...

You're aware that the DHT22 is specified for min 3.3V supply voltage? It might become unreliable when you run it from 2x 1.5V batteries - your voltage chart shows that the supply is already below spec...


I am, but seen mention its ok to 3v.
whenever it gets a dodgy read from the dht on the temp or humidity, it will retry up to 100 times and it posts that count value to thingspeak as well. though its not visible as a public chart atm, i hear the humidity side drops out first so I did the 2 error counts seperately, i will enable the public view of those charts too.
Later I will add a single pulse charge pump from another gpio so when it starts reading incorrectly it can be pulsed high, assuming the dht is about a 5k load, using a schottky to charge a 47uF cap, I get 3.5v to its vcc remaining after 50mS. I want to see how low the DHT can go first and then see what the esp can cope with.

Image
User avatar
By Stoney
#21519 enabled the other charts.

I found the DHT likes 20 as the timing constant specified, instead of the suggested 15, I was bench testing at 3.3v and it was erratic also. it was part of the reason for my previous comms dropouts as a NaN(t) simply reentered sleep mode without sending any data. it was also returning 0 though, these were uploaded and I had to set the Min on the thingspeak charts to get rid of the error spikes.
It seemed far less intermittent at 20 though a high speed loop would still get incorrect at times, it also send a data value when it reads bad data after 100 retrys.
oddly, I have not yet had a bad read on battery power, not sure about accuracy however.
perhaps I should add the charge pump before it is required and do a reading before and after pumping the rail.
User avatar
By Stoney
#21713 removed R1 and R2 ..
found results started reading high at a battery voltage of 3.06V .. readAnalog(A0) / 187.0 which worked fine above this, started returning about 3.9V..

Then I discovered the readvdd33() system call .. why did nobody mention this ??

Had to actually remove the resistors from the TOUT pin before readvdd worked correctly.
So cut them out entirely to save a few uA.

System has worked reliably for about 4 days to this stage, deepsleep of 5 minutes, missed no wakeups that I can see.
0.47F supercap on power leads seems to have stopped the latch up at boot issue.