0
\$\begingroup\$

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?

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Will the LEDs blink during otherwise scheduled "wake times," or will it be waking up just to blink the LEDs? \$\endgroup\$
    – JRE
    Oct 18, 2023 at 8:16
  • \$\begingroup\$ @JRE yes it will blink only during already existing "wake times", so it will never wake up specifically just for blinking. \$\endgroup\$
    – Basj
    Oct 18, 2023 at 8:18
  • \$\begingroup\$ Thanks for the comment @JRE. I edited to add a note about this in the question. \$\endgroup\$
    – Basj
    Oct 18, 2023 at 8:43
  • \$\begingroup\$ 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? \$\endgroup\$
    – Justme
    Oct 18, 2023 at 9:35
  • \$\begingroup\$ @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. \$\endgroup\$
    – Basj
    Oct 18, 2023 at 9:49

1 Answer 1

1
\$\begingroup\$

Your calculations are correct, except for the initial assumption of the LED current, which can't be 20mA.

Based on some schematics I found for the board, from the 3.3V GPIO pin, there is a 2.4 kohm resistor in series with the LED. That alone limits the current to less than 1.4mA into a short circuit.

The LED could be assumed to have at least 1.6V of forward voltage to light it up, so that's about 0.7mA. However the LED seems to be blue so it have much higher voltage over it and there will be even less current. The LED voltage is likely much more than 2.1V, but even at 2.1V the current is 0.5mA.

So instead of 20mA, a better guess would be 0.5mA, 40 times less.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.