Battery impulse counter based on PTVO Zigbee firmware with CC2530 and PCF8583 acting as hardware counter
Components:
- CC2530 Module (or E18-TBL-01 Module)
- Photoresistor Module
- PCF8583 Real Time Clock
- 1KΩ Resistor
- 100nF Capacitor
- 3V Battery (like CR2450, CR2032, etc or 2xAA/AAA)
- Prototype board and some wires
Example converter for energy meter with 6400 impulses per kWh. You can change that in lines:
power = 1000 * (deltaCount / 6400) * (3600 / deltaTimeSec);
const energy = val / 6400;