How much battery charge you have left on your ebike is almost as important as knowing how much gas is in the tank in your car. I say almost because at least you can still pedal your ebike when you run out of juice. Sometimes the battery state of charge gauge is very inaccurate on ebike conversions. There are all kinds of reasons for this. Sometimes it is the accuracy of the display, sometimes the display is not configured for the voltage of the battery you are using. This can be confusing and for some it can be aggravating to have a new ebike setup and not have an accurate battery gauge to know how much charge is left. Often times this can be fixed by properly configuring the display with the correct battery voltage but sometimes there is nothing you can do except perhaps get a different display. If everything else on your ebike conversion is working then there is actually a better way to know more precisely than using a gauge or battery percent exactly how much battery is left. This is by reading the exact voltage your battery is putting out.
Lithium Ion batteries vary in voltage from full to empty. This is consistent across all batteries of the same nominal voltage. For example, if you have a 48v battery, 48 volts is the 'nominal' voltage or middle of the range of voltages for that battery. When you charge a 48v battery it actually charges to 54.6 volts and when it is empty it will be somewhere around 40-41 volts. Most ebike displays can show the actual voltage of the battery at any point in the discharge cycle. If you don't see the voltage on your display, go into the configuration menu and chances are you will see an option to enable having the voltage on your display. Sometimes you have a choice between voltage and percent. Choose voltage. Usually you already have a battery gauge that is roughly showing the percent of charge by graphically showing the battery with part of it lit. To know exactly how much battery you have left using the voltage reading, memorize the below voltage values for your battery and you will always know exactly how much charge you have left.
That is basically all you have to know. You can stop reading here but I will fill in a few more details below to explain what is going on and a few other things to watch for.
The full tank voltage for your battery above is actually what your charger puts out to charge your battery. When your battery is full it reaches the same voltage as your charger. If you have a smart charger that extends your battery life it will put out about 1 volt less for 90% charge and 2 volts less for 80% charge. This will extend your battery life by 2.5x at 90% and 4x for 80%. Notice that a decrease of 2 volts takes you down to 80%. This is because the above voltage ranges are not linear. There is more energy packed into the higher voltages so the further down the voltage drops the faster it drops. That is why you are almost empty at about 3 volts above empty.
Your bike might start cutting out when you are almost empty. This is because the voltage drops when you ask for power. The more power you ask for the further the voltage drops. Bigger batteries will drop less than smaller batteries. To keep from cutting out when you get this low don't ask for as much power. You may still be able to get home if you ride at the lowest assist level or barely use any throttle. Use too much power and the power will cut off. On some bikes you may need to turn it back on but on most the power will return when the voltage goes back up after the drop from excess power.
The power cuts off because there is a low voltage cutoff programmed into the controller. This protects your battery. Your battery also has a low voltage cutoff that is usually a little under the controller low voltage cutoff as an extra layer of protection. This is because Lithium Ion cells can never be allowed to fully drain or they will be permanently damaged. For most cells the voltage below which will damage it is 2.6 volts. As an example, a 48v battery has 13 cells in series which means you multiply the voltage of each cell by the number of cells to get the output voltage. In this case the lowest voltage before damage occurs is 13x2.6=33.8 volts. For 52 volts this is 14*2.6=36.4 volts and for 36 volts it is 10*2.6=26 volts. You might ask why the low voltage cutoff is set so much higher than these voltages? It is because voltage is dropping fast on the low end of the voltage spectrum and if you don't charge it immediately it may drop dangerously low before you charge it and permanently damage the battery. Batteries that are being stored will slowly lose their charge so Lithium Ion batteries should be periodically charged even when they are not being used.
Note for TSDZ2 OSF version 1:
The OSF state of charge reading relies on the watt hours you entered in the configuration and the reset voltage you entered. When it sees a voltage above the reset voltage when you power it on it starts a new countdown based on the watt hours used. I personally ignore all of that and just go by the voltage. There are several places on the display where you can have it display the actual voltage of the battery.