Sunday, February 23, 2014

Battery Capacity Percentage Estimation in Seeediuno Stalker

Battery capacity of a battery for Seeeduino  is defined by the following equation :

Battery Capacity = {(Battery Voltage - Minimum Battery Voltage) / (Maximum Battery Voltage - Minimum Battery Voltage) } *100%

For a LiPo Battery with any capacity, Maximum voltage is 4.2V and Minimum voltage is 3.6V. If you need you can set maximum, minimum voltage for your battery. So :

Battery Capacity = (Battery Voltage - 3.6) / (4.2 - 3.6)
                                     = (Battery Voltage - 3.6) / 0.6

We do not have a direct way of measuring battery voltage from Seeeduino. We can only get the directly proportional PWM value for voltage. For Seeeduino battery voltage is got from analog pin A7. But A& is located as follows :



There is voltage dividing circuit in this diagram. So the Equation will be as follows :
Battery Capacity ={( (Value at A7 * (10+2)/2 ) - (3.6*1024/3.3)) / (0.6*1024/3.3)} * 100%
Here 3.3 is analog reference voltage. 3.3 is mapped to 1024.

So for estimating the battery capacity we only have to read the analog value at pin A7 and the substitute in the above final equation.

No comments: