Calculating Battery Life Using Power Consumption
Ryan Chen foray power consumption arduino arduino nano battery current sensorI have added time remaining functionality to the power consumption board that I have. However, it is not refined and therefore has a few caveats for use.
- The program assumes that the battery is at full charge upon program start.
- While there is no current through the sensor, the time remaining will be inaccurately displayed. This should be fixable within a couple hours of work.
The time remaining works using the total battery capacity in mAh. Then, it takes the difference in time between measurements and subtracts from total time remaining based on the amount of current used at that moment. If no current is drawn, the time will not go down. The more current that's drawn, the faster the time remaining drops. Based off of initial calcuations, the total time with a 1000mAh battery and 1 6mm motor is approximately 2.3 hours.
Video of current sensing system:
Picture of Results (Time is in minutes)
Changes to the code are available at our gitlab repository at this location:
https://git.uclalemur.com/ljhnick/foray/blob/master/PowerConsumption/currentSense.ino