Go Down

Topic: Attiny on battery power (Read 11569 times) previous topic - next topic

KiwiFreaK

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!

hiduino

2) Which core are you using?  If you use the http://code.google.com/p/arduino-tiny/, it has the t85@128KHz support.
Make sure you have the latest code, arduino-tiny-0100-0016.zip.

Coding Badly

Hello,
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.

Quote
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?


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.

KiwiFreaK

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!

Coding Badly

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.

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


AA and AAA batteries work well.

Quote
2) 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.

Quote
Does changing mode cost extra current?


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

fungus

#5
Jun 03, 2013, 11:59 am Last Edit: Jun 03, 2013, 12:02 pm by fungus Reason: 1

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...
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Erni

#6
Jun 03, 2013, 12:06 pm Last Edit: Jun 03, 2013, 07:26 pm by Coding Badly Reason: 1
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

KiwiFreaK

Thanks for the responses!

Quote
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!

fungus

#8
Jun 03, 2013, 07:07 pm Last Edit: Jun 03, 2013, 07:08 pm by fungus Reason: 1

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.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

KiwiFreaK

Thanks.

Quote
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?

fungus


Thanks.

Quote
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...

http://www.candlepowerforums.com/vb/showthread.php?67078-123-Battery-Shoot-Out

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


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).
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

genotix

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:



Go Up