Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split RS232 and ESP code #3

Open
davidebeatrici opened this issue May 29, 2023 · 5 comments
Open

Split RS232 and ESP code #3

davidebeatrici opened this issue May 29, 2023 · 5 comments

Comments

@davidebeatrici
Copy link
Contributor

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.

@leodesigner
Copy link
Owner

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.

@davidebeatrici
Copy link
Contributor Author

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.

@davidebeatrici
Copy link
Contributor Author

I completed both schematic and PCB, here's a preview of the latter:

Pictures

Top
Bottom

Components
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.

@davidebeatrici
Copy link
Contributor Author

The PCB(s) have arrived!

Pictures


@davidebeatrici
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants