Please note that the battery charge state cannot be calculated very accurately based on the voltage alone. However, you can use it to estimate the state of charge or the battery health.
This is because the voltage vs. charge curve is not linear, and because the battery is being charged during the day. The latter will cause te voltage to read higher during charging. During the night, the voltage reading will be more accurate, as the battery will ‘’have rested’’.
We are using Yuasa NP12-6 batteries. At 100% charge, the open circuit voltage is 6V. At 0% charge, the open circuit voltage is 5,75V. You can consider the voltage measured during the night as an ‘’open circuit’’ due to the low power consumption.
You can use this information for the following formula:
100-((6-voltage bat measured)/((6-5,75)/100))