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