25

Short and simple: What is the power consumption for an ATtiny85 running at 1 MHz and 8 MHz using the internal clock? Not using any sleep modes.

I have googled a lot and can't find any info on this. I ask because I want to know if it is worth using 1 MHz to increase battery life.

Greenonline
  • 2,844
  • 7
  • 31
  • 46
marlar
  • 467
  • 1
  • 6
  • 10
  • 3
    The datasheet is the 1st place to look for things like this – Russell McMahon Aug 06 '15 at 02:54
  • 2
    I actually did look in the datasheet. But is very long (234 pages) so I searched for strings like "power consumption" etc without luck. If I had just searched for "current" instead I would have found it! – marlar Aug 06 '15 at 08:31

1 Answers1

50

The datasheet shows that current decreases at lower frequencies. Around 1 mA at 1 MHz running at 5 V. More like 5 mA at 8 MHz running at 5 V.

Supply current vs frequency

You can save quite a bit by using lower voltages as well, as you can see. For really big savings use a sleep mode. Read about Power saving techniques for microprocessors.


(Edited to add)

To amplify on my remarks, you should be able to get 200 nA consumption at 3.5 V in sleep mode with no watchdog timer. That will still respond to interrupts, such as closing a switch.

Supply current with watchdog disabled


If you need to do things periodically you can enable the watchdog, and then get around 5 µA consumption at 3.5 V.

Supply current with watchdog enabled


This is so much less current than the 1 mA mentioned above, that it is well worth exploring running in power-down mode, where possible.

Nick Gammon
  • 35,792
  • 12
  • 63
  • 121
  • 2
    Wow. This answer is brilliant and a perfect example why I love Stackexchange so much. Thanks a million! – marlar Aug 06 '15 at 08:29
  • 3
    Nice answer. I would just add that, when using sleep modes, the relevant metric for _active mode_ consumption is not the current (consumed charge _per unit time_) but the consumed charge _per clock cycle_. Thus, it seems that running at 8 MHz is more efficient (5 mA / 8 MHz = 0.625 nC/cycle) than running at 1 MHz (1 mA / 1 MHz = 1 nC/cycle). – Edgar Bonet Aug 06 '15 at 08:37
  • @EdgarBonet: Is that because it takes less time to run the program when it wakes up at 8Mhz compared to 1Mhz? So it can again go to sleep as soon as possible. – marlar Aug 06 '15 at 08:53
  • @Nick Gammon: When dealing with low power comsumption, what would be the best option to run the Attiny from 12V? A 7805 is rather inefficient I believe. – marlar Aug 06 '15 at 08:57
  • @marlar: Exactly! You have some job to do when you wake up, which takes a fixed number of cycles irrespective of clock frequency. Then you care about the consumption per cycle, not per second. – Edgar Bonet Aug 06 '15 at 09:12
  • `but the consumed charge per clock cycle` - absolutely. Which is why I mention on my page about power, that if you operate at a lower clock speed you might be using less power, but you are using it for **longer**. – Nick Gammon Aug 06 '15 at 09:39
  • `what would be the best option to run the Attiny from 12V` - if you really must have 12 V as a supply, you may well find a [buck-mode switching power supply](https://en.wikipedia.org/wiki/Buck_converter) more efficient. – Nick Gammon Aug 06 '15 at 09:40
  • @NickGammon: Thanks. 12V is used by the stuff that Attiny controls, that's why. – marlar Aug 06 '15 at 09:54
  • 1
    @marlar, if the thing that the Attiny controls uses 12v, then you should first and foremost look at the power consumption of this device - it's no good saving 2 or 4 mA, if you are running something that draws 2 amps. – AMADANON Inc. Aug 06 '15 at 21:34
  • 1
    @AMADANONInc.: you are of course right. But the controlled components are dormant most of the time and use no power except when attiny think it's time to call to action. Apart from that, there is certainly also a learning element here. I really want to investigate low-power mode. – marlar Aug 07 '15 at 06:29