Pages: [1]   Go Down
Author Topic: RS485  (Read 13646 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all

I need communicate 2 Arduino through RS485; i have 2 MAX485 but I don't know how connect Arduino with MAX485.

Have somebody tryed it? Have somebody experience with RS485?

Thank you in advanced.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 637
Posts: 34597
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

RS485 is just like RS232 but differential. If you just take one side of it you can send it to an RS232 port. The MAX 485 will convert the signal voltages to the logic signals you need to connect into Pins 1 & 2 on the Arduino, this is the serial port. The you use it just like you would use serial.

In fact you could cut out the Arduino all together and feed the RS285 straight into an RS232 / USB interface and do your software with Processing.
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are more differences between 232 and 485 than the differential signaling - maybe you are thinking of RS422, which is a lot like 232 except differential?

RS485 is multipoint to multipoint, I believe there is some addressing involved, and there are some other changes to accommodate that (I think the output goes hi-Z when not transmitting?).

There is more to even RS232 than the electrical connection - there are specifications on start bits, parity calculation (if used), and other data link layer issues even with our humble RS232.

To the original poster:  I think it has been done, but I'm not familiar with it.

Doesn't DMX use rs485?  Maybe looking at some of those projects will help.

-j

Logged

malmö / berlin
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
fhp>--vs--<k3
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

dmx use RS-485 check out the wiring at the playground:

http://www.arduino.cc/playground/DMX/DMXShield

but this set up there is just for a master talking to a slave,
for communcating you could do something like this:

http://tomekness.files.wordpress.com/2008/06/rs-485_communcation.pdf

you can be a little bit smarter and use just one arduino out pin for the RE and DE.

ha det bra
tomek
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all

Thanks for your answers, I have achieved communication through RS485. I used the Tom's document for the connections.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Please could you post a sample of your code, I'd be interested to see what you've done...

Thanks!
Logged

0
Offline Offline
Edison Member
*
Karma: 16
Posts: 1579
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Some time ago, I wrote a RS485 sample code in spanish forum.

I´m going to translate to english asap, while you can see the code here => http://real2electronics.blogspot.com/


Orignal posts => http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1245014666/all


Regards,


Igor R.
Logged


0
Offline Offline
Edison Member
*
Karma: 16
Posts: 1579
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Now, the english version to follow:
http://real2electronics.blogspot.com/2009/09/arduino-and-rs485-english-version.html

 smiley-wink
Logged


Pages: [1]   Go Up
Jump to: