-
Notifications
You must be signed in to change notification settings - Fork 97
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
SDM630 on ESP32 not working #55
Comments
Good evening Everybody, Good news first: Its working now - thank you reaper7 for your support! I followed your suggestions with Termite and the webpage was updated well - so far it seems the code was OK. As I have no logic tester, I used the LED and got slightly confused: Inspired by my success, I now wanted to read-in the voltages of L2/L3 and modified main.cpp + index_page.h. I searched again one more long evening - the reason for my late reply - and realized that the 2nd (and my last) MAX485 was killed also - damned. Now I ordered a bunch of them at aliexpress (50 pcs for 12€) and another converter from Amazon for 8€ (yes, quite expensive, but I don't want to wait another 20-30 days for next attempt). So, from now I will transfer only with a disconnected converter - or has someone a better idea? Thank you all, especially reaper7 - and keep this project running. Good job 👍 |
lack of activity. closed |
Hello and good evening,
I'm new in ESP32 and Modbus and have trouble to get the connection to my SDM630 working at all.
May I ask you to help me? Thanks in advance for your support!
My hardware is a ESP32 devkit v4 with a Max485 and SDM630; as software I use PlatformIO.
What I did up to now:
I made new project in PlatformIO and included SDM and downloaded the example SDM_Live_page_ESP32_hwserial.
Then I included <index_page.h> and all necessary lib-deps like <AsyncTCP.h>, <ESPAsyncWebServer.h>
Now I removed // of #define USE_HARDWARESERIAL in SDM_Config_User.h and defined in Arduino.h the "NOT_A_PIN" to "2" as I assume this is De/Re which is used in line "SDM sdm(Serial, 9600, NOT_A_PIN, SERIAL_8N1, 3, 1); of main.cpp).
I entered my wifi data, compiled the code and flashed the ESP - voila the webpage was working but of course all values are zero and Error counter was increasing. SDM READ ERR. CODE | 4 | code was shown.
Now I powered off and connected ESP with Max485 like this:
GPIO1 (TXd)==> DI
GPIO3 (RXd)==> RO
GPIO2 ==> DE+RE
3.3V ==>Vcc
Gnd ==> Gnd
Then I connected the Max485 with the SDM630:
A ==> A
B ==> B
Gnd ==>G
And re-powered everything incl. SDM630. FYI: at the SDM630 no software changes were made, Modbus settings remained default (Adr 001, Baud 9.6k, Par None,Stop 1).
BUT: Now the Webpage still remained counting read errors and the error code also remaind on "4".
I checked wiring several times and read lot of issues here but finally found no solution to get it working.
I checked with Termite if the ESP sends requests and it seems to be working but somehow nothing comes back...
Please let me know if you have an idea what to check next - thanks in advance.
With best regards
Clemens
The text was updated successfully, but these errors were encountered: