by adrianN · 6y ago · 0 comments
It seems like for hobby projects it's really hard to get good battery run times. I wonder why that is. Is is difficult to get everything into the appropriate sleep modes, or are hobbyist parts just that much more power hungry?
Commercial feature phones have stand by times measured in weeks.
The module appears to be https://simcom.ee/modules/wcdma-hspa/sim5320/ hardware data at https://simcom.ee/documents/SIM5320/SIM5320_Hardware_Design_...
... which claims a standby current of about 2.5ma. So either it's not correctly entering standby, or most of the power is going somewhere else. If the LED bargraph runs continuously that would explain it, but I assume she's thought of that and it's triggered by a button. Or doesn't mind the 24 hour battery life.
Having said that, hitting "more than a day of usage" is crucial, anything more than that is much less important for most users.
In other cases, the boards aim to be small instead of complete, so just use a simple LDO to power the device from USB. This uses a ton of power even if the MCU is off, and that's where the battery drain goes. Designs for real products tend to use a DC-DC converter that can be tuned for the desired sleep state.
Finally, the software that hobbyists use is basically designed to be easy, not efficient. You don't write any MCU init code, it just turns all power-sucking peripherals on by default. That way when you go to use them, they work! Accessing MCU-specific features to save power tends to be difficult, because the hobbyist stuff is designed to support every MCU ever designed from decades-old AVR chips to the latest ARM cores. If you're willing to include a bunch of headers and hack around what they do for you, you likely break core things like "read a GPIO pin" or delay_ms(). All in all, it seems unlikely to me that anyone is going to buy an Adafruit board, program it with Arduino, and get a low power device. I tried and failed. Adafruit themselves recommend using an external device to turn the board on and off at a scheduled interval to save power.
(I made an interesting nRF52 clock / temperature sensor with an e-ink display a few months ago. Every minute, the RTC interrupts the MCU to wake up, refresh the display, and send the temperature/humidity data out over BLE. I used Arduino and ... never got the power usage down at all. It lasted for A DAY with a 100mAh Li-ion battery, even with the radio disabled completely. The voltage regulator just burns power while the MCU is asleep waiting for that minute interrupt. As it happens, it is super jarring when the e-ink display refreshes itself every minute, so I ultimately abandoned the product.
Also somewhere in there I realized that using Arduino is a giant waste of time. When you just write your own C code, all of the manufacturer's documentation suddenly becomes applicable, you can use fancy things like an RTOS, and you even get code completion with clangd in your editor. Every time someone mentions microcontrollers I get mad at myself for wasting so many years with hobbyist-grade tools that never worked right. But I digress.)
An interesting exercise is comparing the nRF52 reference design (deep inside a ZIP file from here, https://www.nordicsemi.com/Software-and-Tools/Development-Ki...) with something like Adafruit's nRF52 dev board: https://cdn-learn.adafruit.com/assets/assets/000/052/793/ori... You will notice that Nordic's dev kit has a very complicated power stage, with solder bridges to turn off creature comforts for better power efficiency. Adafruit just has a random linear regulator on there.