how to calculate the current available on the battery/accumulator


I want to ask
how can we know the current capacity of the battery to know that the battery is still good / need to be charged. thanks

please help me, i need a program to be able to monitor the voltage and current on the battery so that i can know that the battery needs to be re-charged or not. thanks.

It will take external circuitry to monitor the current and voltage of most batteries, not just a program. Google will help with the details.

Battery capacity changes with age and use, so any system to keep track of remaining battery capacity has to first learn what that capacity is, usually be discharging the battery completely for more than one cycle.

You can measure external power supplies with a voltage divider ( Measuring Voltage with Arduino ) and you can (probably) measure the arduino's supply voltage with "the secret voltmeter" ( Google Code Archive - Long-term storage for Google Code Project Hosting. ).

The simplest way to know if a battery needs to be recharged is to monitor the voltage. But even that can be complex. Have a look at the Battery University website