Go Down

Topic: Connection multiple arduinos via RS485 (Read 6 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. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

Go Up