Disclaimer: I don’t recommend using it where the battery percentage estimate is critical, like smoke detectors. In such devices, I suggest using the batteries recommended by manufacturer. Using a different type of battery can affect the estimated battery life, which can cause unexpected loss of function when needed.
There are various devices that use AA/AAA batteries and seem to be designed for primary (non-rechargable) cells. When you put fully charged NiMH batteries in them, they might show something like 86 %. The reason is that primary cells have a different discharge curve than NiMH cells. Primary cells start at about 1.5V and then go almost linearly down. NiHM cells start at about 1.4V, then they quickly go to about 1.2V for most of the battery life, and then they go quickly lower.
So, I’ve decided to recalculate the battery percentage. The idea is simple:
- Calculate approximate battery voltage from the battery percentage. (Some devices also provide the voltage, so you can skip this step.) I do this linearly with the assumption that 100% = 1.5V and 0 % is something like 1V or 0.9V (depends on the device).
- Calculate battery percentage from the voltage based on the NiMH discharge curve. Again, it will depend on the device’s minimum acceptable voltage, but with NiMH batteries, you should not go under something like 0.9V or maybe 0.8V. I’ve seen an approximate formula (for 0% at 1V) there: batteries - Algorithm to know NiMH battery level - Electrical Engineering Stack Exchange
So, I’ve made a sheet that estimates the NiMH battery percentage:NiMH and primary battery estimates - Google Sheets
Note that for the most of the time (between 15 % and 90 % of actual battery percentage), just 1 % difference of reported battery percentage causes 7.5 % difference in estimated actual battery percentage. This is the phase where the voltage declines slightly and I cannot do much about that.
If you have a better estimate, you are welcome.