I am using Arduino Uno as a Master Device and 3 Arduino Unos as slave devices.
I am sending data from each slave to master after every 3 seconds continuously, and is going to execute further logic accordingly.
I have been using a lot of libraries to test this scenario. There are libraries which are using SoftwareSerial and HardwareSerial too, but these libraries are not working for me when i have multiple slaves and one master (It is only working with one master and one slave).
Please suggest me a better library which would be useful in my scenario.
Wiring Diagram: Wiring Diagram
-
addressing the slaves is on you. or use ModbusRTUJuraj– Juraj ♦2019年02月21日 13:47:18 +00:00Commented Feb 21, 2019 at 13:47
-
@Juraj : any particular library?JavaEnthusias– JavaEnthusias2019年02月21日 14:23:04 +00:00Commented Feb 21, 2019 at 14:23
-
You need to implement one of automation protocols or write your own. en.wikipedia.org/wiki/List_of_automation_protocolssmajli– smajli2019年02月21日 15:22:41 +00:00Commented Feb 21, 2019 at 15:22
-
1have you got any answer to solve this case? I am working to build system like this, but it is still not doing well :(Adwin– Adwin2019年07月23日 07:57:40 +00:00Commented Jul 23, 2019 at 7:57
-
1@Adwin not yet. what about you.. please let me know if u get anything.JavaEnthusias– JavaEnthusias2019年09月04日 04:11:43 +00:00Commented Sep 4, 2019 at 4:11
2 Answers 2
First of all, your connection is just wrong, you should make the RS-485 bus as a straight line, with a 120 ohm resistor at the beginning and another one at the end. Each slave should tap into that line as close as possible to that line, look for datasheets and you will understand what I am talking about.
Second, you can use Modbus as a pretty good and easy to use communication protocol.
-
hey thanks for the reply on such old post. which datasheet i shall exactly look into??JavaEnthusias– JavaEnthusias2019年09月04日 04:11:14 +00:00Commented Sep 4, 2019 at 4:11
-
Max485 is a classic, probably has it, if not, look for Application Notes on RS-485, TI has good material on this.mFeinstein– mFeinstein2019年09月04日 13:39:19 +00:00Commented Sep 4, 2019 at 13:39
-
And the post is not old, just half a year, I have seen a lot worse than that. Don't forget to accept if it answers.mFeinstein– mFeinstein2019年09月04日 13:40:17 +00:00Commented Sep 4, 2019 at 13:40
RS485 module has resistor 120 Ohm inside
Explore related questions
See similar questions with these tags.