I was about to go off on a rant about how power hungry the ESP32 is. But having a look its not as bad as I remembered (or perhaps I was thinking about the 8266)
depending on the board you can get it to as low as 15ma in "normal" use(light sleep microprocessor only, modems off). But when the wifi is on it chows down powers.
The chips various Arduino-like chips are 5mA active, 500uA when light sleeping, 5uA in deeper sleep, and hundreds-nanoamps in deepest sleep.
15mA "light sleep" is really heavy actually compared to most things IMO. Hell, the Nordic Semiconductor nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_.
ESP32 is in that zone between the low-power (and ultra-low power) uCs and Raspberry Pi. ESP32 is ~20mA to 50mA, comparable to RP2040 (which I also consider to be very "heavy").
Arduino-chips, like the ATMega328pb (as old as it is), is on the scale of "Years on AA batteries of sleep". While chips like ESP32 are on "Hours of AA batteries of sleep".
--------
The only advantage to ESP32 is its WiFi. If you need anything else at all, there's a lot of better chips available. In particular, Teensy is probably the best board for ~50mA to ~100mA levels that the ESP32 finds itself in.
Personally, I'd would say another advantage is sdk. IMO ESP-IDF is up there with Silabs and nRF in the top tier of dev experience. Then STM/TI etc and Microchip a very distant last.
The ESP32 isn't ideal for basic battery stuff that needs to be awake all the time, or size constrained stuff - that's where nRF and BLE shines (or Silabs/Cypress).
However, in deep sleep you can get 10uA< which is decent assuming you wake up rarely, do a bit of WiFi work and go back to sleep.
For the right job (powered stuff that needs BLE, WiFi or ethernet, maybe hosting a local webserver for config and/or mqtt) the ESP32 is an absolute bargain compared to alternatives and a pleasure to work with to boot. The modules also typically have lots of flash onboard, ideal for embedding web UIs.
> nRF5340 uses 5mA _WHEN TRANSMITTING ON ITS RADIO_.
I mean that is bluetooth radio, so its cheating just a little :)
No, I get your point. the ESP stuff I do spends most of its time in deepsleep, so yeah the 15ma is not great, but its not _that_ much of an issue because I can just wake up less often. Not having to use C is even better though.
10 year previous me would be screaming at my attitude. I remember when the pyboard came out and I was very much "pfftt, amateurs. 35mA to do nothing very fast"
However having lots of connectivity really makes up for the not great consumption. I don't have to slap on an RF solution, or like I did 12 years ago, use a horrific ethernet->rs232 bridge.
However if I need online low power consumption, I'll need to use STM32, and cry at how bad the documentation is(or was, I've not tried to use it for years).
The Cortex M23 and Cortex M33 chips seem to be the lowest power I can find.
That's Microchip's SAM L10/L11, STM32U5, and the Nordic Semiconductor chip I mentioned earlier. Probably a few more out there (ARM sells their core to many different companies after all).
Well, it's shit if you want something battery-powered (at least "needs a lot of work" to get good standby") but for everything else, comparing to what it can do and how much it costs, it's fine.
I was about to go off on a rant about how power hungry the ESP32 is. But having a look its not as bad as I remembered (or perhaps I was thinking about the 8266)
https://diyi0t.com/reduce-the-esp32-power-consumption/
depending on the board you can get it to as low as 15ma in "normal" use(light sleep microprocessor only, modems off). But when the wifi is on it chows down powers.