Pages: 1 [2]   Go Down
Author Topic: Connection multiple arduinos via RS485  (Read 4753 times)
0 Members and 1 Guest are viewing this topic.
nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 121
Posts: 8438
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: May 15, 2012, 09:22:33 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 437
Posts: 23709
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Full Member
***
Karma: 2
Posts: 128
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 121
Posts: 8438
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: May 16, 2012, 12:49:03 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 437
Posts: 23709
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Rob!
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Topsham, Vermont USA
Online Online
Edison Member
*
Karma: 23
Posts: 1757
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is RS422 or RS485 better?

Hi Robert...

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

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?
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 121
Posts: 8438
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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" smiley

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Topsham, Vermont USA
Online Online
Edison Member
*
Karma: 23
Posts: 1757
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Edison Member
*
Karma: 4
Posts: 1723
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Topsham, Vermont USA
Online Online
Edison Member
*
Karma: 23
Posts: 1757
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Pages: 1 [2]   Go Up
Jump to: