# ESP32 board on 3 AA batteries: will blinking a LED briefly 100 times per day during 3 months affect the battery duration?

I have an ESP32 board working on 3 AA batteries (deep sleep more than 99% of the time), and it works well during ~ 3 months before the batteries are empty. (There is a regulator converting the ~4.3 V => 3.3V)

What would be the impact of having the onboard LED blink during 20 milliseconds, 100 times per day?

Note: it will blink only during already existing "wake times", so it will never wake up specifically "just for blinking".

It seems that :

90 days * 100 times/day * 0.020 sec * 20 mA consumption = 180 sec * 20mA = 1 mAh

compared to the ~ 500 - 1000 mAh batteries capacity, so it won't change anything significantly to the battery duration.

Is this order of magnitude of total consumption of 1 mAh correct? (Or the fact the LED will start and stop flashing 9000 times will have an impact of the order of magnitude of total consumption because there is a consumption rise / fall ?)

Note: here is how it is done on the ESP32:

void setup() {
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
delay(20);
digitalWrite(LED_BUILTIN, LOW);


on each wake up from deep sleep.

TL;DR: does a short LED pulse of 20 milliseconds really consume 20 mA * 0.020 s = 0.11 µAh, or, the fact it's 10 ms, 20 ms, or 100 ms won't change anything because it's a short pulse which with rise time/fall time, and it will always consume a certain minimum amount, no matter the length?

• Will the LEDs blink during otherwise scheduled "wake times," or will it be waking up just to blink the LEDs?
– JRE
Oct 18, 2023 at 8:16
• @JRE yes it will blink only during already existing "wake times", so it will never wake up specifically just for blinking.
– Basj
Oct 18, 2023 at 8:18
– Basj
Oct 18, 2023 at 8:43
• I think your calculations are correct for 3.3V supply, but how much it takes from batteries may be another thing - do you have a linear or switch mode regulator? Oct 18, 2023 at 9:35
• @Justme Thank you for your comment. I don't know, it's a FireBeetle ESP32-E V1.0 DFROBOT, I have no idea how these onboard regulators work.
– Basj
Oct 18, 2023 at 9:49