กลับไปหน้ารวมไฟล์
arduino-power-meter-system-with-internal-plc-50cc36-en.md

Arduino Power meter system with Internal PLC

Features

Heavy Grid Analytics: The Arduino Power Meter

Plugging massive air conditioners or crypto-mining rigs directly into a weak household circuit invites rapid thermal degradation and electrical fires. The Arduino Power Meter System intercepts and calculates absolutely huge physical grid parameters safely! By clamping a non-invasive SCT-013 Split-Core Current Transformer securely around the Main AC Phase wire in the breaker box, the hardware acts identically to a massive industrial clamp-meter! It inductively reads the 220V magnetic fields flowing across the home, mathematically translates the microscopic AC induction voltage completely inside the Arduino processor perfectly, and aggressively calculates exact real-time Wattage consumption natively!

Non-Invasive Induction Math (EmonLib.h)

You absolutely do NOT strip wires and connect 240V AC Mains power directly into the Arduino; the explosion would be catastrophic!

  1. The SCT-013 Clamp detects the magnetic field generated by current flowing through the target wire, producing an incredibly tiny, proportional micro-voltage!
  2. Because AC power produces a violent Sine Wave (shifting from positive to negative), the Arduino analog pin (0-5V) cannot read the negative -2.5V swing at all natively!
  3. You MUST construct an aggressive Voltage Biasing Circuit (Two 10K resistors forming a divider) to pull the baseline signal physically up to 2.5 Volts. Now the AC wave swings safely between 0V and 5V entirely!
#include "EmonLib.h"                   // Include heavy AC interpolation library natively!
EnergyMonitor emon1;                   // Instantiate the core object

void setup() {  
  Serial.begin(9600);
  emon1.current(A0, 111.1);            // Calibrate: Current: Input pin, Calibration value.
}

void loop() {
  // Demand the processor sample the sine wave exactly 1480 times recursively!
  double Irms = emon1.calcIrms(1480);  // Calculate the Root-Mean-Square (RMS) Amp flow!

  double powerWattage = Irms * 230.0;  // P = I * V (Assuming global 230V AC Grid Matrix!)

  Serial.print("Current: ");
  Serial.print(Irms);
  Serial.print(" A | Power: ");
  Serial.print(powerWattage);
  Serial.println(" Watts");
}

Power Line Communication (PLC) Injection

If the power meter exists inside an isolated concrete basement breaker box, Wi-Fi will entirely fail.

  • Industrial systems exploit internal PLC (Power Line Communication)!
  • Modules like the KQ-130F literally inject serial data strings ("HOUSE LOAD: 4000W") physically entirely into exactly the 220V/110V copper power lines natively!
  • You plug a second KQ-130F module into a standard wall socket upstairs. It aggressively filters out the 50Hz AC wave, extracts the high-frequency Serial payload, and decodes the wattage directly onto your kitchen LCD securely natively!

High-Voltage Safety Hardware Matrix

  • Arduino Uno/Nano (Calculating the violent multidimensional sampling math loops exactly natively).
  • SCT-013-000 Non-invasive AC Current Sensor (Ensure you clamp it entirely around ONLY the Live/Phase wire! Clamping both Live and Neutral simultaneously forces the magnetic fields to completely cancel each other out natively, returning exactly 0.0 Amps!).
  • Voltage Biasing Network (Two 10K-Ohm resistors and a 10µF Capacitor absolutely mandatory to offset the negative AC sine wave).
  • KQ-130F Power Line Communication Module (Optional, executes terrifyingly robust data-routing exclusively through the physical household copper grid entirely).

System Features and Modifications

point 1: By changing the resistances of R17 and R16 in PZEM, it is possible to measure the voltage of more than 280 volts (This is a voltage divider circuit). For example, if R17 is equal to 2 megaohms and R16 is equal to 750 ohms, the voltage can be measured up to 500 volts. It is also necessary to make changes in the Arduino codes, Additional information in the folder 500 volts in github

point 2: This system also supports Modbus protocol. You can add this potkal to it. And it was in contact with other industrial equipment such as HME and PLCs


Test video

Connecting power meter to MATLAB and view the data on the chart

voltage measurement test

current measurement test

Relay function test


Internal PLC settings :

To access the settings menu, we must first turn the MODE key on and set the required parameters with the arrow keys.

parameter in the settings menu use
OVER Voltage Maximum voltage limit
LOW Voltage Minimum voltage
OVER Current maximum current limit
LOW Frequency minimum frequency
OVER Frequency Maximum frequency limit
LOW POWER FACTOR 1 steps, one power factors
LOW POWER FACTOR 2 steps, two power factors
LOW POWER FACTOR 3 steps, three power factors
TMS 1 SET timer relay one
TMS 2 SET timer relay two
TMS 3 SET timer relay three
TMS 4 SET timer relay four
R1 set the operation mode of relay one
R2 set the operation mode of relay two
R3 set the operation mode of relay three
R4 set the operation mode of relay four

After making the settings, turn the MODE key to the off position so that the data is stored in the permanent memory of the controller

  • Each relay timer unit is 100 milliseconds

-A variety of performance modes (R1,R2,R3,R4):

1- reverse time overcurrent function 2- Additional constant time flow function 3-Overvoltage function 4- voltage reduction function 5- frequency reduction function 6- frequency increase function 7- Function of the function of going out of normal mode (frequency, voltage, current) 8-Function of power factor steps of one 9-Function of power factor steps of two 10- Function of power factor steps of three 11-The operation of voltage out of normal mode 12- Function of frequency out of normal mode

#########################################################################

Github link : https://github.com/amir-eshaqy/pz

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE 1.8.19"
author: "amir_eshaqy"
category: "Sensors & Environment"
components:
  - "1x 4 Channel DC 5V Relay Module"
  - "1x n-channel MOSFET -p"
  - "1x Potentiometer 10K"
  - "1x PZEM-004-t"
  - "1x LCD 20X4-p"
  - "4x Pushbutton-p"
  - "1x Arduino Nano"
  - "5x 10k Ohm Resistors -p"
  - "1x 3D printer filament (PLA)"
  - "1x on/off switch"
description: "Current induction telemetry! Execute dangerous high-voltage diagnostic analysis flawlessly by integrating non-invasive SCT-013 split-core transformers perfectly alongside embedded analog interpolation formulas to definitively chart heavy AC-Grid power loads."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/de8e79a8-513a-4827-bb11-bb610dcc75df.ino"
encryptedPayload: "U2FsdGVkX18wEAtgom2TA+HpanWRYOoWFiioX4ErmscNeG9+27ko3CVYGAQ/T+JHS39V/Um4Rx0bBxCbZeca7xBXvzlPWFXdxd7/31YDu/g="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-power-meter-system-with-internal-plc-50cc36_cover.png"
lang: "en"
likes: 1
passwordHash: "b2a00c1b7c75e384964b970d5c26e1d7d67541e70a28796059c9d38c8ad6d2bd"
price: 2450
seoDescription: "Build an Arduino Power meter with Internal PLC to measure Voltage, Current, and Power Factor with high accuracy."
tags:
  - "Tools"
  - "Data Collection"
  - "Energy Efficiency"
  - "Human Welfare"
  - "Home Automation"
  - "Monitoring"
title: "Arduino Power meter system with Internal PLC"
tools: []
videoLinks:
  - "https://www.youtube.com/watch?v=Np4y_KRA4oQ"
  - "https://youtu.be/Np4y_KRA4oQ"
  - "https://youtu.be/dCQaTeNKbkk"
  - "https://youtu.be/r_vkd0LcIXw"
  - "https://www.youtube.com/watch?v=pQEmvJ6B6WI"
views: 3331