2

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

5
  • addressing the slaves is on you. or use ModbusRTU
    – Juraj
    Commented Feb 21, 2019 at 13:47
  • @Juraj : any particular library? Commented 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_protocols
    – smajli
    Commented Feb 21, 2019 at 15:22
  • 1
    have you got any answer to solve this case? I am working to build system like this, but it is still not doing well :(
    – Adwin
    Commented Jul 23, 2019 at 7:57
  • 1
    @Adwin not yet. what about you.. please let me know if u get anything. Commented Sep 4, 2019 at 4:11

2 Answers 2

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.

3
  • hey thanks for the reply on such old post. which datasheet i shall exactly look into?? Commented 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
    Commented 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
    Commented Sep 4, 2019 at 13:40
0

RS485 module has resistor 120 Ohm inside

RS485 module diagram

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.