I would like to power my Attiny85 (@ 8Mhz) with a battery. Size does matter! Smaller is better!
Right now I've 2 questions:
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.
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?
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.
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.
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?
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.
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:
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.
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.