serial comm noise problem

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

serial comm noise problem

Post by philba » Thu Mar 10, 2005 4:50 pm

I have several serial connections (rs-232) that run for more than 100 feet and happen to run near a number of motors and AC wiring. Not a very good plan but I'm stuck with it. For the most part there are no problems. However at certain times of year when there is more motor activity (its part of the heating system), I am seeing problems that I'm pretty sure are related to communications errors.<p>The serial wiring is cat5. I believe that rs485 might be more immune to electrical noise. I could put rs232 to rs485 duplex transceivers on each end of the cat 5 cables. I've done a fair amount of reading on 485 and it should work but frankly, the more I read, the more confusing it appears. There seems to be a lot of conflicting statements out there.<p>I'm only planning to use this as a point to point replacement for rs232. No multidrop and so on. If I go with full duplex (one pair each for Tx and Rx), I think it should be ok. I dont need to deal with RTS switching and that sort of thing. right?<p>So, anyone who knows about this stuff have an opinion about what I'm thinking of doing? <p>Phil

User avatar
dr_when
Posts: 208
Joined: Thu Oct 28, 2004 1:01 am
Location: Milwaukee
Contact:

Re: serial comm noise problem

Post by dr_when » Thu Mar 10, 2005 5:01 pm

Philba,<p>I have used 485 and 422 in long run industrial networks consisting of LED signs with no problem. You should not have to do any switching. I have used both discrete 485/422 driver IC's (NS) and off the shelf rs232-485 adapters with no trouble (like those from b-b electronics $$$$).<p>Bob
"Who is John Galt?"

Mike6158
Posts: 409
Joined: Fri Nov 12, 2004 1:01 am
Location: Weimar, Texas
Contact:

Re: serial comm noise problem

Post by Mike6158 » Thu Mar 10, 2005 5:39 pm

Serial is the primary mode of communication that we use at work. Rather than get into what we have and what we do (a lot) I'll keep it simple. <p>You've diagnosed your problem correctly in my opinion. Converting to RS485 ahould solve the problem. I'm not real excited about using CAT 5 cable. We use a shielded twisted pair and ground the shield on one end. As long as you use a twisted pair in the CAT5 I guess it will be ok but the electrical noise concerns me. The distance that you mentioned isn't anywhere near long enough to have to worry about termination resistance so that's cool.<p>Multi-dropping 485 is no hill for a stepper. We do it all of the time.<p>B&B Electronics puts out a real good App Note on RS422 and RS485. If I remember correctly it can be downloaded from their website as a PDF file. They also sell good serial hardware.
"If the nucleus of a sodium atom were the size of a golf ball, the outermost electrons would lie 2 miles away. Atoms, like galaxies, are cathedrals of cavernous space. Matter is energy."

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: serial comm noise problem

Post by philba » Thu Mar 10, 2005 7:14 pm

Thanks, guys. That's most helpful. <p>One other question is about grounding. I have 3 systems - a lighting control system (lutron), a home automation system (crestron) and a serial hub. The hub and the crestron communicate with the lutron. The serial hub and the lutron clearly share the same ground but the crestron is 2 floors away and I honestly don't know the ground situation. How do I go about testing the ground? <p>The hub and the lutron are about 100' (as the wire runs) apart while the lutron and the crestron are 150' apart. The guys who installed the lutron claim its my hub that causing the problem but I think its the crestron because of the longer run. The crestron cable comes down a shaft and runs next to the hub cable so the longer cable is the more likely culprit. right? I'm not sure how one diagnoses these kind of problems. any thoughts?<p>Finally, I've looked at the chipsets for rs-485 and it actually looks pretty easy to build. rs-485 transceiver and an rs232 driver (max232+max488) should work just fine. how important is galvanic isolation?

bill_s
Posts: 5
Joined: Tue Mar 01, 2005 1:01 am
Location: mpls, MN
Contact:

Re: serial comm noise problem

Post by bill_s » Fri Mar 11, 2005 7:39 am

Put a scope between the grounds on your separate floors and you will get an idea of the common-mode noise you have to deal with. This noise will be complicated by any multiple tying of neutral with ground in your building, which may give you extra-big spikes when heavy loads are started.<p>But the biggie is the rare event where there is a fault between a power bus and the ground. Can your setup withstand a 678 volt spike, if you have 480 volt distribution?

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: serial comm noise problem

Post by philba » Fri Mar 11, 2005 8:38 am

Its in my house and I have residential 220 VAC service. Should I expect 678V spikes? Or should it be more like 300+? <p>I think a better description is in order. The systems are 3 years old. Most of the gear is in my basement. My systems closet (servers, phone, video, security, card reader, network switch, cable modem and serial hub) is in one corner of the basement. In the far corner is the lighting system snd electrical distribution panels. In between is the heating system which consists of a fresh air fan and 10 1/2 HP pumps as well as a furnace. During the winter the pumps are more active and are, I theorize, the source of my electrical noise. The wiring between the systems closet and lighting system basically runs over the heating system. The home automation system is on the second floor in a "media" closet. The wiring for that runs up into the attic and then down a shaft that exits in the systems closet in the basement.<p>So, are you saying I should run a wire from the upstairs ground down to the basement to then look at the difference between that and the basement ground on a scope? How do I set that up?

redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Re: serial comm noise problem

Post by redrocker » Sat Mar 12, 2005 8:02 am

Since this is the coolest topic I have seen on this board since NE5U's industrial problem, I mainly want to give it a bump.<p>I think, however, it is important to separate out the issues into parts so as to attack the problem in an orderly way.<p>1. How do you compare ground points in physically distant locations? I don't know, but if a grounding issue does exist, it is as likely to be a difference in voltage potentials as it is noise, which means the connected systems are not operating from the same reference.<p>2. If a grounding issue does exist, how do you handle it? I don't know, but galvanic isolation is one possible solution. I would absolutely go with B&B's galvanically-isolated product line if you do find this to be an issue. I think it is cooler to identify, diagnose, and solve a systems problem than to reinvent the wheel from an appnote that tells you exactly how to build the circuit anyway!

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: serial comm noise problem

Post by philba » Sat Mar 12, 2005 10:38 am

Thanks. I 1000% agree that its best to diagnose and then fix. However, I don't see at all how to 100% diagnose this problem (I see you don't either!). Going on the basis of informed guesswork is second best and if a potential solution doesn't cost a lot, I'll try it. Hopefully you industrial electrician guys will help steer me in the right direction. Building the circuit is secondary to a decision to use converters - either I'd buy a pair (actually 4) or build them.<p>I am open to suggestions of how to prove the source of the noise on the rs232 line. Note that this is an infrequent transient problem so I'd need some sort of capture mechanism. It happens a few times a year and a couple of times a day during that period. I should mention, I tried forcing the heating pumps on and did not see the problem so its more complex than just running some motors.

redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Re: serial comm noise problem

Post by redrocker » Sat Mar 12, 2005 12:02 pm

I am peeved at myself for my earlier post because I did exactly what I did not want to - fall into the honey trap of tunnel vision. I had intended to separate the issues, but instead I conflated them.<p>1. The issue of comparing physically distant points is an issue unto itself and I am interested in knowing how to do that. However, it is speculation that grounding is an issue in this problem. The system works properly most of the time, but you have intermittent faults. Since poor grounding is so often the cause of mysterious problems, it would be nice to characterize the ground, but not essential.<p>2. What we know is this: RS-232 is intended for short runs and you are using relatively long runs; you have an occassional problem; your cable is unshielded.<p>The question then becomes: what is the easiest and cheapest way of troubleshooting the problem? My first inclination would be to re-route the cable away from the fans, but you might have to invest a good bit of money in a longer cable, and the labor component might be significant. So that's a bad option (unless you want the spare cable). You should go with your gut and get the B&B devices. They would actually rectify an improper situation - RS-232 and long runs - and be easy to install.

bill_s
Posts: 5
Joined: Tue Mar 01, 2005 1:01 am
Location: mpls, MN
Contact:

Re: serial comm noise problem

Post by bill_s » Sat Mar 12, 2005 1:39 pm

A couple things. The RS232 spec allows a +- 3 volt noise band, and is supposed to have this much hysteresis built into the receivers, but there are some non-standard implementations out there, where the receiver is just a TTL or CMOS gate. OK for across the desk, but suspect for long runs. If your 232 swings +/- 12 volts, it wouldn't be too hard to put a circuit ahead of the receivers that would ignore +/- 11 V noise.<p>Back in the day, I have set up business systems with RS232 running all over a building, without problems, and with all ends referenced to frame ground. But - I have seen wiring jobs where loads are returned to ground instead of neutral. Its not hard to check for this with a DVM wired between the 2 grounds that your two ends are tied to. You shouldn't see any more than a few millivolts of noise as the various loads are switched on.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: serial comm noise problem

Post by philba » Sat Mar 12, 2005 1:41 pm

Go easy on yourself! Buy yourself a drink... Seriously, I saw nothing wrong with what you said - it was completely valid.<p>Yeah, I hear you on rerouting with shielded cables. Its the right solution. Without giving a lot of details, the current route is basically it. I'd have to make multiple holes in concrete and run wire in some pretty inaccessable spots. Not impossible, just a lot of work and pulling cables is one of my very least favorite activity. I could run shielded cable in the current chase though I'm hoping I can get away with out it. I am out of spec on the RS232 distance, shielded or not.<p>Phil

User avatar
Clyde Crashkop
Posts: 99
Joined: Fri Feb 06, 2004 1:01 am
Location: Florida
Contact:

Re: serial comm noise problem

Post by Clyde Crashkop » Sun Mar 13, 2005 9:29 am

I would check the outlets and even the breaker panel for good connections and proper wiring. I wouldn’t assume that the apprentice they sent to install your outlets even wired them right. I have seen some licensed electricians do some pretty shoddy work. I have worked at 2 marinas where it seemed the ground circuit to all the boats was an after thought and any ground they got was purely accidental. Such as the ground wire on 240 volt outlets on the screw that holds the outlet in its box. But that screw wasn’t tight because it would pull the outlet too deep into the box. Also the hot and neutral wires were swapped on some 120V outlets, but this happens so often that some boats have alarms to indicate it.
You might check for voltage or resistance from grounds to your household plumbing and maybe even run an auxiliary wire between them. That is a good ground isn’t it? And maybe massive enough to soak up some RF.
Another thought, not that I know what I’m talking about. Would it matter if some of your units were on opposite legs of your 240 V house service? That would be easy enough to check in your breaker panel.
Dave

rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: serial comm noise problem

Post by rshayes » Sun Mar 13, 2005 9:48 am

Ground is not not necessarily ground. At radio frequencies, two points six inches apart can be several volts different in potential. It depends on the frequency, current, and resistance or inductance of the connection between the two points. It isn't very easy to keep two points 100 feet apart at the same potential.<p>You can get some idea of the potential for noise by disconnecting the twisted pair form an RS-232 receiver and looking at the ground lead with an oscilloscope referenced to the local ground. I wouldn't be surprised to see several hundred millivolts to possibly volts between the two grounds.<p>If the data rate is slow enough, it might be possible to use a pair of the old 300 baud modems and send the signals over the twisted pair. These modems were designed for operation connected to a telephone line and they are usually transformer coupled.<p>Another possibility is to use optical isolators at one end of the line to provide galvanic isolation. Each side of the optical coupler can be referenced to a different ground (at least within a kilovolt or two).

User avatar
shillyard
Posts: 29
Joined: Mon Mar 14, 2005 1:01 am
Location: martinsburg wv
Contact:

Re: serial comm noise problem

Post by shillyard » Mon Mar 14, 2005 12:41 am

One thing to keep in mind is moisture. First thing i would do is make sure the cable is tied loosely.A lot of times the cables are stapled too tight to the walls.Pay more attition to areas where materials expand like wood. I deal with this type of problem alot.
If its not worth repairing its not worth buying.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: serial comm noise problem

Post by philba » Mon Mar 14, 2005 8:43 am

that makes sense. And my installers had a very heavy hand on the stapler. I'll take a look...

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests