0

Lowest Power microcontrollers
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Lowest Power microcontrollers

by neurovation on Tue Dec 04, 2018 8:34 pm

Hello,
I am making a project that requires very low power consumption and trying to select the board that will draw the least power. Which controllers support a low power sleep mode between actions? I need the controller to perform about 30 actions (sending out a pulse) per second and spend the rest of the time asleep to save power. Is there any example code for implementing something like this? What if I add the requirement for bluetooth LE support?
Thank you!

neurovation
 
Posts: 3
Joined: Wed May 08, 2013 12:09 pm

Re: Lowest Power microcontrollers

by adafruit_support_mike on Wed Dec 05, 2018 1:35 am

Almost all microcontrollers have some kind of sleep mode, but most boards will still consume around 100uA when the microcontroller is sleeping.

It's generally better to use a low-power timer like the TPL5110:

https://www.adafruit.com/product/3435

That controls power to the rest of a circuit and uses around 100nA when sleeping.. at least a couple orders of magnitude less than any microcontroller sleep mode.

The TPL5110 breakout linked above has an LED that comes on when power to the rest of the circuit is active, and the reverse-leakage current through that is around 20uA. You can eliminate that source of loss by cutting a jumper on the back of the PCB.

adafruit_support_mike
 
Posts: 54144
Joined: Thu Feb 11, 2010 2:51 pm

Re: Lowest Power microcontrollers

by neurovation on Wed Dec 05, 2018 12:30 pm

Thank you for that advice!
My concern is that by powering down a microcontroller, it will reboot every time the power is reapplied. To make matters worse, most of them power up in a bootloader mode. Am I missing something here?

The other thing that concerns me is that the TPL5110 can only be switched at 100 ms or longer intervals. I need my code producing pwm pulses 30 times per second, or every ~30 ms (for a 3ms pulse).

I still plan to take your advice to heart and use a series of low power timers instead of the microprocessor for the version that doesn't require bluetooth. I guess I will just have to go with rechargeable batteries for the bluetooth version.
Again, thank you for the suggestion, I am certain it will help with other projects.

neurovation
 
Posts: 3
Joined: Wed May 08, 2013 12:09 pm

Re: Lowest Power microcontrollers

by adafruit_support_mike on Thu Dec 06, 2018 3:11 am

The boot sequence depends on the bootloader you use. Some of them automatically wait for a USB connection, others boot straight into the uploaded firmware. You also have the option of replacing the bootloader with your own code so there are no bootloader effects at all.

The power savings from sleeping will probably be modest for a device generating output at 30Hz. Most of the power savings comes from shutting off the internal oscillators, and when you restart them, the chip waits for a certain amount of time to make sure they're stable before letting the ALU execute code again. Between the shutdown and startup delays, you might see 50% to 60% actual low-power sleep time.

You might want to look at dropping the CPU clock to the lowest speed that works for your application. For the ATmega328P, running at 128kHz is about a hundred times cheaper than running at 8MHz, for instance. It also makes sense to shut down all peripherals and clocks you don't need for your application. The UART, SPI, ADC, and PWM clocks all use as much or more power than the CPU clock, and that energy is wasted if you don't use the peripherals.

adafruit_support_mike
 
Posts: 54144
Joined: Thu Feb 11, 2010 2:51 pm

Re: Lowest Power microcontrollers

by neurovation on Thu Dec 06, 2018 1:10 pm

Thank you for your insights. That was really helpful. Do you have sample code for shutting off unneeded peripherals?

neurovation
 
Posts: 3
Joined: Wed May 08, 2013 12:09 pm

Re: Lowest Power microcontrollers

by adafruit_support_mike on Fri Dec 07, 2018 3:25 am

It will depend on the microcontroller you use. Check the datasheets and see which parts are indpendent and can ber disabled.

adafruit_support_mike
 
Posts: 54144
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.