Battery impulse counter based on ESPHome with ESP8266 and PCF8583 acting as hardware counter
Components:
- ESP8266 Module (for example NodeMCU)
- Photoresistor Module
- PCF8583 Real Time Clock
- 1KΩ Resistor
- 100nF Capacitor
- 3.3V LiFePO4 battery
- Prototype board and some wires
Example configuration for energy meter with 6400 impulses per kWh. You can change that in yaml:
return (1000.0 * (delta_count / 6400.0) * (3600.0 / 60.0));
state: !lambda return (x / 6400.0);