Energy Meter with STM Controller

Published Sep 18, 2022
 20 hours to build
 Intermediate

An ARM (STM32) based energy meter to calculate the voltage, current, power and frequency rating and controlling the load using user friendly application.

display image

Components Used

STM32 Nucleo-64 F410RB
STM32 Nucleo-64 F410RB
1
ESP32 DevKitC 32E
ESP32 DevKitC 32E
1
ACS712 Hall Effect-Based Linear Current Sensor
ACS712 is a fully integrated hall effect-based linear current sensor IC.
1
7805 Voltage Regulator
7805 Voltage Regulator
1
7812 Linear Voltage Regulator
Linear Voltage Regulators 12V 1.5A Positive
1
Fuse 3A
Industrial & Electrical Fuses 3A 600VAC 300VDC Slo-Blo
1
ZMPT101B voltage sensor module
Measuring voltage across load
1
HLK-10M12 Hi-Link 12V 10W
AC to DC Power Supply Module
1
Description

ENERGY METER WITH STM ARM CONTROLLER

STM32

The STM32 is an  32-bit microcontrollers based Arm Cortex processor designed to offer new degrees of freedom. It is used for high performance computing, real-time capabilities, digital signal processing, low-power / low-voltage operation, and connectivity maintaining full integration and easy development.

Advantages of STM Controller

  • 32 bit Microprocessor 
  • High speed(Faster), High Performance
  • Accessible on 3.3v and 5V (low power consumption)
  • Highly used in electronics field after PLC
  • Used in Industries due to its high reliability than controllers like Arduino and Raspberry pi

Description

Energy Meter

Energy meter is a device used to calculate the frequency, current and voltage of the load connected to this device. The load can be controlled from anywhere using the user friendly application developed using App Inventor tool. Serial Communication is done in between STM and ESP32 is established using Arduino IDE software and then the thinkspeak cloud is used for transferring the data to the cloud and then the data is then displayed over the user-friendly application created using app inventor software.

Overall Block Diagram

Circuit Diagram

Sensors, load Interfacing with STM

The current sensing module and the voltage sensing module are connected to the STM through the analog pins of STM Microcontroller. The load is then connected to the ESP32 (Wi-Fi Module). Real Time clock is connected to STM using the SCA and SDL pins.

Serial Communication of STM with ESP32

The communication between STM and ESP module can be established by connecting the Tx (Transmitter) of STM to the Rx (Receiver) of ESP and Vice versa.

Getting values of current and voltage

PZEM library is used to find calculate the voltage and current values from the voltage and current sensors respectively. Calling the function for voltage and current gives the voltage and current ratings

#include <PZEM004Tv30.h>
PZEM004Tv30 pzem(D7, D8); //RX/TX
//    voltage = pzem.voltage();
//    current = pzem.current();
//    frequency = pzem.frequency();
//    pf = pzem.pf();

Display

The  values obtained from the sensors can be displayed in the LCD display and then send to ESP using the I2C protocol. Then the values are send to the cloud and then are displayed in the application Smart Energy Meter developed using MIT App Inventor. The load connected externally can be controlled using this application designed.

Printed Circuit Board

Future Application

  • Connected to main power supply and calculate the current bill amount
  • Real time clock can be interfaced for continuous monitoring of power
  • Minimalized design using 3d printing
Codes

Downloads

Energy Meter_1 Download

Institute / Organization

BANNARI AMMAN INSTITUTE OF TECHNOLOGY, SATHYAMANGALAM
Comments
Ad