Open davidebeatrici opened 1 year ago
Thanks for suggestion.
I wanted to avoid coupling any other external device (orangepi, raspberrypi). The inverter is quite noisy in RF spectrum and may cause these devices to work less stable. Especially with the common ground.
I guess we have a lot of other options to communicate over modbus from linux machine.
Thank you for the fast reply.
My idea was to put at least one filtering capacitor between inverter and computer, but the devices cannot be fully decoupled. An ESP8266 can be sacrificed in case something goes wrong as it's very cheap, a high-end server on the other hand...
I think I'll design a PCB on EasyEDA.
I completed both schematic and PCB, here's a preview of the latter:
Name | Part | LCSC part |
C1, C2 | GRM21BR61E226ME44L | C86816 |
C3, C4 | GRM21BR60J476ME15L | C77072 |
C5 | GRM155R71H332KA01D | C85963 |
C6, C7, C8, C9 | GRM155R71C104KA88D | C71629 |
ESP32 | ESP32-C3-WROOM-02U-N4 | C2926676 |
ESP32_BOOT | TSG002A05018A | C2888616 |
ESP32_UART | PZ254V-11-04P | C492403 |
L1, L2 | DFE252012F-1R0M=P2 | C435392 |
PSU | TPS62180YZFT | C73980 |
R1, R3 | CRCW0402470KFKED | C482181 |
R2 | 0402WGF1503TCE | C25755 |
RS232 | R-RJ45R08P-A009 | C2902700 |
RS232_UART | MAX3232IPWR | C113205 |
The power supply is definitely overkill for our needs, but more stuff can be connected to the board by simply soldering wires to it.
I will make the order on JLCPCB, test the hardware and then publish the resources under an open-source license.
The PCB(s) have arrived!
Alright, the hardware is working as it should! It took me a while to test as I had to fix a few things. I will publish schematics and PCB soon.
The inverter is quite noisy in RF spectrum and may cause these devices to work less stable. Especially with the common ground.
You were absolutely right: when powered by the RS232 port, simply connecting the ground from the ESP32's UART header to a CH340 interface causes the computer's USB port to reset continuously... any ideas on how to fix that?
I have a server that is running right next to the inverter, it would be really nice to be able to connect the serial port directly to it using something like https://gitlab.com/Teuniz/RS-232.
Splitting the code into separate classes would definitely help to implement that, among other advantages.