EmbeddedRelated.com
Forums

rs485 question

Started by JY Kim November 16, 2007
Hello.

I am software enginer and working with board with rs485
rs485 transceiver is 3.3V ST3485E and is connected with PLC.
When I send data from my board to PLC, voltage level is 3.3V but PLC
send 5V data.
PLC recognize 3.3V input data in 1200bps but not 9600 bps. when PLC
recognize 1200bps signal it sends reponse which my board can
recognize.
and garbage data that PLC doesn't send is continuously received by
rs485 transceiver.
I wonder if this is correct situation. rs485 Vdd is 3.3V and receives
5V signal and it can recognize 1200bps signal but not 9600. and
continuous garbage data cause interrupts.
I guess we should use 5V transceiver but h/w guy says this is correct
situation and when they connect 2 GND lines, pheonomenon will be
corrected.
Please anyone help me solve this problem

Thanks
JY Kim wrote:
> Hello. > > I am software enginer and working with board with rs485 > rs485 transceiver is 3.3V ST3485E and is connected with PLC. > When I send data from my board to PLC, voltage level is 3.3V but PLC > send 5V data. > PLC recognize 3.3V input data in 1200bps but not 9600 bps. when PLC > recognize 1200bps signal it sends reponse which my board can > recognize. > and garbage data that PLC doesn't send is continuously received by > rs485 transceiver. > I wonder if this is correct situation. rs485 Vdd is 3.3V and receives > 5V signal and it can recognize 1200bps signal but not 9600. and > continuous garbage data cause interrupts. > I guess we should use 5V transceiver but h/w guy says this is correct > situation and when they connect 2 GND lines, pheonomenon will be > corrected. > Please anyone help me solve this problem
Make the hardware guy fix it and demonstrate that it's fixed.
On Sat, 17 Nov 2007 12:07:53 +0900, JY Kim <jkim747.n0zpam@paran.com>
wrote:

>Hello. > >I am software enginer and working with board with rs485 >rs485 transceiver is 3.3V ST3485E and is connected with PLC. >When I send data from my board to PLC, voltage level is 3.3V but PLC >send 5V data.
RS-485 is a differential protocol, so as long as the receiver sees at least a +/-200 mV difference between the A and B lines, it should detect the characters correctly. However, there is the common mode voltage range issue, but if the 3.3 V device claims RS-485 compatibility, +5 V is definitely within the common mode voltage range. However, the 3.3 V transmitter voltage swing is smaller, so you do not tolerate as much voltage drop on long lines as with 5 V devices. However, since the receiver requirement is only +/-200 mV, there should not be problems with short cables.
>PLC recognize 3.3V input data in 1200bps but not 9600 bps. when PLC >recognize 1200bps signal it sends reponse which my board can >recognize. >and garbage data that PLC doesn't send is continuously received by >rs485 transceiver.
When neither transceiver is driving the bus, it floats in three-state and the receiver may pick up random noise. Use the "fail-safe" termination specified in the RS-485 standard. Put a resistor equivalent to the characteristic impedance of the cable (typically 100-120 ohms) to both extreme ends of the bus and bias the bus into "Mark" state by pulling the other line to Vcc and the other to Gnd at one point of the bus with 1-10 kohm resistors. This will create a passive "Mark" ("1") state, when no transceivers are active.
>I wonder if this is correct situation. rs485 Vdd is 3.3V and receives >5V signal and it can recognize 1200bps signal but not 9600. and >continuous garbage data cause interrupts.
You have other problems with 9600 bit/s (data overrun?), but the continuous garbage is due to the missing "fail-safe" termination.
>I guess we should use 5V transceiver but h/w guy says this is correct >situation
The 3.3 V transmitter might not be able to run 115kbit/s using thin wires, but apart from that, this should not be a problem.
>and when they connect 2 GND lines, pheonomenon will be >corrected.
You either have to connect the GND lines or run with ust the A and B lines with proper termination (and "Mark" biasing at both ends, if the devices are truly floating). Paul
On Sat, 17 Nov 2007 12:07:53 +0900, the renowned JY Kim
<jkim747.n0zpam@paran.com> wrote:

>Hello. > >I am software enginer and working with board with rs485 >rs485 transceiver is 3.3V ST3485E and is connected with PLC. >When I send data from my board to PLC, voltage level is 3.3V but PLC >send 5V data. >PLC recognize 3.3V input data in 1200bps but not 9600 bps. when PLC >recognize 1200bps signal it sends reponse which my board can >recognize. >and garbage data that PLC doesn't send is continuously received by >rs485 transceiver. >I wonder if this is correct situation. rs485 Vdd is 3.3V and receives >5V signal and it can recognize 1200bps signal but not 9600. and >continuous garbage data cause interrupts. >I guess we should use 5V transceiver but h/w guy says this is correct >situation and when they connect 2 GND lines, pheonomenon will be >corrected.
There should be a ground connection to keep the common mode voltage within reason. Fix that first. There's no inherent problem with the different supply voltages.
>Please anyone help me solve this problem > >Thanks
"Paul Keinanen" <keinanen@sci.fi> wrote in message 
news:nsssj31bfg87l0l8div4eqjv56v3ept0qe@4ax.com...
> On Sat, 17 Nov 2007 12:07:53 +0900, JY Kim <jkim747.n0zpam@paran.com> > wrote: > >>Hello. >> >>I am software enginer and working with board with rs485 >>rs485 transceiver is 3.3V ST3485E and is connected with PLC. >>When I send data from my board to PLC, voltage level is 3.3V but PLC >>send 5V data. > > RS-485 is a differential protocol, so as long as the receiver sees at > least a +/-200 mV difference between the A and B lines, it should > detect the characters correctly. > > However, there is the common mode voltage range issue, but if the 3.3 > V device claims RS-485 compatibility, +5 V is definitely within the > common mode voltage range. > > However, the 3.3 V transmitter voltage swing is smaller, so you do not > tolerate as much voltage drop on long lines as with 5 V devices. > However, since the receiver requirement is only +/-200 mV, there > should not be problems with short cables. > >>PLC recognize 3.3V input data in 1200bps but not 9600 bps. when PLC >>recognize 1200bps signal it sends reponse which my board can >>recognize. >>and garbage data that PLC doesn't send is continuously received by >>rs485 transceiver. > > When neither transceiver is driving the bus, it floats in three-state > and the receiver may pick up random noise. Use the "fail-safe" > termination specified in the RS-485 standard. Put a resistor > equivalent to the characteristic impedance of the cable (typically > 100-120 ohms) to both extreme ends of the bus and bias the bus into > "Mark" state by pulling the other line to Vcc and the other to Gnd at > one point of the bus with 1-10 kohm resistors. This will create a > passive "Mark" ("1") state, when no transceivers are active. > >>I wonder if this is correct situation. rs485 Vdd is 3.3V and receives >>5V signal and it can recognize 1200bps signal but not 9600. and >>continuous garbage data cause interrupts. > > You have other problems with 9600 bit/s (data overrun?), but the > continuous garbage is due to the missing "fail-safe" termination. > >>I guess we should use 5V transceiver but h/w guy says this is correct >>situation > > The 3.3 V transmitter might not be able to run 115kbit/s using thin > wires, but apart from that, this should not be a problem. > >>and when they connect 2 GND lines, pheonomenon will be >>corrected. > > You either have to connect the GND lines or run with ust the A and B > lines with proper termination (and "Mark" biasing at both ends, if the > devices are truly floating).
Also beware that the definition of A and B circuits, as defined in the RS-485 spec, is inverted with respect to the "standard" SN75176-type transceiver. No, really. It's a long-standing fuckup. Steve http://www.fivetrees.com