RS485 Comms - Strange Problem - Page 1
Forum section: electronics / repair

author: kolbep
author_rank: Frequent Contributor
timestamp: January 28, 2015, 07:57:51 pm
content: Good Day,I am trying to repair an Irrigation Sensor system that consists of a controller, Humidity/Temp Sensor, and a Daylight Sensor.The system has been working fine for years communicating and powering through a 4 core .5mm Captyre cable, but now just started to show ERROR on the displayThe 3 Modules communicate over RS485 using the SN75176BP transceivers.There is a 120 ohm termination resistor in the Controller, and in the Daylight Sensor.The Controller Polls the sensors, and then they respond with their data.If I connect the 3 units together with short wires (less than 20CM each), it works fine. The controller shows me the Light Level, Humidity and TempBut as soon as I extend the wire going to the Light Sensor (Using the Captyre Cable that they have always used, and have also tried Cat6 Ethernet Cable), then the controller no longer can read any of the sensors, it gives ERROR for the Temp/Humidity and ERROR for the light level.Then what I tried is leaving the long cable in place, and using a 10cm jumper, to jumper across the +12v, and the GND, as well as the A and B Lines. As soon as I jumper the one specific Data Line, then it is happy, and the whole system works. If I instead jumper the other Data line, then it does not work.So something is making it so that it will not work unless that specific line is short (but it is a differential signal, so I cannot figure out what would cause this).Even if I disconnect the Temp/Humidity Sensor and just have the Controller connected through the 20m cable to the daylight sensor, it still does not work without jumpering that data line.I have already replaced the caps on the modules, as well as swapping the SN75176 chips around, but no joy.Has anybody come across something like this before, and where should I go from here?ThanksPeter

author: David_AVD
author_rank: Super Contributor
timestamp: January 28, 2015, 08:58:17 pm
content: When you say "swapping the SN75176 chips around", did you replace them? They are cheap so I'd simply replace them all if I suspected one of them was bad.The other thing to check is continuity of the RS485 data lines on the boards themselves. A break in either can see it work with reduced reliability.

author: LabSpokane
author_rank: Super Contributor
timestamp: January 28, 2015, 09:53:11 pm
content: Can you post a sketch of your system and show where the terminations are? Please show where your jumpers are as well.Also, have you tried ohming outeach pair of the rx & txthe A&B lines and making sure you don't have a break in the line? Just twist the pair at one end together and have someone shake the cable to see if you have a break in there.When you say the same cable do you mean the same type or the same piece of cable that's been used since day 1?[oops. just realized your system is 1/2 duplex... and your xceiver is rated for Cat5e. Damn I'm old...]

author: RJFreeman
author_rank: Regular Contributor
timestamp: January 29, 2015, 04:25:55 am
content: as per Labspokane suggestion, I would start by testing the cable, you should see the 120 ohm termination resistor at the far end and then repeat test the other way.QuoteThis could be a faulty termination resistor at one end, short runs will usually work even without being terminated, but longer runs will suffer from reflections from the ends of the bus.You could always put a dual trace CRO across the data pair - if you sum the channels with one channel inverted, this will show you what the waveforms look like.I used to trouble shoot RS485 buses for Eftpos machines, cabling faults were most common (including faulty termination resistors - which were usually in the terminal box at each end of the bus) followed by stations locking up the bus by transmitting when they were meant to be in high impedance.Of course one fault that is stuck in my memory was after someone broke into a pub, went past a pallet load of booze in the back room, ignored the $50 float in the till and decided to steal the Eftpos machine by picking it up and and taking it with them (without unplugging anything) until they had ripped the cables off the wall.....I can only presume they did not understand the difference between an Eftpos machine and an ATM and thought the Eftpos machine contained money....

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 29, 2015, 05:43:24 am
content: Any new noise sources in the area? Do the com channels have isolated receivers, or do they require a common ground?Tim

author: kolbep
author_rank: Frequent Contributor
timestamp: January 29, 2015, 01:17:52 pm
content: Thanks for all the suggestions.I just swapped the RS485 Transceivers between the modules. But that did not help.Then I grabbed a MAX485 Slew-Rate Limited Transceiver out of my DMX Light Dimmer, and popped that in place of the Transceiver on the Light Sensor (they are pinout and voltage similar), and that worked great.I scoped the data, and it is not as high speed as DMX (which I am used to), I could actually see the individual bits on a 20Mhz Analogue Scope. So their data rate is not too high anyway.So it is all sorted now.Next is to go back to the farm tomorrow and reinstall it.Thanks for the inputP

author: kolbep
author_rank: Frequent Contributor
timestamp: January 30, 2015, 06:11:33 pm
content: Put the system back in today. It is working fine.Pics are here :http://plus.org.za/?p=20