When faced with the design of a battery-powered device the first question we must answer is: How much the batteries will last?
The answer to the above question determines how often the battery will need to be replaced, and even allows you to distinguish a viable design or product from one that is not. Suppose you have installed a couple of thousand sensors and some time later you find out that the batteries last only a couple of weeks. Congratulations, you've just messed up your life.
For a device with only one consumption state (constant current consumption) this is relativelly straight forward, but for devices with multiple consumption states it is not.
In this post I present how to estimate battery life and a JavaFX software to not only obtain the battery life given different consumption states of a device, but also to evaluate how much a variation of one of the two parameters (time or current) of each state will affect the battery life.