# How to determine how long batteries will last for my project?

Hi,

I have a very simple project: ATTiny85V, a pir motion sensor, and an RF transmitter. From the transmitter's datasheet its current consumption is 8 mA and I can't find the consumption of the pir in it's datasheet (unless it is called the "Effective voltage" which is 0.2 - 1.5 - not sure if that represents it's current consumption in mA).

I'm trying to figure out how to choose the right battery(ies) and how long I can expect those batteries to last. I'd like to use coin cell batteries to save space.

I am polling the pir once every second and the transmitter will only send a signal when motion is detected (in my scenario motion will only be detected a few times a day).

I apologize if this is a basic question.

Thank you in advance,
LT

Coin cells are good for a few hundred mAh?
http://www.dipmicro.com/store/BAT-CR2032
225 for example.
Can the attiny be put in sleep, to wake up when PIR pulls a pin low?
Then send out some pattern - see the virtual wire library for the kind of sequence to send that a receiver can pick up on and interpert correctly.
Best method is to measure the current during the actual conditions, sleeping and transmitting.
Probablys see ~5-10mA while sleeping depending on the PIR, and a jump to 15-20nA while transmitting.
So 225/10 = 22 hrs.
Better off with a 1000mAh LiPo, can find them in niice small flat package.

Thanks - I'll look into putting the tiny to sleep.

I already have all the rf stuff working - and I am currently designing an enclosure for the unit that I'll 3D print. I just need to choose the right batteries so that I can finish the enclosure.

And I'd prefer to not have to change the battery(ies) every day.

Could I increase the number of batteries to increase battery life?

Thanks again!
LT

It would also be cool to somehow detect when the batteries are low. I could send out another rf message to let me know when they need changing.

See this great tutorial EEVblog #140 – Battery Capacity Tutorial – EEVblog

Increasing the batteries in series just increases the voltage - not the mAh.
If you connect in parallel then you have to start playing games to account for then running down at different rates.

I have a 1000mAh LiPo in a remote control running an 8 MHz promini that mostly sleeps, a 434 MHz Tx modukle, and 16 button keypad. Lasts several weeks to a month between charges. Added a Maxim 1811 charge control chip to recharge it from 5V source.

Bring the power in to an analog pin and measure it when the PIR wakes the processor up.

You guys rock - thank you so much!

By the way, I found this cool battery life calculator: Oregon Embedded - Battery Life Calculator

Best,
BT