I have seen that e-bike batteries may drain by itself. Batteries charged to 40%, which is a good practice to extend lifetime, were completely discharged after one month. So I opened a battery and tried to investigate what happened. By doing measurements at the electronics, I found out that the cause of the discharge is the fuel gauge, which had a quiescent current of 6mA. This will take just one month to discharge a battery which is charged to 4Ah.
Beware with e-bike batteries that are equipped with this kind of fuel gauge:
Battery fuel gauge which discharges the battery
In one case, the fuel gauge was connected directly to the battery pack, outside of the BMS, which protects the battery against over-discharge. As a result, the battery was discharged to 0V. Because of safety reasons, the BMS had disconnected the battery pack from the charge connector, to disable recharging. I didn't want to throw away the battery, so I tried to revive the battery. I opened it and I connected the battery pack directly to a laboratory power supply. A small charge current of 100mA has brought the battery back to life again. Note that this is against rules; but afterwards I checked the capacity, it was not harmed.
In order to prevent discharge, I modified my batteries so that the fuel gauges are connected behind the BMS and the power switch now. Thus the power switch turns off the fuel gauge too.
Battery fuel gauge board
Battery fuel gauge board
The battery fuel gauge is built with a microcontroller EM78P458A. The LED bar measures these voltages levels: 32.5V, 35.0V, 37.0V, 38.5V.
The power consumption can be reduced with some modifications:
The fuel gauge does nothing else but measuring the battery voltage. Determination the battery state-of-charge (SOC) is therefore just a rough estimation. At LiFePO4 batteries, where the discharge curve is almost flat, this is not possible in an easy way.
LiFePO4 battery discharge curve
See Wikipedia for more about state-of-charge measurement.
Note that that my fuel gauges for LiFePO4 and Li-NiCoMn batteries use the same voltage levels.