I'm designing a smart bin for my paper and would like a sensor that continuously monitors the battery level in real time and in percentage value and then sends the data to the administration office. What sensor can I use? And how can the percentage value be obtained?
The way battery capacity is usually monitored by reading the voltage. You need to look in the datasheet for the voltage span of your battery when it's fully charged and when it's "empty". The battery will never be totally empty but you will define a safe voltage to cut it off as to not damage the battery as indicated in the datasheet, this is your "0" percent.
To get the percentage you would need to calculate it either from the data sheet and the characteristic of the battery or do a measurement of it from full to empty and then estimate the percentage left.
A microcontroller can be used to read the voltage into its ADC port, probably with a voltage divider. Something like an Arduino is a good start. You can then do the calculations in code and send it over something like Bluetooth to an app or your choice of communication.
Below is an example of how you might do it.