RS485 Does Not Work if Ground Is Connected

  • Thread starter Chinmay Harkare
  • Start date
C

Thread Starter

Chinmay Harkare

Facing what I can only assume are grounding problems.

This is the first time I am working with RS485.

There are basically about 20 MAX485 and arduino based RS485 devices on our bus and the Master is the PC which runs our custom software. Not once has there been a single issue in lab testing for more than a month.

First of all, the cable used on site is unshielded CAT5. This is because it was already put by the previous vendor before we entered the picture. Total length about 900m. Changing the cable is not an option at this stage.

All devices are connected in series, and there are no 'T' connections/star points.

All the devices have their own isolated SMPS and are not connected to the physical earth.

One of the CAT5 twisted pairs is used for RS485 and one of the pairs is used for connecting the Grounds.

All RS485 Grounds are connected together and this wire finally is connected to the Ground terminal of the 485 to 232 converter connected to the PC. It probably gets connected to Physical Earth through the PC.

Here's what is happening:

The exact same system is working perfectly fine in another building here for more than 15 days and still is.

Completed testing the cabling for building 2 yesterday. The complete system was working excellently for more than 24 hours on the PC and I had already booked a ticket home.

Suddenly communication completely stopped, some devices were not responding at all and others were responding very slowly with various time outs.

I removed the RS485 wires from the PC and put them into my Laptop through a 485 to USB converter and everything was perfect and all devices were responding instantly. I was happy that none of the devices were damaged and concluded that the RS485 to RS232 converter was probably broken.

I connected the 485 to USB converter to the PC expecting it to work perfectly but there was no response. I disconnected the ground wire from the USB to 485 converter and it started working OK, but not excellent. Terminal software shows that there is continuous noise on the RS485 bus with the byte 255 being received by the PC every few seconds. Though communication has started, but the byte 255 is occurring every few seconds. This will result in timeouts every now and then but the communication will at least take place. The packets which get corrupted by the 255 should get thrown away by our protocol and the data again requested by the Master. Thus even though there shouldn't be any overall errors in the system, this doesn't seem to be a very reliable, robust and trustworthy RS485 network.

I can only imagine that the entire communication is extremely clean on the Laptop due to the lack of physical earth. I am almost certain that the same garbage will occur even on the Laptop when the 3 pin charger is connected. Will confirm this tomorrow.

The reason for me to believe this is that I was experiencing minor shocks when touching the RS485 lines which were connected to the Laptop as well as the main RS485 bus a few days back. Removing the Laptop charger stopped the shocks.

I also think that the PC will also have crystal clear communication if its earthing is disconnected, although this is just a hypothetical scenario due to the major risk of electric shock if this is done.

All in all, what do you make of this? System that runs perfectly on a Laptop and not so perfectly on a PC? I am reluctant to leave the site knowing that even though the system looks like it works but weird unexplained things are happening under the hood.
 
That was a great description of the problem; somewhat unique in ForumLand.

I had similar circumstances - when the laptop was 'floating' on battery power it worked fine. When the laptop charger was plugged in, the 485 network essentially had a heart attack.

I put in an RS-485 isolator (485 in/.485 out) in the network, between the USB/485 converter and the field network lines. That fixed the problem. It so happened that the isolator I picked labeled A and B data lines the opposite of the other components, but swapping the lines fixed that.
 
I would ensure that you have proper termination resistors; nominal value 120 ohms.

And could also try idle state bias resistors at 1 terminating resistor, effectively pull up and pull down resistors. One from A line to Vs and one from B line to ground. Typical values from 1200 to 2100 ohms.
 
C

Curt Wuollet

If you can't connect the ground on your network, I'd check for a difference in ground potential on the connected machines. It doesn't
take much of a difference to mess things up. This is quite common with laptops because the ports are not isolated. Appreciable noise can be injected and considerable current can flow with half a volt of difference as measured with a multimeter. The bias idea can help in some cases, but fixing the grounds or an isolator may be necessary. This is another case where floating power to a PLC can cause headaches. When in doubt get a scope and watch your signal levels, I've see where attaching a ground can take the network outside of the common mod voltage range of the transceivers and they simply quit working.

regards
cww
 
Sound to me like the AC power plug you are using has a "ground" which is floating and not properly bonded to Neutral and Earth at source. When this happens the floating ground wire will adopt a level somewhere less then 120VAC / 2 = 60 VAC. This happens because of the capacitive coupling between the H to G and G to N where G wants to be about 60 VAC.
 
P

Peter Macalua

Your analysis is spot on. Use an isolation transformer before your charger.This should solve your problem and you can take your flight, I guess to the airport. Good luck.
 
It seems as though you have a ground loop.

Take your multimeter and on Ohms measure from your Cat 5 grounding pair to the ground of an electrical outlet. It should be open circuit.
The ground wires should only be grounded at one spot.
 
Top