555 Timer as power usage sensor

Electricity meters usually have blinking LED lights whose flashing rate is associated with the amount of energy usage. This example shows how to use a 555 timer chip acting as Schmitt trigger combined with a phototransistor or LDR to sense the flashing LED on the electricity meter for monitoring electricity usage.

555 timer as power meter

555 timer as power meter

The output of the 555 timer chip is connected to one of the GPIO pins on the Raspberry Pi. A Python script (executing in the background) recording 555 events is calculating actual energy usage [e.g. Watt] every time the 555 is signaling and stores epochs in an SQLite3 database. From this, another Python script (executed from e.g. cron) generates all kinds of energy usage information (e.g. kWh or kWday or whatever). Using Node.js (running on the same Pi) all data is ‘RESTified’ enabling spreading out to the W3. To maintain privacy JSON web tokens are required every time the service is queried. Oh, and there is also a Pimatic plugin available (here)

Related Posts

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *