Giter VIP home page Giter VIP logo

smart_electric_monitoring's Introduction

IoT Smart Electric Monitoring

This project aims at developing devices to measure electric power consumption from other domestic devices simultaneously, then publishing their readings to an MQTT broker, to finally visualize readings on a web page.

Getting started

Clone the repo on your local machine:

git clone https://github.com/hector6298/smart_electric_monitoring.git
cd smart_electric_monitoring

Include your microcontroller model on Boards Manager on your Arduino IDE. Install the following library on Arduino IDE as well:

ArduinoJson

Then install python required dependencies:

sudo pip3 install -r requirements.txt

Now follow these steps:

1.- To recreate the device refer to construction section. Tinier, version coming!.

2.- Open publisherSensor on your arduino IDE, then flash publisherSensor.ino on your wifi-capable microcontroller.

3.- Note that we make use of MQTT communication protocol to publish the power and current measurements of devices being monitored. Therefore you should create an MQTT broker with topics named 'current', 'power', and 'reset'. Please visit ioticos, or emqx cloud, they offer creation of nodes free of charge.

4.- After MQTT broker is set:

cd subscriberWebServer
python3 app.py -broker YOUR_BROKER -port PORT -user YOUR_MQTT_USERNAME -psswd YOUR_MQTT_PASS

5.- Go to: http://127.0.0.1:8050/. There should be a screen similar to this, but at first, the graph should be empty:

Navigate to your user using the drop-down menu above the graph.

More to come!

Construction

Current implementation here is a bit rough. Mainly because it was build with what I had at the time. Materials are:

  • Wemos D1 R1 microcontroller
  • ACS712 30A current sensor
  • Power supply for the microcontroller. (In my case I striped a power supply from its case and cut the wires from the plug and jack)
  • LCD screen
  • Male-Female jumper wires
  • 24 AWG wire
  • A socket
  • A Phase, neutral and ground plug with some cord.
  • Some screw terminals to connect wires.
  • Rocker switch
  • 2 of those plastic boxes where you put electrical stuff.

After you gather all this, connect everything according to this diagram :

That AC-DC box in the drawing is actually the power supply where you connect your microcontroller and the ACS712 sensor to power them.

Some building pics:

Those were the basic internals of the circuit, without the lcd screen. now, connecting the lcd screen and fitting everything inside:

Final product:

Please do not judge me. I am sure you can do something more breautiful, and I as well. Just wait for the next version!

smart_electric_monitoring's People

Contributors

fernando179 avatar franzgb avatar hector6298 avatar valerylu97 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.