0

I tried asking a question in my earlier post - SerialEvent with RS485 communication it helped me understand Hardware serial and Software serial but i had few more questions for which i started this new thread. Now i didn't write any code yet, but i will be using same code as my earlier post if i get expert inputs.

My Project - I have 6 Arduino nano which will do some simple task, mostly its one way communication at a time, like once master send message to slave i don't want immediate response slave will push button or something and then it will send response to master. So its rare that i will have two way communication at same time.

RS485 - I am going to use RS485 as distance is around 40ft.

Now my questions -

1 - Can i use Hardware serial pins with RS485 for 40ft distance, i tested code and it does work but i couldn't test that for 40ft. So not sure if it works or not.

2 - Is it good idea to use hardware serial pins for my project i explained, as i see plus and minus over internet and making me confuse. I see majority people recommend Hardware pins though.

3 - Is there limitation connecting multiple arduino nano with this approach, i only did this with 2 so far.

I would appreciate your inputs, which will make me decide to go on right path. Sorry i didn't post any code because my post is more to understand correct path to be followed...

  • en.wikipedia.org/wiki/RS-485 – Juraj May 13 at 15:26
  • @Juraj thanks for answer but i don't think it answer any of my questions, i know function of RS-485 what i am looking for more in terms with Arduino nano with its hardware pin. – Akshay May 13 at 15:34
  • the MAX485 chip on the adapter does the RS485, not the Nano. Nano communicates only with that MAX485. if you use hardware serial for RS485 communication, how will you debug your code without Serial? – Juraj May 13 at 15:41
  • @Juraj i might have asked question incorrectly, from what i understood if i use Pin 0 & 1 which are hardware serial i don't have to use Software serial. Which you can see in my post i mentioned. Now what i wanted to know is weather i can use that SerialEvent approach for my project or not, along with RS485 which uses MAX485. – Akshay May 13 at 19:27
  • if you use hardware serial for the rs485 modules, you can't use it for Serial Monitor. USB is wired to the only one hardware serial of the 328p – Juraj May 14 at 4:08
1

1 - Can i use Hardware serial pins with RS485 for 40ft distance, i tested code and it does work but i couldn't test that for 40ft. So not sure if it works or not.

Yes.

2 - Is it good idea to use hardware serial pins for my project i explained, as i see plus and minus over internet and making me confuse. I see majority people recommend Hardware pins though.

Yes. SoftwareSerial is awful.

3 - Is there limitation connecting multiple arduino nano with this approach, i only did this with 2 so far.

Yes. The MAX485 and similar chips can only handle up to about 30 devices on one bus. The exact number is in the datasheet for the chip.

  • Thanks!!! this really helps me to follow correct direction. – Akshay May 13 at 19:22

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.