https://www.cube.eu/de-de/cube-trike-family-hybrid-750-swampgrey-n-reflex/789520
- Battery from Bosch, required to be removed for charging
- Charger does not allow smart control and always charges to 100%
- Control when to charge
- Control target SOC (ex. 80%) to enhance battery lifetime
- Cut power to charger when done for safety reasons
- D1Mini ESP32
- Push Button
- Switch
- Luminosity sensor
- Smart power socket
- ESPHome
- Home Assistant
- 3D Printer
The charging station needs to have following features, detect battery presence, read current SOC and toggle battery saving mode. Using ESPHome, we can connect a push button to detect the battery, a simple switch to choose the mode and a carefully placed luminosity sensor wih a resistance dividor to get the number of LEDs turned on. There are 5 LEDs which indicate the rough SOC in 20% steps. Using the analog input of the ESP32, we convert the raw signal, combined with the battery presence, to a SOC and expose it as sensors to Home Assistant. In Home Assistant, we implement 2 scripts to turn on the power socket with the charger when a battery is detected and turn off the charger when the battery reached our desired SOC.
Connector and LEDs for current battery charge.
See here for 3D printing.
https://www.thingiverse.com/thing:6999548/files
Available sensors exposed from ESPHome.
Typical charging session to 100%.



