About this deal
After setting-up the Cayenne Dashboard, we must test the PZEM-004T V3 meter before interfacing with the dashboard. It can be used a SMD resistor 102 or 1001 (1K) soldered near/parallel with R8 or a normal resistor (THT) similar to that used on the image of v.1.0 The resistor is placed in different place on v.3.0 because the optocouplers RX and TX are reversed compared to v.1.0
Pzem 004T Murah - Harga Terbaru Oktober 2023 - Tokopedia Jual Pzem 004T Murah - Harga Terbaru Oktober 2023 - Tokopedia
Cut the power cable in two and connect the input wires to both Sonoff Basic and PZEM-004T. Route one of the power output wires through the PZEM-004T core and connect the output wires to the Sonoff Basic output. The obtained data is then stored in the Preferences using appropriate keys (e.g., "voltage", "current", "power"). The Peacefair PZEM-004T features a built-in button on the panel, used to make the electricity clear function. Precautions:In the example program to access or interfacing the PZEM-004T V3.0 module using this Arduino, we use the following library :
PZEM-004T PC interface app download | SourceForge.net PZEM-004T PC interface app download | SourceForge.net
Alles nach folgendem Schaltplan verschalten (Pzem-004t Module müssen mit 5V Spannung versorgt werden, nicht sichtbar auf dem Schaltplan). float current = pzem.current(); if(current != NAN){ Serial.print("Current: "); Serial.print(current); Serial.println("A"); } else { Serial.println("Error reading current"); } float power = pzem.power(); if(current != NAN){ Serial.print("Power: "); Serial.print(power); Serial.println("W"); } else { Serial.println("Error reading power"); } float energy = pzem.energy(); if(current != NAN){ Serial.print("Energy: "); Serial.print(energy,3); Serial.println("kWh"); } else { Serial.println("Error reading energy"); } float frequency = pzem.frequency(); if(current != NAN){ Serial.print("Frequency: "); Serial.print(frequency, 1); Serial.println("Hz"); } else { Serial.println("Error reading frequency"); } float pf = pzem.pf(); if(current != NAN){ Serial.print("PF: "); Serial.println(pf); } else { Serial.println("Error reading power factor"); } Serial.println(); delay(2000);Connect the serial interface of the Sonoff Basic with the serial interface of the PZEM-004T. See pictures regarding used colors and connections.
PZEM-0xx power monitor - Tasmota - GitHub Pages
include
