A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By ovdleun
#52715 Great job Reaper7! That's looking like what I'm wanting to accomplice.
What I really want to get to is this setup: download/file.php?id=1072&mode=view
However not really sure if your code will:
- work with the SDM120c (I think it just might, because the modbus proto won't be that different)
- work with the ESP1 (or ESP-12E which I also have laying around) : got it running at least
- work with the MAX485 module I've bought.

Will try it at least. When you might have some hints, please let me know ;o)

Greetz.
Onno.
User avatar
By reaper7
#52758 @ovdleun

- work with the SDM120c (I think it just might, because the modbus proto won't be that different)

I think YES, remember about changing serial speed because default for 120c is 2400 (?)

- work with the ESP1 (or ESP-12E which I also have laying around) : got it running at least

esp01 have only gpio0 and gpio2 available and my lib uses softwareserial library ... so I don't know how this affect esp8288 boot process, because gpio0 and gpio2 must be pullup when esp starts.
I check this today...

- work with the MAX485 module I've bought.

I don't know, max485 have 4 pins on the esp8266 side, I don't have experience with this, that is why I bought little better for me rs485 to rs232 converter which has only tx and rx on the esp8266 side :D
User avatar
By reaper7
#52802 As I promised earlier, I checked gpio0 and gpio2 at 2400baud
Code: Select allSDM220<2400, 0, 2> sdm;                      //baud, rx pin, tx pin

for me everything works properly
but as I say above, my converter is different, it's only tx and rx (no additonal gpio for direction control)
User avatar
By ovdleun
#53362 @Reaper7,

Thanks for the extensive answers and the esp1 test! Really appreciated.
I tested it with the MAX485 converter but indeed didn't get anything from it. However my rs485 to rs232 converter, just like the one you're using, just arrived! Yeah. So will give it all another try today. Will post back the results.

Greetz.
Onno.