Hi,
Do you need those exact points?
The current is not linear with the state of charge. In fact, for a part of the charge process it is constant.
However, charge itself is current I times the time t, so you could measure current and how long it remains at that current and use that as a guide.
For example, if it charges at 1 amp for 1 minute, that's 1 ampere minute. Charging at 1 amp for 2 minutes is 2 ampere minutes. Charging for 0.5 amp for 2 minutes is also 1 ampere minute. So what you could do is measure the current every minute and sum all the measurements.
For example, say it charges at 1 amp for the first minute, that's 1 ampere minute, then 1 amp for the next minute, that's another ampere minute for a total of 2 ampere minutes. Now say the current drops to 0.9 amps for the next minute, that's 0.9 ampere minutes so the total now is 2.9 ampere minutes. So the charge is accumulating over time here.
If the cell rating is 2 ampere hours that's equivalent to 120 ampere minutes, so if you've only accumulated 2.9 ampere minutes the cell is only charged to 2.9/120 (2.4 percent) of its capacity. When the ampere minutes accumulate to 12 ampere minutes thats 12/120 or 10 percent, so when they accumulate to 24 ampere minutes that's 20 percent and that's your first target point (you said 20, 40, 60, 80, and 100). You have to wait for another 24 ampere minutes to accumulate before reaching 40 percent.
So all you do is measure the current once every minute and then sum the results and then divide by the cell rating in ampere minutes.
There is a catch here however, and that is that the cell has to be fully depleted in order for it to take a full 120 ampere minutes of charge. If it is not fully depleted, you'd have to compensate for that by starting the algorithm with a non zero charge accumulation. For example say it has 10 percent charge left, you would then start with 12 ampere minutes instead of zero ampere minutes and accumulate the same as before.
This brings up the next issue, estimating the state of charge. To do this with an Li-ion cell you measure the voltage and do a little formula and that gets you somewhat close to the initial state of charge assuming the cell had been sitting unloaded for at least 12 hours or so. You can look for the formula on the web, if you cant find it i'll check my personal notes.