3 ms·
> the battery lasts almost 24 hours 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 g
by adrianN 7y ago
> the battery lasts almost 24 hours
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.
- _-___________-_ 7y agoAssuming it has a comparable-size battery to other "feature phones", I suspect this could get better battery life with a bit of time spent on making sure everything goes to sleep whenever possible. Having said that, hitting "more than a day of usage" is crucial, anything more than that is much less important for most users.
- andrewcchen 7y agoIt takes a combination of software and hardware to get good power consumption. In this case, assuming the author has implemented sleep modes on the microcontroller, it's probably the 3g module being not very power efficient.
- rusticpenn 7y agoMost performance optimizations take more time to implement than the actual goals. Hobby projects focus on fun proof of concepts, performance optimizations are ot very attractive (unless optimization itself is the goal).
- pjc50 7y agoThe battery looks like it might be this one: https://www.adafruit.com/product/258 https://www.adafruit.com/product/258 which is about half that of most smartphones. At 24h there's a best case power budget The module appears to be https://simcom.ee/modules/wcdma-hspa/sim5320/ https://simcom.ee/modules/wcdma-hspa/sim5320/ hardware data at https://simcom.ee/documents/SIM5320/SIM5320_Hardware_Design_V1.07.pdf 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.
- jrockway 7y agoYes, the hobbyist boards tend to include features that make the low power modes difficult to get into. For example, the nRF52 eval board datasheet mentions that they have to waste 20uA of power to provide a reset button. Things like reverse-polarity protection diodes use power. You want those in your hobbyist board, but you probably want the extra year of life on your CR2032 in production. 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-Kits/nRF52-DK/Download#infotabs 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/original/microcontrollers_revgsch.png?1523067417 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.