I’m trying to use esp01 and one relay and plus a dht11sensor to measure temperature.
I'm trying to use a powerbank to power the whole solution.
I would like a solution that it stays up for 1 month or more.
I wrote the code into the esp01 to wake up only 30minutes measure the temperature and after that it (esp01) goes sleep.
I'm trying to use a powerbank(20000mha), but after some hours it switch off and so i need to push on the power on the powerbank to restart the activities.
I used a 9V battery (with less amperes) but esp-01 goes down after some days.
Can you give ad advice about which battery solution is good for my project?
Peter
Powerbanks are intended to recharge batteries, not power our projects. They are designed to switch off automatically when the load current falls below a fixed level - which indicates the "battery" has been fully charged. But this problem usually presents itself much faster than a few hours - typically the first time the processor goes into sleep mode. So in your case the problem may be something else. Do you know how much current your project draws when the ESP01 is sleeping? Are the relay and sensor also off at that time?
This is a common enough theme and there are some work arounds which may help see: Powering the arduino nano with a Power bank but also Google for Arduino Power Bank.
The long duration you have experienced is, as already pointed out, unusual.