Submitted:
20 June 2026
Posted:
25 June 2026
You are already at the latest version
Abstract

Keywords:
1. Introduction

2. Materials and Methods
2.1. System Architecture
2.2. Hardware Implementation
| Component | Function in the prototype |
| ESP32 DevKit V1 | Main controller; UART acquisition; local display control; Wi-Fi and Blynk communication; relay logic. |
| PZEM-004T V3.0, 100 A CT model | AC voltage, current, active-power, and energy measurement. |
| 16×2 I2C LCD | Concise local indication of mode, fan state, power, and demand-response status. |
| Waveshare 1.3-inch OLED | Multi-page local panel for electrical data, connectivity, system status, and warning screens. |
| Two-channel 5 V relay module | Active-LOW switching of the 12 V RGB fan representing a non-critical load. |
| 12 V RGB PC fan and 12 V/1 A adapter | Demonstration load and its DC supply. |
| LM2596 buck converter | Regulated low-voltage supply for the controller and peripherals. |
| Active buzzer, green LED, AUTO/MANUAL switch | Audible warning, normal-state indication, and physical manual override. |
| Fuse, holder, WAGO 221 connectors, grounded outlet and enclosure | Electrical protection, serviceable connections, strain relief, and segregation of mains wiring. |

2.3. Embedded Software and Local Interfaces
2.4. Blynk IoT Dashboard
2.5. Demand-Response and Hysteresis Logic

2.6. Experimental Procedure and Data Integrity
3. Results
3.1. Electrical Measurement Snapshot

3.2. Local and Cloud Interface Operation
3.3. Demand-Response Functional Verification
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AC | Alternating current |
| CT | Current transformer |
| DC | Direct current |
| DR | Demand response |
| ESP32 | Espressif 32-bit microcontroller platform |
| IoT | Internet of Things |
| LCD | Liquid-crystal display |
| OLED | Organic light-emitting diode |
| PZEM | Peacefair AC energy-meter family |
| UART | Universal asynchronous receiver-transmitter |
References
- Atzori, L.; Iera, A.; Morabito, G. The Internet of Things: A Survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
- Fang, X.; Misra, S.; Xue, G.; Yang, D. Smart Grid - The New and Improved Power Grid: A Survey. IEEE Commun. Surv. Tutor. 2012, 14, 944–980. [Google Scholar] [CrossRef]
- Gungor, V.C.; Sahin, D.; Kocak, T.; Ergut, S.; Buccella, C.; Cecati, C.; Hancke, G.P. Smart Grid Technologies: Communication Technologies and Standards. IEEE Trans. Ind. Inform. 2011, 7, 529–539. [Google Scholar] [CrossRef]
- Arias, L.A.; Rivas, E.; Santamaria, F.; Hernandez, V. A Review and Analysis of Trends Related to Demand Response. Energies 2018, 11, 1617. [Google Scholar] [CrossRef]
- Vahid-Ghavidel, M.; Javadi, M.S.; Gough, M.; Santos, S.F.; Shafie-Khah, M.; Catalão, J.P.S. Demand Response Programs in Multi-Energy Systems: A Review. Energies 2020, 13, 4332. [Google Scholar] [CrossRef]
- Alharbi, W. Integrating Internet-of-Things-Based Houses into Demand Response Programs in Smart Grid. Energies 2023, 16, 3699. [Google Scholar] [CrossRef]
- Basit, A.; Liu, S. IoT-Based Automation of Dynamic Demand Response. Hardware 2026, 4, 3. [Google Scholar] [CrossRef]
- Espressif Systems. ESP32-WROOM-32 Datasheet; Espressif Systems: Shanghai, China. Available online: https://www.espressif.com/ (accessed on 20 June 2026).
- Peacefair. PZEM-004T V3.0 AC Communication Module: User Manual and Technical Notes. Manuf. Doc.
- Blynk, Inc. Datastreams. Blynk Documentation. Available online: https://docs.blynk.io/en/blynk.console/templates/datastreams (accessed on 20 June 2026).
- Blynk, Inc. Virtual Pins. Blynk Documentation. Available online: https://docs.blynk.io/en/blynk-library-firmware-api/virtual-pins (accessed on 20 June 2026).


| Virtual pin | Datastream | Direction | Type / unit |
| V0 | Voltage | Device → cloud | Double, V |
| V1 | Current | Device → cloud | Double, A |
| V2 | Active power | Device → cloud | Double, W |
| V3 | Energy | Device → cloud | Double, kWh |
| V4 | Fan status | Device → cloud | Integer, 0/1 |
| V5 | Mode status | Device → cloud | String |
| V6 | Demand-response status | Device → cloud | Integer, 0/1 |
| V7 | Remote manual mode | Cloud → device | Integer, 0/1 |
| V8 | Manual fan command | Cloud → device | Integer, 0/1 |
| V9 | Power limit | Cloud → device | Double, W |
| V10 | PZEM status | Device → cloud | String |
| Variable | n | Minimum | Mean | Maximum | Population SD |
| Voltage (V) | 14 | 213.60 | 214.04 | 214.40 | 0.27 |
| Current (A) | 14 | 0.05 | 0.05 | 0.05 | 0.00* |
| Active power (W) | 14 | 4.30 | 4.37 | 4.40 | 0.05 |
| Energy (kWh) | 14 | 0.00 | 0.00 | 0.00 | 0.00* |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.