Hacker News new | past | comments | ask | show | jobs | submit login

I wonder if the power consumption is any better. An nRF runs circles around any existing ESP32 variants in terms of power.





Not to mention the horrific peak power draw. It took people a while to figure out that the things need a fair bit of close-by capacitance on the power rail or they crash.

How much capacitance? I built my own sensors based on ESP8266 and they've been flaky, and I wonder whether that's the issue.

220uf would be the minimum. I've had modules get stuck in a boot loop when they have less then 120uf (inferred by repairing switch modules with bad capacitors).

It depends entirely on your power supply and layout. As evidenced by the fact that there are literally millions of working ESP32s out there in the wild with far less than 220uF capacitance on 3V3.

Usually you can fix it in software too.

For example, put a sleep(100us) as a hook before packet transmission to allow capacitors to recharge between packets.

Had to do this on a design powered by a cr2032 because the peak power draw from those batteries is really limited.


How many seconds of ESP32 power do you get from that cr2032?

A cr2032 has somewhere around 200mAh. The low-power ESP32-C3 uses somewhere around 20mA when its radios are off but the CPU is running and peripheral clocks are running, which gives a roughly 10 hour runtime. This calculation ignores the fact that the battery's voltage will drop below where the ESP browns out before it has delivered all its power (or assumes that it's regulated up at perfect efficiency), but most cr2032 batteries are a bit above 200mAh so it probably mostly evens out.

Though note that for most of its life, the cr2032 will deliver slightly below the ESP's minimum spec of 3V. From experience, that's not really an issue.

If you can get away with spending most of your time in the ESP's deep sleep state however, battery life is gonna be way better, and that's probably what you'd want to do if you're using a cr2032. In deep sleep, the ESP32-C3's data sheet says it consumes around 5µA (0.005mA). With 200mAh, this gives a battery life of 40 000 hours, or 4.5 years. At those time scales, battery self-discharge becomes relevant, so let's say a couple of years.

So a decent mental model is: you can do a few hours of cumulative compute over the course of a couple of years.

Unless you decide to boost the voltage of the cr2032 to be within the ESP's spec. In that case, the whole deep sleep discussion might be moot; I suspect the regulator's own power draw would absolutely dominate the 5µA of the ESP. But I'm not super familiar with the world of power regulators, maybe there are ultra low power regulators which can do the job with minimal losses even in the µA regime.


You might be able to do some cleverness with dc-dc boosting the voltage to charge a capacitor, then turning off the dc-dc converter until the capacitor is discharged. I haven't checked the numbers to see if that's workable though (capacitor leakage? does converter start-up use extra power?)

But your examples are all with the radio off. So then there is basically no point in using the ESP32. Better to use an MCU without radio and lower power consumption.

Well there's the use case of a device which gathers data and then uses its radio once every handful of hours to report that data to some service. If you're constantly using the radio you're gonna use way more power than my numbers of course.

I also don't think it's too unreasonable to use a C3 as an MCU in settings where a radio isn't required. The IC itself (aka not the wroom module etc) isn't that much more expensive than equivalently specced MCUs without a radio, and if you're already more familiar with developing for the ESP software ecosystem it might well be worth the few pennies extra. The ESP32-C3FH4X (so the IC with 4MB onboard flash, super easy to integrate into in a design) only costs $1.6 per unit on LCSC for 100 units (and mouser etc is similar).


> Well there's the use case of a device which gathers data and then uses its radio once every handful of hours to report that data to some service.

This is exactly a thing the ESP32 with WiFi cannot do if powered by a standard alkaline battery. The battery would drain in a couple of weeks.

And on top of that, it probably doesn't work at all, as it cannot even send once because the peak power draw is too high for an alkaline battery.


Coming out of deep sleep and Wifi coming back up, I’ve seen upwards of 600mA

The annoying thing is this is only due to "calibration" which can, with some highly esoteric optimisations, be skipped. Depending on the application , this can realise massive gains in peak power, wakeup latency, and even average power. The whole process is hidden in a binary blob though and espressif will not elaborate on it, so it's very challenging to alter.

Wow, jeez, no wonder the USB won't power it...

That's 600 mA at 3.3V. USB should be fine, but of course you need the capacitance to deal with that. Radio PAs can be power-hungry beasts.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: