0

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

  • TO TYPE LIKE THIS is considered to shout and there is no need to shout! – MatsK Feb 21 at 13:18
  • addressing the slaves is on you. or use ModbusRTU – Juraj Feb 21 at 13:47
  • @Matsk : apologies for such typing. I would love to get edits. – JavaEnthusias Feb 21 at 14:22
  • @Juraj : any particular library? – JavaEnthusias Feb 21 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 at 15:22
0

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

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.