Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, 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-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.



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

Search: