RS 485 testing regarding.

Thread Starter

selvamurugan_t

Joined Aug 8, 2016
18
Hi,

My device is RS485 output.My embedded board contains one RS 485 port.

when i am interfacing my device output(RS485) to embedded pc.Its not working.Its working the on the RS 232 port when I am using RS485 to RS232.

So how test in embedded pc RS485 is working or not.In 232 we can do the loop back test.

whatever the possibilities available please inform to me .

D+
D-
Gnd
12v DC for my device

above 4 wires are connected in the DB9 female.

Thank you
 

MrChips

Joined Oct 2, 2009
30,824
Setting up RS-485 to work is not as straight forward as RS-232. It is not simply plug-n-play.

RS-485 requires four resistors, two are bias resistors and two cable termination resistors.
Firstly, you have to check if any of these resistors are already installed. If not installed you have to add them externally.

One pull-up resistor goes from D+ to 5V. One pull-down resistor goes from D- to GND. A termination resistor goes from D+ to D- at the two extreme ends of the cable run. Check to see if these are already installed. Measure the DC voltage from D+ to GND and D- to GND when all resistors and cable are attached.

Note: Not all device manufacturers are consistent on their labeling of D+ and D-. Some may be reversed.

We assume that the baud is correct. Always confirm.
RS-485 is a bi-directional transmission line and requires a data communication protocol. Make sure the protocol is correct.

Check these guidelines:
http://www.ti.com/lit/an/slla272c/slla272c.pdf

Edit: TI just updated their file from slla272b to slla272c on Oct 2016
 

John P

Joined Oct 14, 2008
2,026
What you might do is get an additional computer with a differential receiver interface, and set it up with software to "eavesdrop" on the RS485 line. If you can decode packets sent by the two units on the system, you'd be able to see what each of them is transmitting, and you could figure out whether it makes sense.

I'm dubious about how useful that TI paper would be to people here. It talks about the ultimate capabilities of RS-485, involving differing ground levels along the network, megahertz data rates and long cables. That's certainly not wrong, but if you're running a whole system on a desktop with only a single power supply, at the kind of baud rates that a microcontroller can typically generate, none of that applies. The issues are more likely to be verifying data rates and protocols, and simply getting it wired up correctly.
 

MrChips

Joined Oct 2, 2009
30,824
What you might do is get an additional computer with a differential receiver interface, and set it up with software to "eavesdrop" on the RS485 line. If you can decode packets sent by the two units on the system, you'd be able to see what each of them is transmitting, and you could figure out whether it makes sense.

I'm dubious about how useful that TI paper would be to people here. It talks about the ultimate capabilities of RS-485, involving differing ground levels along the network, megahertz data rates and long cables. That's certainly not wrong, but if you're running a whole system on a desktop with only a single power supply, at the kind of baud rates that a microcontroller can typically generate, none of that applies. The issues are more likely to be verifying data rates and protocols, and simply getting it wired up correctly.
Point taken. I just linked to the first technical doc that Google provided without thoroughly reading it.
The point I'm trying to make is what I said in the first line:
"Setting up RS-485 to work is not as straight forward as RS-232. It is not simply plug-n-play."
Too many people try to interface with RS-485 without understanding the application, performance, specifications and implications.

Specifically, I should have searched for a reference that points out simply and clearly the need for bias and termination resistors and to be able to identify D+ and D- correctly.
 

Thread Starter

selvamurugan_t

Joined Aug 8, 2016
18
Hi

Thank yo for reply and we have purchase the 8 No's of RS485 to RS232 connector in a shop.

The connectors are previously working fine and now its not working.

At the RS485 side of it's have 6 pin connector

D-.D+,RX+,RX-,GND,5-12v

I am using D-,D+,Gnd,5v-12V for my RS485 connection.

I don't thing resistors are connected between the connectors.

The above link also not opening .

So that I am requesting you the send the diagram for connecting 2 bias resistor and 2 wire termination resistor
 

Thread Starter

selvamurugan_t

Joined Aug 8, 2016
18
RS-485 allows multiple devices (up to 32) to communicate at half-duplex on a single pair of wires, plus a ground wire (more on that later), at distances up to 1200 meters (4000 feet). when we are using 4 wires we can use full duplex communication will happen.

just i what know the push up and pull down resistors values for connecting the D+,5-12v
then D-,Gnd
Please make me clearly understand why should we use those resistors
 

John P

Joined Oct 14, 2008
2,026
First of all get a meter and check the voltages on D+ and D-. If one is higher than the other all the time, it's probably already terminated. If not, try 560 ohms from D+ to 5V on one of your units (not the 5-12V power supply) and another 560 ohms to ground, and 120 ohms between D+ and D-. You need the resistors because the RS-485 system uses a comparison of the voltages on the 2 wires D+ and D- to convey information. The lines will not be actively driven all the time, and the function of the resistor is to cause one line to be higher than the other so that false data is not not indicated.
 
Top