- Sun Jan 22, 2017 5:35 am
#61345
NodeMCU boards aren't so good with battery power. The voltage regulator on the board is not very efficient and even if powering the board directly to its 3.3v pin then the other components on the board keep using power even when the ESP is deep sleeping so you can't get the deep sleep current consumption to be very low.
For a battery powered ESP its better to use something like a an ESP12 on its own. The problem with that is finding a long lasting battery power supply that can deliver around 3v to 3.3v. You can use a couple of alkaline batteries directly connected to the ESP, but the ESP will fail as the batteries get flat and the voltage drops to around 2.8v, which with a couple of alkaline's means 1.4v per battery and there is a lot of life left in alkaline battery still when its at 1.4v.
So better is to use three alkaline batteries and have the ESP12 on one of those white adapter boards and using a low quiescent current voltage regulator to drop the 4.5v down to 3.3v. Something like an XC6206 or HT7833 work well. Like that you can get most of the capacity out of the battery and you should be able to get the deep sleep current to be less than 30 micro amps, which makes it negligible compared to the awake current.
Then how long it will last mostly depends on how often it wakes up and does something and how long it stays awake each time. Say it wakes up and sends a reading every 15 minutes and it takes 3 seconds each wake up to connect to WiFi and send its reading then the current consumption would be roughly:
75mA for 3 seconds 4 times an hour
75mA for 12 seconds an hour =
75mA for 12 seconds out of 3600 seconds =
75mA for 0.003333 of an hour
Say a AA alkaline batter has a capacity of 2000mAh then
2000mAh / 75mAh / 0.33333 =
8000 hours, so divided by 24 hours a day =
333 days, so almost a year on 3 x AA alkaline batteries
(and that roughly matches what I've found from trying it)