Code Monkey home page Code Monkey logo

Comments (7)

mandulaj avatar mandulaj commented on September 27, 2024 1

Hey @AlexGnatko sorry for the late reply but try swapping the RX/TX pins. G16 (ESP RX pin) should be connected to the PZEM TX pin and vice versa.

from pzem-004t-v30.

sergiocntr avatar sergiocntr commented on September 27, 2024

Hi Alex ,welcome here.
In the example folder there is a sketch named change address :with that read your pzem address,maybe you set a wrong one in the constructor.

from pzem-004t-v30.

iwas108 avatar iwas108 commented on September 27, 2024

Any update on this? Because when I tried it with Arduino Nano on pin 11 and 12 it also returned address 0, error reading voltage.

from pzem-004t-v30.

mandulaj avatar mandulaj commented on September 27, 2024

@iwas108 First of all, the Arduino Nano, has only one hardware serial on pins D0 and D1 (generally used for sending things through the USB to your computer console) You will have to use Software serial with the pins 11 and 12. Check out the PZEMSoftwareSerial for more info. Once you do that, make sure to check the following:

  • The PZEM is connected to 230V
  • You have connected both the 5V and GND line correctly
  • Your RX/TX lines are connected the right way (if not sure, try swapping them)
  • You are using the correct unique address (if using multiple PZEMs on one Modbus line)

from pzem-004t-v30.

ahmedreghini avatar ahmedreghini commented on September 27, 2024

Hey @AlexGnatko sorry for the late reply but try swapping the RX/TX pins. G16 (ESP RX pin) should be connected to the PZEM TX pin and vice versa.

for anyone had this problem this is the right solution (thanks mr @mandulaj :) )

from pzem-004t-v30.

jonathanpalomino avatar jonathanpalomino commented on September 27, 2024

pues a fecha de hoy yo tengo el mismo problema.
Custom Address:0
Error reading voltage

He intentado de todo y no logro hacer que reporte nada

from pzem-004t-v30.

mandulaj avatar mandulaj commented on September 27, 2024

@jonathanpalomino Could you check that:

  1. The PZEMs are connected to the AC voltage
  2. The 5V and GND are connected correctly
  3. The RX/TX are connected correctly (also trying swapping them)
  4. The RX LED should blink every time the MCU tries reading flowed by the TX LED blinking with the response

from pzem-004t-v30.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.