GithubHelp home page GithubHelp logo

wrybread / esp32arduinorenogy Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 7.0 669 KB

Reads data from a Renogy solar charge controller's RS232 port with an ESP32 or Arduino

License: MIT License

C++ 100.00%
arduino esp32 esp8266 modbus renogy solar

esp32arduinorenogy's Issues

Works on Arduino MKR1010

I used your info to successfully connect an Arduino MKR1010 to a Renogy Wanderer 10A (model # RNG-CTRL-WND10) charge controller. The MKR1010 natively has Serial1 on pins 13 (RX) and 14 (TX).

In the renogy_rs232.ino program:
Not required:
#define RXD2 13
#define TXD2 14

Substitute:
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
node.begin(modbus_address, Serial2);

with:
Serial1.begin(9600); //On mkr1010, pins 13 (RX) & 14 (TX) are Serial1
node.begin(modbus_address, Serial1);

Additional comments:
• The RJ12 cable I purchased on Amazon has a wire color sequence opposite of yours – pin 1 is blue. As you allude to, it’s the pins and not the wire colors that are important.
• The NOYITO TTL-to-RS232 level adjuster is excellent. I was using Sparkfun RS232 shifters with no success.
• As you mention, the “info” registers don’t have relatable information, except for amp_rating=10, which is correct for a 10A controller.
• The multiplier for battery_charging_amps = data_registers[2] is .01, not .1. (Page 9 of the Rover 20A/40A Charge Controller—MODBUS Protocol documentation.)
• The internal temperature sensor is for the controller itself, and not ambient temperature. Expect it to change as the controller receives electricity from the panel. The Wanderer 10A does not have remote battery temperature sensor capabilities, therefore, battery_temperature usage can be commented out.
• The controller’s uptime counter seems inaccurate as my controller has been connected to a new battery for three weeks, yet the controller’s uptime is three days. In addition, because it doesn’t have a method to set the date and time, a new day doesn’t begin at 12:00am. It is possible the firmware estimates 12:00am based on solar day length. Other counters based on a day also are questionable.
• One reason I only use the MKR1010 (vs other Adriano boards) is that it has web server (and client) capabilities. My sketch publishes a simple webpage with the Renogy controller’s info.

Thank you for publishing the detailed information on GitHub! I was struggling with the many variables involved – pinouts, pin functions, RS232, Modbus, C++ - but your information got me on track.

image

possible to use USB vs. serial?

i'm working on setting up an ntp server using a gps hat that using the serial port.
Im hoping to leverage a usb port to connect to the rs232 port.
have you tried doing this and will you library work with USB port?

thanks

Renogy Wanderer 10A Load Amps

Hi,
I read different stories about the load amps via Modbus. Some mention it is not possible to get it for the Wanderer 10A but in your library you mention it.
Could you please confirm if you can get non-zero values for load amps from the Wanderer 10A and if yes could you please send the model number for comparison?
Thanks a lot
Markus

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.