-->
Page 1 of 3

Help with power consumption...

PostPosted: Sat Apr 02, 2016 12:59 pm
by lord_alan
I have built a fairly simple sensor to use in my Polytunnel. It's an ESP8266-12F running NodeMCU LUA. I have a DHT22 sensor and it is being powered from an 18650 2000mAh Li-ION battery,

The schematic is basically this https://goo.gl/photos/pzdVACfihs5RHXmz6

The code is split into two files plus a very simple init.lua that just calls user.lua

The first file holds config params: http://paste.ubuntu.com/15591032/

Then user.lua is the file that runs the code: http://paste.ubuntu.com/15591059/

The basic idea is simple. The ESP wakes up, reads the DHT22, sends the data and goes back to sleep for 10 mins or so then repeat.

I am using a very low power Voltage reg with a quiescent current of only 1.6uA (MCP1700-3302E) so I am somewhat surprised that the 18650 battery is only lasting about 4 days before it needs charging again. The sensor is powered from the ESP and therefore should not be drawing anything from the rails.

Am I right to think I should be getting more that 4 days from a 2000mAh battery?

Does anyone have any suggestions of how to troubleshoot and/or diagnose why it seems to be using so much power?

TIA

Al

Re: Help with power consumption...

PostPosted: Sat Apr 02, 2016 2:54 pm
by Barnabybear
Hi, I'm not a NodeMCU LUA guy, and haven't looked at your code but if your schematic is correct it's not going into deep sleep. CH_PD should be connected to GPIO 16 not GPIO 0.

Re: Help with power consumption...

PostPosted: Sat Apr 02, 2016 3:26 pm
by lord_alan
Barnabybear wrote:Hi, I'm not a NodeMCU LUA guy, and haven't looked at your code but if your schematic is correct it's not going into deep sleep. CH_PD should be connected to GPIO 16 not GPIO 0.


Thanks for pointing that out. I'm pretty sure it's my schematic that's wrong - I did that thinking the Fritzing library had the same pin layout as the real chip... But I will go back and double check in the morning ;-)

Re: Help with power consumption...

PostPosted: Sun Apr 03, 2016 4:14 am
by lord_alan
lord_alan wrote:
Barnabybear wrote:Hi, I'm not a NodeMCU LUA guy, and haven't looked at your code but if your schematic is correct it's not going into deep sleep. CH_PD should be connected to GPIO 16 not GPIO 0.


Thanks for pointing that out. I'm pretty sure it's my schematic that's wrong - I did that thinking the Fritzing library had the same pin layout as the real chip... But I will go back and double check in the morning ;-)


Yes, it was just the schematic that was wrong. I have updated it - the new drawing is here:

https://goo.gl/photos/HYPCw88sAvZuLgGz6

Thanks for noticing!