GalaxyBudsClient icon indicating copy to clipboard operation
GalaxyBudsClient copied to clipboard

[REQ] Battery usage data, battery health estimation, remaining battery usage duration

Open MollyBe opened this issue 3 years ago • 6 comments

It is not possible to know how degraded the battery life of the device, headphones or case is.

GBM should keep track of battery usage and use that data to estimate battery health (capacity) and use duration at 100% battery. It would be great to also estimate battery health and use duration at 100% battery without battery usage data. Battery health could be displayed in GBM - System - View System Information - Battery Type.

The dashboard could be improved by including:

  • Case battery %
  • Case voltage, milliamp hours and watt hours (switchable, like the temperature switch between Celsius and Fahrenheit)
  • Case drain and charge in mA and watts (switchable)
  • Case temperature (switchable)
  • Case remaining use duration at current battery % (Switchable, current power drain and average power drain)
  • Earbud voltage, milliamp hours and watt hours (switchable)
  • Earbud drain and charge in mA and watts (switchable)
  • Earbud use duration at current battery % (Switchable, current power drain and average power drain)

Below the earbuds & case menu a new menu could display:

  • Case charge duration and use duration for 20%, 40%, 60%, 80% and 100% battery
  • Earbud charge duration and use duration for 20%, 40%, 60%, 80% and 100% battery

MollyBe avatar May 07 '21 11:05 MollyBe

I also thought about something similar after someone contacted me who was trying to research the battery drain issue, but I didn't think it through yet until now:

  • Earbud voltage, milliamp hours, and watt-hours (switchable)

The voltage is already visible. Calculating the milliamp hours and watt-hours is not really useful; instead, you could use the same (rearranged) formula to calculate the remaining use duration at most: (batteryCapacity_mAh)/(current_Amps*1000) = (hours)

  • Earbud drain and charge in mA and watts (switchable)

This is possible, but I didn't implement this because the Buds+ and later models return invalid milliampere values (the original Buds, on the other hand, had no problems here). Maybe they changed some internal calculation stuff, and I need to convert it back to mA, but I didn't look into this much further at the moment. I could try to attach an ampere meter to the charging contacts while charging and compare it with the values the earbuds are sending to my app to find some correlation between my and the internal measurement possibly.

  • Earbud use duration at current battery % (Switchable, current power drain, and average power drain)

As mentioned above, as long as I can't retrieve valid ampere values, I'm unable to calculate this.

  • Case temperature (switchable)
  • Case voltage, milliamp hours, and watt-hours (switchable, like the temperature switch between Celsius and Fahrenheit)
  • Case drain and charge in mA and watts (switchable)
  • Case remaining use duration at current battery % (Switchable, current power drain, and average power drain)

External apps can't retrieve any other data except the battery percentage from the ADC in the case. Due to the lack of these values, I'm unable to calculate any estimated battery use duration.

It is also important to note that it is impossible to retrieve the case battery value while the earbuds are not in the case (the official app and mine as well previously just froze the case battery percentage when they were not in the case), so I can't use it for any battery estimation/logging anyway.

  • Case battery %

I'm already displaying the case battery percentage (original Buds are not supported).

GBM should keep track of battery usage and use that data to estimate battery health (capacity) and use duration at 100% battery. It would be great to also estimate battery health and use duration at 100% battery without battery usage data.

I could keep track of the battery measurements and display them in a graph, but calculating the battery health is harder than it sounds; I'd need to write something like a coulomb counting algorithm for the earbuds. It also requires the battery current for calculation, so I'd first need to get that working first.

timschneeb avatar May 07 '21 14:05 timschneeb

The voltage is already visible.

My Buds2 show 0.00V no matter what.

githubcatw avatar Sep 26 '21 17:09 githubcatw

My Buds2 show 0.00V no matter what.

Samsung probably removed that debug feature from the Buds2. If that's the case, I won't be able to bring it back.

timschneeb avatar Sep 26 '21 19:09 timschneeb

Looks like the command still has the AdcVCell values but they are always returning 0.

image

githubcatw avatar Sep 27 '21 13:09 githubcatw

Looks like the command still has the AdcVCell values but they are always returning 0.

Could you capture a Bluetooth traffic dump using File > Dump to file... in the developer mode window? Maybe they only changed the byte order of the message, and the voltage data can now be found at a different offset.

timschneeb avatar Sep 27 '21 15:09 timschneeb

get_data.zip

I replaced the MAC addresses of the left and right earbuds with L and R respectively.

githubcatw avatar Sep 27 '21 15:09 githubcatw

Since most newer Buds models do not report the correct voltage and amperage anymore, it won't be possible to implement this properly.

timschneeb avatar Feb 11 '24 00:02 timschneeb