If power an Arduino with a powerbank (battery for phones) I don't think it's possible to retrieve the level of charge? It give always 5V then when empty it falls directly to 0, so there's no possibily to catch it... Isn't it?
With 5V lithium-ion battery it's maybe possible but they're small in comparison, 3000mAh max. Powerbanks are often between 10000 and 20000mAh. But let's say it's possible, which module would you use to mesure it and how to display it to the user with for example a module like MH-DL18S which has 4 bars?
Not without modifying the power bank. It delivers 5V until it considers the battery to be fully discharged.
In general it is quite difficult to implement an accurate battery "fuel gauge", because there are many different types of batteries, and the characteristics of each individual cell changes with age and usage.
Thanks for the answer, I understand.
Until now I use powerbanks for their big capacity but I wanted to try something else even if the capacity is inferior, just to have a gauge/indicator which is important to know if the device needs to be recharged or not. But if you say it depends of each sort of batteries, it seems complicate!
Too bad
You can make own powerbank with huge capacity by connecting cells in parallel. you need an appropriate control board and you can feed it to Vin of arduino and measure direct battery potential which will give you an idea how much charge you have left. Start by reading about batteries you want to use and their charging cycle