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 ModbusRTU
    – Juraj
    Feb 21 '19 at 13:47
  • @Juraj : any particular library? Feb 21 '19 at 14:23
  • You need to implement one of automation protocols or write your own. en.wikipedia.org/wiki/List_of_automation_protocols
    – smajli
    Feb 21 '19 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
    Jul 23 '19 at 7:57
  • 1
    @Adwin not yet. what about you.. please let me know if u get anything. Sep 4 '19 at 4:11

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?? Sep 4 '19 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
    Sep 4 '19 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
    Sep 4 '19 at 13:40

RS485 module has resistor 120 Ohm inside

RS485 module diagram

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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