Go Down

Topic: Connection multiple arduinos via RS485 (Read 17322 times) previous topic - next topic

graynomad

#15
May 15, 2012, 04:10 pm Last Edit: May 15, 2012, 04:22 pm by Graynomad Reason: 1
Quote
Are you using RS-485 4 -wire (Nodes transmit on 1 pair, receive on the other)?

Yep.

Yes I spent over a year on and off working on a multi-drop/master-slave protocol then finally dropped it in favour of a redundant-ring/peer-to-peer, so I've had to totally rewrite the design.

In the process I've also slashed maybe 80% of the complexity, I want it to be reliable and have no DIP switches to set addresses etc so it's inevitable that some complexities will occur. But I think it will be fairly simple.

I have a finished schematic for a prototyping board and have started the PCB layout.

The design currently uses a Mega1284 at each node, it's not ready for public consumption yet but I'll email you (and anyone with a real interest) a document.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

Rob,
Is RS422 or RS485 better for a 250Kbyte/sec connection over a 100-125' distance? One master, one slave.
Thinking MAXxxx chip on each end with RJ45 connectors.
Thanks
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

tjbaudio

Just a couple of points of reference.  Theater lighting control is considered mission critical by those of us who make our living from it.  The defacto standard is DMX, specifically constructed packets send via RS485.  In some cases it gets finicky BUT if it is deployed according to standards it is VERY robust.  I have seen setups that should not work but do because the protocol and RS485 electrical speck are that robust.

Another project I used it on was for some distributed LED signs.  I used some RS485 chips to extend 2 pins out to multiple signs.  I was using shift out to drive a hand full of 7 segment LEDs in each sign.  My system used 2 max485 at each location.  1 for clock and the other for data.  The cabling was cat5 with rj45.  2 PR for clock and data, 1 pr for common/ground, and one other pr was +12V with a regulator at each drop to feed the Maxim chips 5V. So far it has worked very well with up to 3 signs and several hundred feet.  Over a dozen installs and growing.

graynomad

#18
May 16, 2012, 07:01 am Last Edit: May 16, 2012, 07:49 am by Graynomad Reason: 1
Crossroads,

I've not dealt with 422 but for point-to-point I think it's very similar to 485, one big difference (I think) is that the common-mode voltage levels are lower so it would be slightly more prone to ground offset issues.

As I doubt the price is any different between the transceiver types I'd go with 485.
______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

terryking228

Quote
Is RS422 or RS485 better?


Hi Robert...

Quoting MAXIM, "The great thing about standards is there are so many to choose from."  :)

Selecting and Using RS-232, RS-422, and RS-485 Serial Data Standards by Maxim: http://www.maxim-ic.com/app-notes/index.mvp/id/723

RS-485 meets all the RS-422 specifications and I always thought that RS-422 was just an early version that is seldom used. Anyone know of RS-422 specific applications?
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Coding Badly

Quote
Anyone know of RS-422 specific applications?


When I worked in the industrial world I ran into 422 far more often than 485.  Probably because it's a bit easier to deal with on the software side (no need to turn the transmitter on / off).

graynomad

Ah but that's comparing point-to-point with multi-drop. If both 422 and 485 are used in the same manner there would be no difference in the software.

Quoting me, "I like standards so much I've decided to design my own" :)

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

terryking228

Re: Direction Control:

MAXIM has the "Half-Duplex RS-485-/RS-422-Compatible Transceiver with AutoDirection Control" MAX13487E-MAX13488E

And if you are driving from a PC and USB, the FTDI FT232R (see the data sheet) can automagically control the direction.
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

winner10920

This all seems prety interesting so I wanna try my hand at this and learn a bit, and I know there's a whole bunch of rs485 transievers, which do you guys reccomend the most?

terryking228

Hi, MAX485 is the most popular I think... 75176 is the oldie but goodie...   Newer ones are the MAX13487E-MAX13488E mentioned above.

Here are the MAX485 and 75176 on modules: http://goo.gl/S1lFR

The USB interface one uses the 75176 and it's direction is automatically controlled by the FTDI USB Interface, so your PC/MAC application does not need to know about RS-485, just "Serial"..

The "Arduino" / Micro one brings out both Driver Enable and Receiver enable, and the Sketch has to control the driver (as usual).. 

I'm just starting to write some code for these; if I have news or examples I'll drop back in here and point to the info...

DISCLAIMER: Mentioned stuff from my own shop...
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

gjg.gondaliya@gmail.com

Hello,
I am very confused about 6 Arduino serial communication using RS485. So can you please help me out how to configure all of them together and make communicating with each other? It will be a great help.
Thank you.

MAS3

#27
Jul 28, 2017, 01:49 am Last Edit: Jul 28, 2017, 01:51 am by MAS3 Reason: Link breaks when linking to a search on the mentioned site, had to fix that.
Hi.

This is a very old thread.
In the meantime terryking228 has his shop moved to another (better) domain.
So this (click !) is where you can find the information he has shared in this thread.
Terry has always been honest about mentioning products from his own shop, as you still can see in his posts.
He shows examples and a link to a how to site, so i'm sure you'll find all you need.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

MarkT

Hello,
I am very confused about 6 Arduino serial communication using RS485. So can you please help me out how to configure all of them together and make communicating with each other? It will be a great help.
Thank you.
RS485 is only the standard for the voltages/currents on the wire, its says nothing else, there
is no protocol as such.

So you can use it however you wish, but you have to arrange that no more than one station transmits
simultaneously, ie do the bus-negotiation somehow.

Mostly people use a single master and multiple slaves to make this easy - the master polls the slaves and
lets them answer.  Slaves only transmit if asked.  This requires each slave to have a unique id of some sort
to prevent two replying at once.

You can pick an existing bus that works over RS485 and use that protocol if you wish.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Watcher

#29
Jul 31, 2017, 11:58 am Last Edit: Jul 31, 2017, 12:22 pm by Watcher
I am using RS485 interface to connect a number of arduino based controllers together. Iam using MAX3480 which can support multiple transceivers on the bus (upto 256) as opposed to the standard MAX485.



I have tried a mixture of daisy chain connections as well as star connections with very robust communication results at the speed i am using which is 9600bps. Iam using the smart bus protocol on top of RS485.

CAT5E is used to carry both the RS485 signals as well as power to each arduino. Power is carried at 24VDC to avoid voltage drops due to the distances inlolved and then lowered accordingly for the needs of the arduinos.

I have recently also tried PLC as well as WIFI as alternative transport in the cases where wired RS485 is not available.

In this application, all arduinos listen to the bus and respond when addressed  (each has a unique Device ID) Bus congestion sometimes does happen and this case when the message doesn't get to the other end, it is being repeated. In addition, each device before transmitting , listens and waits to see that no one else is talking.

New version with single relay, PLC, and wifi. This one is powered directly from the 230V AC mains and it is intended to automate individual remote mains power outlets.




Go Up