Maker.io main logo

Real-Time IoT Smart Energy Meter with SMS Alerts

74

2026-02-03 | By Rinme Tom

License: General Public License Breadboards Jumper Wires Arduino ESP32

πŸ“˜ Summary

In this Maker project, you’ll build a Smart Energy Meter using IoT and an ESP32 microcontroller and a PZEM-004T energy sensor to monitor electrical parameters like voltage, current, power, power factor, and energy consumption in real time. Data is transmitted to a cloud dashboard via MQTT, and critical electrical anomalies trigger automated SMS alerts β€” providing safer, smarter energy monitoring for residential, commercial, and industrial applications.

PZEM-004T energy sensor

🧠 Why This Project Matters

Traditional energy meters only record total usage and require physical readouts. With this IoT smart energy meter, you can:

  • Track power usage remotely from anywhere with internet access.

  • Visualize data live on an MQTT web dashboard.

  • Receive SMS alerts for abnormal electrical conditions like over-voltage or excessive current.

  • Use the system as a foundation for advanced automation (e.g., load control, efficiency reporting).

Block Diagram

πŸ“Š How It Works: System Architecture

This IoT smart energy meter combines local measurement, cloud publishing, and alerting:

🧩 Core Flow

  1. Measurement:
    The PZEM-004T measures electrical parameters using internal sensors and a current transformer (CT clamp).

  2. Processing:
    The ESP32 reads PZEM data over UART (Modbus Protocol), formats it, and prepares it for transmission.

  3. Remote Publishing:
    Data is sent via Wi-Fi to an MQTT broker and displayed on a remote dashboard in real time.

  4. Alerts:
    When predefined thresholds (e.g., high voltage) are exceeded, an SMS alert is sent using a cloud API.

Circuit Diagram

πŸ“ˆ Real-Time Dashboard

A lightweight web dashboard visualizes:

  • Voltage (V)

  • Current (A)

  • Active Power (W)

  • Cumulative Energy (kWh)

  • Frequency (Hz)

  • Power Factor

It connects to the MQTT broker using WebSockets and updates values instantly as new data arrives.

Dashboard

πŸ“± SMS Alerts: Stay Notified

This project integrates with a free SMS API via a cloud service so that when thresholds like over-voltage or overload are detected, the registered mobile number receives an automated alert. The system checks conditions in the ESP32 code and only sends messages when necessary to avoid spam.

SMS

⚑ Practical Use-Cases

This IoT smart energy meter is ideal for:

βœ” Real-time home energy monitoring
βœ” Safety alerts for faulty wiring or dangerous conditions
βœ” Remote power management for vacation homes or remote installations
βœ” Base for smart home automation integrations (e.g., Home Assistant, Node-RED)

Working Demo

πŸ” Tips for Success

  • Ensure the CT clamp only encircles the live conductor β€” not both live and neutral.

  • Validate I2C addresses if the LCD shows no output (commonly 0x27 or 0x3F).

  • Use a secure MQTT broker if deploying in a production environment.


🏁 Conclusion

This project combines embedded systems, IoT communication, and real-time alerting into an accessible smart energy meter solution. With just a few components and open tools like the Arduino IDE and MQTT, you can transform raw electrical data into meaningful insights and actionable alerts β€” empowering smarter, safer energy usage.

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.