Energy Monitor in 15 Minutes

About: Passion for electronics, and love to solve bigger problems with the the most performing solution. 'Let the machines do the work' Founder of Skjold Display.

This is a wifi sensor to tape on the flasher in your electricity meter.
It detects flashes with LDR, and displays power on OLED display.
Sends data to Thingsboard Dashboard.
Sign up for a Free Live Demo:

Parts needed:
ESP8266 TTGO 0.91" OLED (or ESP8266 + separate i2c OLED)
LDR (light dependent resistor)
10K resistor

About 9$ total.

The ESP8266 TTGO 0.91" OLED is sold on ebay, search: 'esp8266 oled 0.91'.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Solder

There are only 4 solder points:
LDR goes to A0 and D0(gpio16).
10K resistor goes to A0 and GND.

Step 2: Code

Program is made with Arduino.
Download code at my Github site:

You need some libraries, U8g2lib, PubSubClient, You find these in Library manager.

Set your values in top of code. They are well explained.

Select programmer 'LOLIN(WEMOS) D1 R2 & mini'.
If you dont see it in boards meny, install ESP8266 in Arduino Boards Manager.

Go to this thread if your TTGO OLED is not working. A few i2c OLED pinouts is showed there.


Step 3: Thingsboard

Sign up for a free live demo at

Add device, with name Energy monitor.

In Device 'Details', click 'Copy access token'
Paste this in Arduino code, and upload.

If all went well, you should now see data in Device 'Latest telemetry'.
Select wPeriod telemetry data, and click Click 'Show on widget'.
Select Chart in drop down, and click arrow to the right, to select the third widget.

Click add to Dashboard.
Select a existing, or create a new dashboard.
Select 'Open Dashboard', and click OK.


Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest