Jump to content

Is an Arduino Mega necesary as a master for an RS485 network?


lesthegrngo

Recommended Posts

Yes you need a Mega to run as RS-485 Master.

 

The Uno, Nano, Micro only have one serial ports called UART (universal asynchronous receiver-transmitter) port while the Mega has four UART ports.

 

The first/only UART is connected directly to the onboard USB-to-serial interface and is used when you load a sketch unto the board. This is the reason why you should normally not use pins 0(RX) and 1(TX).

 

In order to run a Master unit you need one UART port to handle the communication via USB-to-serial interface to the computer running DCS-BIOS AND another UART to run the RS-485 communication via a MAX487 chip. This will rule out Nano, Uno etc.

The only other Arduino having more than one UART is the Due but IIRCC then that cannot run RS-485 with DCS-BIOS as the DCS-BIOS code won't work on the ARM processor of the Due.

 

In theory a Mega Master can run 3 separate RS-485 communication lines. I seem to recall that Ian wasn't sure the Mega have the processor power to handle 3x RS-485 lines at the same time but should be able to handle two.

 

Here is a little more on the serial communication on the Arduinos; https://www.arduino.cc/reference/en/language/functions/communication/serial/

 

On the slave side you only need one UART to communicate with the MAX487 chip.

 

As far as I can read up on UART should not be mistaken for RS-232. They operate on different voltage levels as well as logic levels are in inverted BUT the UART can be used to run a RS-232 driver chip similar to what we use for RS-485. https://electronics.stackexchange.com/questions/274287/what-is-the-difference-between-rs-232-and-ttl-uart

 

 

Cheers

Hans


Edited by Hansolo
Typo
Link to comment
Share on other sites

Thanks guys, I'll get a mega ordered in. Hopefully I can test individual parts by just changing the sketch from referring to the RS485 to an arduino reference so I can use the Uno on a one by one basis

 

**edit**

 

is the MEGA 2560 R3 ok? seems to be the replacement for the old Mega

 

Cheers

 

Les


Edited by lesthegrngo
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...