smart iot Energy Consumption  Meter

Abstract

With the increasing demand for energy efficiency and remote monitoring, developing smart energy meters has become a crucial part of the Internet of Things (IoT) ecosystem. This article presents a comprehensive guide to building an IoT-based Smart Energy Consumption Meter using a CT (Current Transformer) sensor, DL69-2048 AC Power Meter, Arduino UNO, and NodeMCU ESP8266. The system allows real-time energy monitoring and remote data transmission to a cloud server for analysis and visualization.

This Energy Consumption Meter project features a smart device that connects to the internet and displays real-time energy consumption data via a hosted website. However, accurately measuring the power consumed by the customer who is responsible for recording readings and generating billing—remains essential. To address this challenge, we propose an innovative IoT-based solution. This method monitors current usage and provides insights into the energy consumption of any household electrical device.

Energy monitoring is key in identifying high consumption patterns and optimizing electrical usage. Traditional meters lack real-time insights and remote accessibility. Integrating IoT technology with sensors like CT and digital power meters bridges this gap.

The Arduino energy consumption monitor utilizes an ESP32 microcontroller integrated with a current sensor to precisely measure the current and unit consumption from an electrical device’s energy meter. This data is then transmitted to a web application for analysis and visualization. To ensure reliability and security, all data is cloud-hosted with robust protection measures.

Additionally, the smart energy meter using iot is an advanced electronic device that monitors key electrical parameters—including voltage levels and power factor during electricity usage.

Energy Consumption Meter Components Required:

  1. DL69-2048 AC Power and Current Voltage Multimeter: AC Voltage, Current, and Power Multimeter module
  2. IM1281 Electric Energy Metering Module
  3. Arduino UNO: Microcontroller to read data from DL69-2048
  4. NodeMCU ESP8266: Wi-Fi-enabled microcontroller for IoT connectivity
  5. ZMPT101B AC Voltage Sensor Transformer Module
  6. YHDC SCT013-030 Current Transformer: Measures current non-invasively
  7. Power Supply Adapter [5V] [5A]: To power the system
  8. Jumper Wires: For Connection

🛒 To purchase the required parts, simply click on them.

⚠️Note:

When utilizing the Arduino UNO R4 WiFi development board, the additional preparation of a NodeMCU ESP8266 module becomes unnecessary, as the R4 WiFi variant already integrates built-in wireless connectivity.

Arduino energy consumption monitor
This project aims to:

  • Measure real-time current, voltage, and power.

  • Transmit data wirelessly to a server/cloud.

Provide insights via a Web App Dashboard or Mobile App.

System Architecture

[ CT Sensor ] ──> [ DL69-2048 Multimeter ] ──> [ Arduino UNO ]
                                             │
                                             └────> [ NodeMCU ESP8266 ] ──> [ Cloud / Dashboard ]

The DL69-2048 acts as an intermediary that processes signals from the CT sensor, computing voltage, current, power, and energy. The Arduino UNO reads these values via UART (serial communication), and the NodeMCU transmits them via Wi-Fi to a cloud platform such as ThingSpeak, Blynk, or a custom server.

platform

DL69-2048 Integration

The DL69-2048 module outputs data in serial format. It includes:

  • UART TX/RX Pins

  • Digital Display Interface

  • Integrated Sampling Circuit

Wiring with Arduino:

  • DL69 TX → Arduino RX (Pin 0 or Software Serial)

  • GND → GND

  • VCC → 5V

 

The module typically transmits a 24-byte data frame that includes:

  • Voltage

  • Current

  • Active Power

  • Power Factor

  • Frequency

  • Energy (kWh)

    Sample UART Frame (Hex):

    55 AA 20 01 02 03 ... CRC
    

Code Overview

#include <SoftwareSerial.h>

SoftwareSerial dlSerial(10, 11); // RX, TX

void setup() {
Serial.begin(9600);
dlSerial.begin(9600);
}

void loop() {
if (dlSerial.available()) {
// Read and parse 24-byte frame
byte buffer[24];
dlSerial.readBytes(buffer, 24);
// Extract voltage, current, power, etc.
float voltage = (buffer[4] << 8 | buffer[5]) / 10.0;
float current = (buffer[6] << 8 | buffer[7]) / 100.0;
float power = (buffer[8] << 8 | buffer[9]) / 10.0;
Serial.print(“V: “); Serial.println(voltage);
Serial.print(“I: “); Serial.println(current);
Serial.print(“P: “); Serial.println(power);
}
}

 

NodeMCU (Wi-Fi & MQTT/HTTP Upload)

After receiving serial data from Arduino (via UART or I2C), the NodeMCU pushes it to the cloud.

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

const char* ssid = “YOUR_WIFI_SSID”;
const char* password = “YOUR_WIFI_PASS”;

void setup() {
Serial.begin(9600);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(500);
}

void loop() {
if (Serial.available()) {
String data = Serial.readStringUntil(‘\n’);
if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
http.begin(“http://your-server.com/submit?data=” + data);
http.GET();
http.end();
}
}
}

 

The Arduino energy consumption monitor measurement procedure operates as follows:

Data Acquisition: CT (Current Transformer) sensor, calibrated using a multimeter, captures real-time current measurements.

Hardware Integration: The CT sensor’s output terminals (red and black wires) are connected to the NodeMCU’s analog input pins for signal processing.

Network Activation: Upon applying external power, the Wi-Fi router initializes, enabling the NodeMCU to establish a wireless connection.

Data Transmission: The NodeMCU processes the sensor data and transmits it to a pre-configured hosted web server via HTTP requests.

Server-Side Workflow:

The hosted server, running a LAMP (Linux, Apache, MySQL, PHP) stack, receives and parses incoming data via a PHP API endpoint.

Data is stored in a relational database (e.g., MySQL) for structured querying and historical tracking.

A PHP-based authentication system secures access, allowing authorized clients to log in and interact with the data.

 

Cloud Dashboard (Optional)

You can use:

  • ThingSpeak: Offers built-in charts and analytics. it is an open-source Internet of Things (IoT) platform that allows users to collect, store, analyze, and visualize sensor data in real time. It is widely used for projects involving remote monitoring, iot power meter and automation, especially with microcontrollers like Arduino and ESP32. ThingSpeak supports data logging, MATLAB analytics, and even triggering actions based on sensor thresholds, making it ideal for smart home, weather, and energy monitoring systems. Its user-friendly interface and integration with cloud-based tools make it a popular choice for both hobbyists and researchers.

  • InfluxDB + Grafana: For advanced visualizations. it is an open-source data visualization and monitoring tool that allows users to create interactive, real-time dashboards from a wide variety of data sources. Commonly used for system monitoring, IoT, and analytics, Grafana supports platforms like Prometheus, InfluxDB, MySQL, and many more. It offers powerful features such as customizable alerts, dynamic panels, and a flexible plugin system. With its sleek interface and robust capabilities, Grafana is widely adopted in DevOps, industrial monitoring, and smart systems for tracking and visualizing key metrics effectively

  • Google Sheets: For lightweight logging.


Power Supply Consideration

  • DL69-2048 is powered via 5V.

  • NodeMCU uses 3.3V logic; use level shifter or voltage divider if connecting directly to Arduino UNO (which uses 5V).

ZMPT101B Voltage Sensor Calibration

The ZMPT101B Voltage Sensor needs to be calibrated before use, as it doesn’t come pre-calibrated. An Arduino UNO or Nano board can be used for this calibration process. These boards are suitable because they feature a highly linear ADC pin, making them ideal for accurate calibration. The sensor can be calibrated using the analog pin A0 on the Arduino.

 

Energy Consumption Meter Required Library Installation:

1. EmonLib Library
The Emonlib Library is used for Electricity Energy Meter. EmonLib is a Continuous Monitoring of Electricity Energy repeats, every 5 or 10s, a sequence of voltage and current measurements. EemonLib continuously measures in the background the voltage and all the current input channels, calculates a true average quantity for each, and then informs the sketch that the measurements are available and should be read and processed. Download EmonLib Library

2. Blynk Library
Blynk is the most popular Internet of Things platform for connecting any hardware to the cloud, designing apps to control them, and managing your deployed products at scale. With Blynk Library you can connect over 400 hardware models including Arduino, ESP8266 & ESP32 to the Blynk Cloud. Download Blynk Library

Advantages:

The iot power meter is capable of detecting and diagnosing critical electrical anomalies, including voltage sags (short-duration drops), harmonic distortion (waveform irregularities), and transient surges (sudden voltage spikes). These issues can significantly degrade energy efficiency by increasing reactive power losses and disrupting optimal load performance. Left unaddressed, such conditions may result in elevated utility costs due to wasted energy, accelerated equipment degradation (e.g., insulation breakdown, capacitor swelling), and catastrophic failures in sensitive electronics. Proactive monitoring mitigates these risks, ensuring both operational reliability and cost savings.


Conclusion

This Energy Consumption Meter project provides a cost-effective, modular, and scalable IoT-based energy monitoring solution. The integration of DL69-2048 and CT sensors ensures accurate real-time data, while the NodeMCU enables seamless cloud connectivity. This setup is ideal for smart homes, industrial monitoring, or academic demonstrations.


Energy Consumption Meter Enhancements

    • Add relay modules to control loads.

    • Implement threshold-based alerts via email or SMS.

    • Use machine learning for anomaly detection or consumption forecasting.

Please Share your thoughts, experiences, or questions in the comments below!

 

FAQ:

1. How does the IoT Energy Meter send data to the cloud?
The Arduino UNO (with WiFi capability or paired with an ESP8266) transmits real-time energy data (current, voltage, power) to a cloud server (e.g., Firebase, AWS IoT) via HTTP/MQTT protocols. Users can access this data through a web dashboard or mobile app for monitoring and analysis.

2. Can a system monitor energy consumption use for multiple appliances?
Yes! By integrating multiple current sensors (one per appliance circuit) and a multiplexer (or using Arduino’s analog pins), the system can track individual device consumption. Data is aggregated and displayed separately on the cloud interface.

 

See Also: