this post was submitted on 06 Oct 2023
12 points (100.0% liked)

Ask Electronics

3668 readers
1 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 2 years ago
MODERATORS
 

I'm working on an Arduino project that will likely rely on a 9v for its power. If I can get at least 40 hours of power, I'd be happy with that. Here's why I think it's doable:

First, rechargeable 9v lion batteries nowadays have substantially higher capacities than even a few years ago. I see one on Amazon rated for 5400mWh!

Of course, I'll want to reduce power consumption as much as possible, so I'm thinking an Arduino micro would be the best choice (though I will be attaching a shield to it, which will add to the current draw.

My understanding is that the linear regulator on the Arduino is capable of reducing the 9v down to 5v, but at great expense to efficiency through heat loss. My thinking was to bypass the linear regulator entirely, and rely on a much more efficient buck converter to adjust the voltage down to 5v.

Thinking it might be possible to reduce the core clock as well, and run the Arduino at 3.3v instead of 5.

Anything I should consider that I might have missed? I'm excited for the project, but definitely need to get the power consumption as low as possible so I can run it off a 9v and not be constantly swapping/charging.

top 5 comments
sorted by: hot top controversial new old
[–] Rolive@discuss.tchncs.de 11 points 2 years ago (1 children)

Those 5400mWh batteries are a scam. Be very careful with them.

[–] neocamel@lemmy.studio 1 points 2 years ago

Ok thanks for the heads up. Yeah my spidey sense was tingling a bit when I saw that. Most other batteries are around the 1000mwa range, then one product is bidding 5x that? Sounds sus.

[–] SomeoneSomewhere@lemmy.nz 10 points 2 years ago

In many cases, the primary power consumer on an Arduino is the power LED. Remove it.

Buck converters are more efficient at high loads, but sometimes have higher standing/quiescent losses. You'll need to select carefully.

At reduced clock speeds, most ATMega parts can operate from 2.7 to 5.5V. Depending on what other parts you have, you may be able to operate directly from a 1S lithium cell with no converter or LDO. You'll still need a battery protection chip/PCB to prevent over discharge.

The other thing you want to do is put the micro to sleep for as long as possible.

[–] remotelove@lemmy.ca 3 points 2 years ago* (last edited 2 years ago)

Like someone else said, pull all the LEDs. There is no point to them if you don't need them. Just because a pin is set low doesn't mean it's completely off, so cut any unused paths to ground to be sure. LEDs still have to reach a specific forward voltage to turn on, but they could still be passing a fractional amount of current.

I believe the internal pull-up resistors are 10k, so if they are enabled, you can disable them and save a few more fractional pennies. (Maybe 3uA per pin if the pullups were enabled to start. Lulz.)

From a software perspective, you just need to keep the MCU in sleep mode as much as possible. Rely on the internal timers to wake up and sleep the MCU and make sure that the main loop is looping as slowly as possible.

That MCU should have an internal oscillator, so test it to see if it saves you any power. Turning it on and disabling the external oscillator should drop the clock speed down to 8mhz and might save you a bit more juice.

[–] jjagaimo@lemmy.ca 1 points 2 years ago

Like you said, you can power the 5V rail directly from the buck converter. You can also set the fuses to use the lower frequency internal oscillator. Another good option is that for most of the time, you should keep the atmega in the sleep/low power state, and use an interrupt from a timer to wake the mcu occasionally. You can probably also set up pin change interrupts to wake the mcu as well if say a button is pushed. Additionally, you might be able to disable some of the peripherals if not in use - I haven't looked at AVR microcontrollers in a while so this might not be applicable.

A final option if you really really need it to have low power is to use an external timer ic that turns power on and off to the Arduino. These can have extremely low power draw, and are used on things like door and window sensors to extend their runtime to years by almost eliminating power draw when the mcu isn't running - even the mcu sleep state draws a significant amount of power on large time scales