I ve a problem: My batteries are empty after about 300 wakeups (each about 6-7 seconds to send a message to MQTT).
I use PIR (HC-SR501) to wake the ESP-12E on motion and have my circuty like this:
The only difference is that I used a ESP-12E and a transistor (HT7333) in between ESP-12E and power supply to get 3.3V.
The PIR (HC-SR501) is connected to battery pack 4.5V directly (3 x AA). (This will be changed later because I found out,
that there is a regulator to 3.3V in the PIR to, but that doesn´t matter atm).
While my tests a programmer (FTDI232) was permanent connected to (TX,RX,GND), but was powered by USB the hole time.
The main question is: Why are my batteries empty so fast? Did I something wrong ? What can I do better ?
My code for deepsleep, connection to WiFi and Mqtt where taken from my temp./light/hum. sensor project which
where messued with 24 uA consumption while in deepsleep mode and had (5000 wakeups without problems.
I noticed that the LED of the ESP is still on while in deepsleep. Even if I add to switch it off before sleeping.
// Thats the "outro" part:
// LED off:
Serial.printf("Starting Deepsleep seconds: ");
ESP.deepSleep(CalcSecSleepTime(), WAKE_RF_DISABLED );
uint64_t accumulator = DEEPSLEEP * 1000000;
Serial.println("diconnecting client and WiFi.");
delay( 1 );
Thanx for your help !