Mpp Solar Inverter ESP32 RS232
Table of Contents
### THIS SITE IS NOT FINISHED ###
- USB - RS232 Data Emulator Program
- RS-232 DB-9
- Solar Inverter RS232 Document
- Inverter RS232 Data emulator
- http://theloadshed.blogspot.com/
- https://github.com/scottwday/InverterOfThings
- https://github.com/njfaria/SolPipLog
- https://www.photovoltaikforum.com/thread/114101-usb-datenlogger-f%C3%BCr-pip-serie-solpiplog/?pageNo=122
- https://forums.aeva.asn.au/viewtopic.php?f=64&t=4332&p=53691#p53691
- https://watts247.com/manuals/mpp/PIP-HS_MS_MSX_HYBRIDV%20RS232%20Protocol-C_20170822_.pdf
- https://forum.arduino.cc/t/esp32-with-usb-to-ttl-problem-reading-serial/689449
- https://www.electronicshub.org/rs232-protocol-basics
Starter-Code
// _ ___ __ _ _
// | || \ \ / / | | (_)
// | || |\ \ /\ / /__ | |__ _
// |__ _\ \/ \/ / _ \| '_ \| |
// | | \ /\ / (_) | |_) | |
// |_| \/ \/ \___/|_.__/|_|.com
//
// Project: RS232 Reader
// Hardware used: ESP32 DevKitc_V4
//
#define RXD2 16
#define TXD2 17
char c;
String readString;
void setup() {
// Note the format for setting a serial port is as follows: Serial2.begin(baud-rate, protocol, RX pin, TX pin);
Serial.begin(115200);
Serial2.begin(2400, SERIAL_8N1, RXD2, TXD2);
delay(100);
Serial.println(F("__________________________________________"));
Serial.println(F(""));
Serial.println(F(" _ _ __ v0.1 __ _ _ "));
Serial.println(F(" | || |\\ \\ / / | | (_)"));
Serial.println(F(" | || |_\\ \\ /\\ / /___ | |__ _ "));
Serial.println(F(" |__ _|\\ \\/ \\/ // _ \\ | '_ \\ | |"));
Serial.println(F(" | | \\ /\\ /| (_) || |_) || |"));
Serial.println(F(" |_| \\/ \\/ \\___/ |_.__/ |_|"));
Serial.println(F(""));
Serial.println(F("__________________________________________"));
Serial.println(F(""));
Serial.println(F("RS232 Reader/2400buad - Initialized"));
Serial.println(F("__________________________________________"));
Serial.println(F(""));
Serial.println("Serial Txd is on pin: " + String(TX));
Serial.println("Serial Rxd is on pin: " + String(RX));
Serial.println(F("__________________________________________"));
Serial2.println("2400buad Serial2-Test");
}
void loop() {
while (Serial2.available()) {
c = Serial2.read();
readString += c;
}
if (readString.length() > 0) {
Serial.print(readString);
Serial2.print(readString);
readString = "";
}
}
Now you can read out you RS232 Port with a ESP32
Messages to the inverter follow this format:
<command string><CRC1><CRC2><CR>
I will change from RS232 to USB. Because the RS232 in my Inverter can’t provide VCC / 5V! OR maybe I change my Inverter is the idea atm to a deye Hybrid Inverter 8kW US version.
Please Check out the Links at the top if you want more info about RS232 Mpp Inveters.