Code for battery’s lifetime in Arduino

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
weal
 
Posts: 87
Joined: Sun Sep 29, 2019 12:30 am

Code for battery’s lifetime in Arduino

Post by weal »

How to write a code in Arduino to calculate the battery consumption Or supplied power?
I'm using a 3.7v 2800mah battery with a solar power manager to provide Arduino with 5v.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Code for battery’s lifetime in Arduino

Post by adafruit_support_bill »

You can monitor the battery voltage via one of the Arduino analog pins. But voltage alone does not provide a very good estimate of actual charge level. We have a 'fuel gauge' breakout which can provide a better estimate: https://www.adafruit.com/product/4712

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”