Attiny on battery power

Hi all,

I would like to power my Attiny85 (@ 8Mhz) with a battery. Size does matter! Smaller is better!

Right now I've 2 questions:

  1. What should be the best / smallest / cheapest power source (battery)? My project is consuming around 70-100mA. Are there any tricks I should think of? I'm thinking about a CR2032.

  2. It would be nice for me to save power. Right now I'm running at 8Mhz. I cannot compile my code on board configuration: "Attiny85 @ 128 KHz", due to an error: "#error Add an entry for the selected processor speed.". Is there a reason why this is not working? Or am I not advised to do so?

Thanks!

  1. Which core are you using? If you use the Google Code Archive - Long-term storage for Google Code Project Hosting., it has the t85@128KHz support.
    Make sure you have the latest code, arduino-tiny-0100-0016.zip.

Hello,

KiwiFreaK:

  1. What should be the best / smallest / cheapest power source (battery)? My project is consuming around 70-100mA. Are there any tricks I should think of? I'm thinking about a CR2032.

Not going to happen. The load / voltage curves for CR2032 batteries don't go above about 4 mA. It's safe to assume a CR2032 cannot deliver that current which will make the application unstable. You are barking up the wrong tree.

  1. It would be nice for me to save power. Right now I'm running at 8Mhz. I cannot compile my code on board configuration: "Attiny85 @ 128 KHz", due to an error: "#error Add an entry for the selected processor speed.". Is there a reason why this is not working? Or am I not advised to do so?

Don't bother. The most effective way to conserve power, by far, is to put the processor to sleep for as much time as possible. If the entire application consumes 70-100 mA, going from 8 MHz (or 1 MHz) to 128 KHz is waste of time.

Thanks for the replies!

Yes, It looks like im using the latest version. But I've to double check it.:
1)
A) Isnt it true that a CR2032 should be able to deliver ~225 mA?
B) Are there alternatives? What do you guys suggest?
2) Sleep sounds good. How long will it take to let it sleep? Does changing mode cost extra current?

Thanks!

KiwiFreaK:
A) Isnt it true that a CR2032 should be able to deliver ~225 mA?

I assume you got that number from Wikipedia. You have the wrong unit of measure. The value is 225 mAh. That number is essentially the grand total amount of energy the battery can provide under ideal conditions. It is not the amount of current the battery can provide at any given instant. The "instantaneous" current is not available on the Wikipedia page.

For the "instantaneous" current you will have to consult a battery vendor's datasheet; I used the Panasonic datasheet because I buy my CR2032 batteries from Panasonic. The typical test conditions appear to be 0.2 mA which I assume is what a watch typically consumes. You want 100 mA. The battery vendors test at 0.2 mA.

B) Are there alternatives? What do you guys suggest?

AA and AAA batteries work well.

  1. Sleep sounds good. How long will it take to let it sleep?

The processor goes to sleep the instant you tell it to go to sleep.

Does changing mode cost extra current?

Putting the processor to sleep is almost free. Waking up is almost free.

KiwiFreaK:
A) Isnt it true that a CR2032 should be able to deliver ~225 mA?

Absolutely not. A CR2032 can deliver three or four milliamps at best - enough to run an ATtiny and a dim LED, not much more.

The CR2450 is about the highest current coin cell you can get. I've measured those at 9mA when powering a single LED - not even double digit mA...

If you don't know how to put a Tiny to sleep, Jack Christensen has made some great examples here

http://forum.arduino.cc/index.php?topic=167467.0

Moderator edit: session id removed from link

Thanks for the responses!

The value is 225 mAh

... Oops, I missed that. Sorry.

So you are suggesting AA or AAA batteries. What type (1) and how many (2) do you suggest? Do I need a regulator or just directly connect them (3)?

...are there any (smaller) alternatives? Maybe a 9V battery? Or other type of power sources?

Thanks for the 'sleeping' link! Looks nice!

KiwiFreaK:
So you are suggesting AA or AAA batteries. What type (1) and how many (2) do you suggest? Do I need a regulator or just directly connect them (3)?

...are there any (smaller) alternatives? Maybe a 9V battery? Or other type of power sources?

(1) Doesn't matter
(2) Do you need exactly 5V because of something you have connected to the chip?
(3) The bare chip will be perfectly happy with 3 batteries (ie. 3.8V-ish), will everything else?

CR123 batteries are small and can provide high current if needed.

If you're worried about battery life then forget about using regulators, 9V batteries, etc.

Thanks.

CR123 batteries are small and can provide high current if needed

These ones look great.
Whats the current of a CR123? Which type/brand do you advice?

Should one be enough to power my Tiny?

KiwiFreaK:
Thanks.

CR123 batteries are small and can provide high current if needed

These ones look great.
Whats the current of a CR123? Which type/brand do you advice?

It can be whole amps...

nb. There's also rechargeable ones that run at 3.6V if you need some extra volts.

KiwiFreaK:
Should one be enough to power my Tiny?

Easily enough for a Tiny.

Done properly, an ATtiny in sleep mode could run for over 50 years on a CR123 (not really, the battery will break down internally long before 50 years have passed).

I've built in a very high level of powermanagement in the software of the Arduino.
I noticed fresh CR2032 batteries would have enough power to run... but not for long.

When you check the curve you'll notice the voltage will almost drop instantly.

The CR123 has a lower drop effect

Offcourse the both are depending on voltage drop on the current drawn.

The C2032 is out of scope and imho so is the CR123.
I rather use a 9v block battery or a 3.7 volt Lithium 18650 battery.

The latter has a voltage that I think would be the best option given the fact that you could eliminate the VREG on the board.

Especially the discharge curve given the remaining voltage in the long run great with this battery: