Senin, 03 Juni 2019

Thingsboard energy meter

Energy Monitor in 15 Minutes

1,554
7
https://www.instructables.com/id/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: https://thingsboard.io.
Parts needed:
ESP8266 TTGO 0.91" OLED (or ESP8266 + separate i2c OLED)
LDR (light dependent resistor)
10K resistor
Cost:
About 9$ total.
Tip:
The ESP8266 TTGO 0.91" OLED is sold on ebay, search: 'esp8266 oled 0.91'.

Step 1: Solder

Picture of Solder
Picture of 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:
https://github.com/skjolddesign/ESP8266-Energy-Monitor.
Dependencies:
You need some libraries, U8g2lib, PubSubClient, You find these in Library manager.
Settings:
Set your values in top of code. They are well explained.
Upload:
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

Picture of Thingsboard
Picture of Thingsboard
Picture of Thingsboard
Picture of Thingsboard
Sign up for a free live demo at https://thingsboard.io.
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.
Done.

Tidak ada komentar:

Posting Komentar