Battery Percentage.

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ZeikTuvai
 
Posts: 36
Joined: Fri Mar 06, 2015 10:49 pm

Battery Percentage.

Post by ZeikTuvai »

Hello everyone.
I have some projects where I use a powerboost 1000 to power these devices and I have used the LB pin to signal the device that the battery is really low. The question is though, is there any method at all of getting a percentage from the battery of what is remaining?

If not, then would it be possible for me to measure the peak usage of the project, calculate that against the mah of my battery to get the estimated run time. Then write code that could count down and attempt to estimate the remaining battery. Anyone think that would work or would there be too many unknowns for it to be remotely viable.

Thank you everyone,
Greg

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Battery Percentage.

Post by zener »

It can be done. It's often called battery gas gauge. There are IC's sold to do this or you can DIY it with code as you describe.

https://www.sparkfun.com/products/10617

User avatar
ZeikTuvai
 
Posts: 36
Joined: Fri Mar 06, 2015 10:49 pm

Re: Battery Percentage.

Post by ZeikTuvai »

Very cool! Thank you so much for that. Now do I just hook the JST to this thing and then the vcc and ground to the powerboost via another jst?

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Battery Percentage.

Post by zener »

You will probably need to ask over at Sparkfun about that. Their product details are not super clear IMHO. The JST connector is for hooking to the battery. The device appears to work just by monitoring the battery voltage. You communicate with the device via I2C and they have some example code. I guess that is all there is to it but I am not familiar with that part.

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

Return to “General Project help”