I have been working on a project that is supposed to take several temperature measurements and then post those measurements to a database and then go into a deep sleep. However, I keep running into a problem. The system is supposed to be wireless so I have it connected to a battery for its power supply. The problem arises when I put the ESP on the battery and let it run for a couple hours. I will see it posting data to the server for about 4 to 6 hours then it will just turn of and if I check the battery it still has at least a half charge. I am using a portable phone charger for the battery since there is a micro usb port for power on the dev board. I have already checked if the time I’m setting the esp to sleep is a larger integer than the esp can handle and it is well within range (I have it sleeping for 10min and waking for about 10 sec). I already fixed one issue where the battery wasn’t getting enough of a power draw to notice that it had something connected and would turn its output off. I just added a resistor to the output that increased the current being drawn during the deep sleep. The only issue I can think of is if the battery was dropping it’s current while dying and that was causing it to turn off again but I’m not sure if that would be a large enough drop to cause the problem.
Any help would be greatly appreciated.