💬 Building a wired RS485 sensor network
-
hello MySensors friends,
I am currently making a node based on an arduino Mega 2560 with transport via RS-485, the build page says that we should use the MEGA pin 46 & 48, I was wondering if I would like a reference for this. in the sketch.
Second question; can I use pin 47 for the DE pin with:#define MY_RS485_DE_PIN 47I haven't tested anything yet, so actually I just ask a lazy question ;)
-
Hello, I would like to better understand the concept here. It sounds like we still need a gateway connected to a controller (serial, Ethernet, WiFi, etc.) but the interface between gateway and multiple nodes is over wired RS485 serial interface. Please confirm. Thank you for your great efforts!
-
Hello, I would like to better understand the concept here. It sounds like we still need a gateway connected to a controller (serial, Ethernet, WiFi, etc.) but the interface between gateway and multiple nodes is over wired RS485 serial interface. Please confirm. Thank you for your great efforts!
@apl2017 Yes, also for RS485 variant you'll need a gateway. Only the communication between the gateway and the other nodes is handled over RS485, connected to a second (typically software) serial interface (for remote nodes, you may just use the hardware serial interface to connect the RS485 transceiver, if you do not need debug output; but imo this option is not recommended for beginners).
-
hello MySensors friends,
I am currently making a node based on an arduino Mega 2560 with transport via RS-485, the build page says that we should use the MEGA pin 46 & 48, I was wondering if I would like a reference for this. in the sketch.
Second question; can I use pin 47 for the DE pin with:#define MY_RS485_DE_PIN 47I haven't tested anything yet, so actually I just ask a lazy question ;)
@dzjr said in 💬 Building a wired RS485 sensor network:
hello MySensors friends,
I am currently making a node based on an arduino Mega 2560 with transport via RS-485, the build page says that we should use the MEGA pin 46 & 48, I was wondering if I would like a reference for this. in the sketch.
Second question; can I use pin 47 for the DE pin with:#define MY_RS485_DE_PIN 47I haven't tested anything yet, so actually I just ask a lazy question ;)
I have it working, so you don't have to adjust anything for a Mega, and pin 47 for DE also works!
-
I have a node with 52 child id's on a Arduino mega,
Arnout 22 of Them receiving data (relay & dimmers) and the rest are sending data, binary, temp/hum, soil moisture and analog data.
Not all the nodes are in use, but i see the data in domoticz.
I dont know how manny childs you want to use, for me 52 on one node are very mutch.
-
I have a node with 52 child id's on a Arduino mega,
Arnout 22 of Them receiving data (relay & dimmers) and the rest are sending data, binary, temp/hum, soil moisture and analog data.
Not all the nodes are in use, but i see the data in domoticz.
I dont know how manny childs you want to use, for me 52 on one node are very mutch.
-
Hi all,
I have a question about, How to use hardware serial on Arduino Uno (as a sensor) to communicate with gateway via RS485? I added #define MY_RS485_HWSERIAL Serial and it is only working when i turn on debugging (#define MY_DEBUG), how to use hardware serial without debugger ? -
@zrom69
No real Problem in turning off debug output, at least in 2.3.1 this worked:// Enable debug prints to serial monitor //#define MY_DEBUG //#define MY_DEBUG_LOCAL #define SN "Zwischenkeller" #define SV "0.2" // Enable RS485 transport layer #define MY_RS485 // Define this to enables DE-pin management on defined pin #define MY_RS485_DE_PIN 2 // Set RS485 baud rate to use #define MY_RS485_BAUD_RATE 19200 //57600 //38400 //9600 #define MY_RS485_SOH_COUNT 1 #define MY_RS485_HWSERIAL Serial #define MY_SPLASH_SCREEN_DISABLEDYou may even swap around debugging output from hardware serial to software serial, see basic structure from this post in FHEM forum (german, but most is code).
-
I am trying to build up a Mysensors with Wired ethernet to the gateway with W5100 and RS485 bewteen nodes, is there something that can help me with this configuration?
Everything looks weel from the monitor serial but domoticz is not able to connect to the gateway! -
I am trying to build up a Mysensors with Wired ethernet to the gateway with W5100 and RS485 bewteen nodes, is there something that can help me with this configuration?
Everything looks weel from the monitor serial but domoticz is not able to connect to the gateway! -
I see there is a possibility the combine Ethernet with RS485.
Maybe you can check the setup as they did here:https://www.openhardware.io/view/649/RS485-Ethernet-Gateway#tabs-comments
https://github.com/feanor-anglin/GetWired-Project/blob/master/GetWired Ethernet Gateway/Gateway.ino
-
You can also try using PJON - it has solved all the issues that I was facing with RS485 and other wired solutions (like all sensors on the Gateway). It will be released officially in MySensors 2.4.0, but you can test is already now (alpha):
https://github.com/tekka007/MySensorsYou can read more here:
https://github.com/mysensors/MySensors/pull/1278 -
You can also try using PJON - it has solved all the issues that I was facing with RS485 and other wired solutions (like all sensors on the Gateway). It will be released officially in MySensors 2.4.0, but you can test is already now (alpha):
https://github.com/tekka007/MySensorsYou can read more here:
https://github.com/mysensors/MySensors/pull/1278@gryzli133 I have a number of MySensors devices using RS485, it would be interesting to try to run PJON protocol over RS485, it seems like there is such an opportunity, but I could not figure out how to use it in the MySensors library.
-
@hypnosiss you may be interested in this https://forum.mysensors.org/topic/11814/rs485-transport-ack-support/6