Hi Blynkers,
I encounter a very strange situation here. I do not know whether anyone had a similar situation.
I setup 3 NodeMCU each hooked up with PZEM004T to monitor 3 phase MCB. After plugged in and run, everything works fine in blynk apps but after a while I realize our mobile network just like being interfered. Whenever anyone call in or we call out, our voice seems breaking up and cant catch the whole sentences while we are talking on the phone. Our wifi is 2.4G and GSM 900/1800, i believe there is not suppose to be conflicting. Any clue? Once I stop the 3 NodeMCU, all calls no problem at all.
Hardware details as shown.
- ESP8266 NodeMCU 12-E lolin
- PEACEFAIR PZEM-004T Single Phase Power Energy Meter + CT 100A
Smartphone OS (iOS or Android) + version = Huawei M9 Android v8
• Local server
• Blynk Library version 0.5.3
• Sketch code
//#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <PZEM004T.h> //https://github.com/olehs/PZEM004T
#include <SoftwareSerial.h>
PZEM004T pzem(&Serial); // use Serial
IPAddress ip(192,168,0,99);
float voltage_blynk=0;
float current_blynk=0;
float power_blynk=0;
float energy_blynk=0;
char auth[] = “****************”;
char ssid[] = “ssid”;
char pass[] = “pass”;
unsigned long lastMillis = 0;
void setup()
{
//No Debug console
/// Serial.begin(9600); // Note : Do not use Serial0 port, for serial debugging!
pzem.setAddress(ip);
Blynk.begin(auth, ssid, pass, IPAddress(192,168,0,xxx), 8080);
}
void loop()
{
Blynk.run();
/// Read meter PZEM
float v = pzem.voltage(ip);
if(v >= 0.0){ voltage_blynk =v; } //V
float i = pzem.current(ip);
if(i >= 0.0){ current_blynk=i; } //A
float p = pzem.power(ip);
if(p >= 0.0){power_blynk=p; } //kW
float e = pzem.energy(ip);
if(e >= 0.0){ energy_blynk =e; } ///kWh
delay(1000);
//Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.
if (millis() - lastMillis > 10000) {
lastMillis = millis();
Blynk.virtualWrite(V1, voltage_blynk);
Blynk.virtualWrite(V2, current_blynk );
Blynk.virtualWrite(V3, power_blynk);
Blynk.virtualWrite(V4, energy_blynk );
Blynk.virtualWrite(V5, lastMillis );
}
}