I only do electronics stuff as a hobby so forgive my simple question.
I have a simple IR LED/photodiode detector circuit hooked up to an arduino microcontroller. It's not important but the purpose is a drip monitor. I want to put this circuit in a box and hook up a battery supply rather than my computer. I was wondering how to go about estimating the lifetime of this circuit and how long I should expect to wait before thinking about replacing the battery. Is power consumption the only factor to worrry about here.
How do I calculate the power consumption for the entire circuit? I know P = I*V = I^2*R but that's only for a single element. Is there an easy way to measure the power for the whole circuit? Also, how do I measure the power for the Arduino? It has many pins so I'm not sure how to measure the voltage and current "across" it.