If it helps, I've used earlier Atmel AVR chips, as well as the ESP32-S3.
8-bit AVR is an extremely clean, relatively simple instruction set that can be viably hand-coded. It's fairly straightforward to calculate the exact number of cycles your code will use, which is handy for applications requiring deterministic timing and for knowing worst-case execution time of interrupt handlers.
If the C3 instruction set is anything like the S3, I'm willing to bet it's not as straightforward.
Atmel also tends to do a better job of their documentation. I've lost count of how many confirmed errata I've reported to Espressif, and the time (and steam) I lost troubleshooting them in the first place.
I like the S3, and it's heaps powerful, but for small projects that don't need advanced peripherals like Wifi, DMA, etc. I can envision that AVR as being a fine choice.
Doing asm on the AVR is beautiful, you can count clock cycles easily and then observe them on the scope.
I wrote a bit banging serial interface for an AVR once and had a mystery when I was testing it from a PC just with a basic echo. Every Nth character would be wrong. Was able to figure out a timing problem by counting clock cycles and found the bug in my code.
Was cool to see it align with what I was seeing on my oscilloscope.
Thanks for correcting me. Are there any good, small "Hello World" examples of RISC-V programming with the C3 you can point me to? I'd love to get a sense of how it compares in practice.
It's a much less fancy cpu that's very small. No wireless. Lower powered I would expect. But it's an MCU with something like 16KB of flash and 2KB of ram if I remember right. The analog stuff on it is supposed to be pretty good. The Anduril flashlight firmware (toykeeper.net/anduril) is a somewhat popular application that can run on it.
With the right software, ESP32 can be incredibly low power. Like "months on 3xAA batteries" for watching a pin with the ultra low power subsystem and then occasionally waking up and making a HTTPS call over WiFi.
That's not lower power, is it? E.g. RuuviTags can run 3 years or longer while sending sensor data 2.5 times per second, with a single CR2477 (3V 1000mAh). A single AA alkaline battery has 1.5V and 2100-2700 mAh (https://batteryskills.com/aa-battery-comparison-chart/ , somehow this data was difficult to find so I'll add this link :)).
Bluetooth is lower energy than WiFi, but in your scenario the energy used for the radio is quite low anyway.
There definitely are lower-powered options; I mostly meant that as an example that as an hobbyist, an ESP32 - possibly even on a standard dev board! - could easily be good enough for your use case.
I never did a formal study to see how much of that power use was standby vs. power-on usage, how much of the standby usage was the ESP32 vs. the board/voltage regulators/pulldowns, how much of the power on usage was radio vs. e.g. all the crypto (we're doing asymmetric crypto for the TLS handshakes on batteries here, that isn't going to be cheap!) etc.
I just slapped it together and found it good enough to not care further.
Actually I've read claims that ESP32 C6s are pretty decent battery-consumption-wise. So much so that I bought a few, hoping to make at least a doorbell out of it. Alas I don't have a device to measure microampers, so I guess I'll just see how long they're fare..
You can use ohms law - let it draw power through a 10k resistor, and put your multimeter across the resistor. Every .01 volt is 1 uA. This also means that if you're powering it with 3.3v and it browns out at 3.0v, you'll only be able to draw 30uA before browning out.
You can use a different resistor according to the power draw and how sensitive your volt meter is.
You'll probably need to power it up with the resistor shorted, and only remove the short once it's in sleep mode, to measure the current.
This is just kind-of low-power. Some microcontrollers (e.g. PICs) can have sleep consumptions measured in nanoamperes. Months to years on a coin cell... just, they would need an external wifi module, which is highly inconvenient.
No, it was an undocumented one-off using a random cheap devboard from Aliexpress (i.e. not some specifically optimized circuit!), built (IIRC) using the Arduino IDE - aside from spending the time to find and configure the low power mode properly, this was done in the dumbest, most naive way possible, and still worked.
I've found Kill The Newsletter works pretty well for the few things I want to follow that still insist on email delivery. https://kill-the-newsletter.com/
reply