Code Monkey home page Code Monkey logo

esp8266-power-monitoring-system's Introduction

ESP8266 power monitoring system

CodeFactor

This repository contains code examples for monitoring power consumption using an ESP8266 board and an Arduino board. The code allows you to measure power consumption in kilowatt-hours (kWh) using a combination of current transformers (CT) and voltage dividers. The data can be sent to Adafruit IO MQTT service for further visualization or storage.

Hardware Requirements

  • ESP8266 or Arduino board
  • Current transformer (CT)
  • Voltage divider (consisting of resistors)
  • Power supply for the board

Circuit Connection

The CT output is connected to an analog input pin (A0) of the board, which is used to measure the current flowing through the circuit. The voltage divider output is connected to another analog input pin (A1) of the board, which is used to measure the voltage of the circuit. The board uses these values to calculate the power consumption and can send the data to Adafruit IO MQTT service via a Wi-Fi connection.

Software Requirements

  • Arduino IDE
  • ESP8266 or Arduino board package installed in Arduino IDE
  • Adafruit MQTT library

Setup

  1. Install the board package (ESP8266 or Arduino) in Arduino IDE.
  2. Install the Adafruit MQTT library in Arduino IDE.
  3. Connect the ESP8266 or Arduino board to your computer.
  4. Open the code in Arduino IDE and replace the following placeholders with your own values:
    • YOUR_WIFI_SSID: Replace with your Wi-Fi network name (SSID).
    • YOUR_WIFI_PASSWORD: Replace with your Wi-Fi network password.
    • YOUR_ADAFRUIT_USERNAME: Replace with your Adafruit IO username.
    • YOUR_ADAFRUIT_KEY: Replace with your Adafruit IO key.
  5. Adjust the values for the current transformer ratio, voltage divider resistor values, and the time interval at which you want to send data.
  6. Upload the code to the ESP8266 or Arduino board.

Safety Precautions

  • It's important to note that working with high voltage circuits can be dangerous. Make sure to follow proper safety procedures and use appropriate protective gear. Always consult an electrician or professional if you're unsure about anything.

Troubleshooting

If you encounter any issues, consider the following:

  • Double-check your Wi-Fi credentials and Adafruit IO account details.
  • Ensure that the current transformer and voltage divider are correctly connected to the board.
  • Verify that you have the necessary libraries and board package installed in your Arduino IDE.

Please note that the code provided in this repository is a starting point and may need to be modified to fit your specific requirements. Refer to the official documentation of the respective libraries for detailed usage instructions.


Code Examples

This repository contains the following code examples:

  1. code 1: Code for power monitoring using an ESP8266 board.
  2. code 2: Code for energy consumption monitoring using an ESP8266 board.
  3. code 3: Code for power and energy monitoring using an Arduino board and Adafruit IO MQTT service.

Feel free to explore the individual code samples and adapt them according to your needs. If you have any questions or encounter any issues, don't hesitate to ask for assistance. Happy monitoring!

esp8266-power-monitoring-system's People

Contributors

1999azzar avatar

Stargazers

 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.