Finding time till battery will fully charged

At the moment, I determine the start time of charging, the percentage of the start of charging and, based on these data, I try to calculate the time until the end of charging. However, the problem is that the values ​​that come from UIDevice.current.batteryLevel don't quite match. Since their accuracy is .00 and this way I can only get data from 1% change.

Question Is there any other way to determine the time until the end of charging, or a way to increase the accuracy of reading the charge level?

Thanks in advance for your help.

Answered by Claude31 in 697727022

Depends how accurate you want.

I would look for several ways:

  1. observe on different devices the charging profile (charge vs time), from 5% to 95% (this may depend on the charger)
  • use this abacus to estimate time to charge when you get the initial battery level (SoC)
  • Problem: you need to get such a profile for all types of devices and that will change with battery ageing. In addition, iOS may modify charging power depending on conditions (like temperature or also its learning of charging habits).
  • see such a curve example here (in french, but chart is OK):
  • h t t p s : / / w w w.it-swarm-fr.com/fr/iphone/comment-obtenir-le-niveau-de-batterie-en-temps-reel-sur-ios-avec-une-granularite-de-1/1068029999/
  1. Full charge requires about 100 minutes, which means 1% / minute.
  • If you measure at 5' interval, don't you get enough accuracy ?

Accepted Answer

Depends how accurate you want.

I would look for several ways:

  1. observe on different devices the charging profile (charge vs time), from 5% to 95% (this may depend on the charger)
  • use this abacus to estimate time to charge when you get the initial battery level (SoC)
  • Problem: you need to get such a profile for all types of devices and that will change with battery ageing. In addition, iOS may modify charging power depending on conditions (like temperature or also its learning of charging habits).
  • see such a curve example here (in french, but chart is OK):
  • h t t p s : / / w w w.it-swarm-fr.com/fr/iphone/comment-obtenir-le-niveau-de-batterie-en-temps-reel-sur-ios-avec-une-granularite-de-1/1068029999/
  1. Full charge requires about 100 minutes, which means 1% / minute.
  • If you measure at 5' interval, don't you get enough accuracy ?

Finding time till battery will fully charged
 
 
Q