wrybread / esp32arduinorenogy Goto Github PK
View Code? Open in Web Editor NEWReads data from a Renogy solar charge controller's RS232 port with an ESP32 or Arduino
License: MIT License
Reads data from a Renogy solar charge controller's RS232 port with an ESP32 or Arduino
License: MIT License
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.
I have it working with an ESP32-WROOM-32D board and a Rover Li 40 amp SCC
Works on my Renogy Adventurer 30A PWM controller. Thanks!
How to get the charging mode (MPPT, equalize, boost, float)?
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.