Go Down

Topic: Power consumption of pins in different pin modes (Read 252 times) previous topic - next topic

Yom092090

I am building a project that is battery-powered and must have a low power consumption. From this https://youtu.be/urLSDi7SD8M video, I know that floating pins consume more power than pins set to output HIGH or LOW. I am wondering if putting the pins in INPUT_PULLUP mode would save even more power since they are no longer floating and are not be outputting a voltage. I would love to know the difference between these two approach. P.S. I don't have a current meter that is precise enough to do the measurements myself.

ChrisTenone

Go to this page and scroll about 1/8 of the way down. Here is the summary table from Gammon Forum:

Quote
Testing in SLEEP_MODE_PWR_DOWN:


All pins as outputs, and LOW: 0.35 µA (same as before).

All pins as outputs, and HIGH: 1.86 µA.

All pins as inputs, and LOW (in other words, internal pull-ups disabled): 0.35 µA (same as before).

All pins as inputs, and HIGH (in other words, internal pull-ups enabled): 1.25 µA.
What, I need to say something else too?

wilykat

wSo it seems like a good practice to set all unused pins to low.

srnet

wSo it seems like a good practice to set all unused pins to low.
Or do nothing, as they default to inputs ?

$50SAT is now Silent (but probably still running)
http://www.50dollarsat.info/
http://www.loratracker.uk/

sterretje

Or do nothing, as they default to inputs ?
That's floating inputs which will result in constant flipping of all the logic gates resulting in higher power consumption.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Yom092090

So the point is to not let the pins be in a floating state?

sterretje

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Coding Badly

So the point is to not let the pins be in a floating state?
You could follow the recommendation provided by Atmel in the processor's datasheet.  Given the fact that they make power consumption guarantees it seems likely they also provide guidelines for meeting those guarantees.


DrAzzy

What doesn't make sense to me is that gammon's tests with pullups on (as atmel suggests) has higher power consumption than when the pins are left floating (which atmel says will result in increased power consumption)....
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Coding Badly

What doesn't make sense to me...
I believe Nick ran the tests shortly after acquiring the current mirror.  Maybe there were some kinks that had not been worked out.


westfw

Floating inputs do not have a CONSTANT current consumption.  It depends on what voltage they float to, which depend on... lots of random factors.  If you have floating inputs, you can change the Current consumption by waving your hand nearby...

Go Up