Author Topic: RS485 Comms - Strange Problem  (Read 3408 times)

0 Members and 1 Guest are viewing this topic.

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: za
    • ShoutingElectronics.com
RS485 Comms - Strange Problem
« on: January 28, 2015, 07:57:51 pm »
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 display

The 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 Temp

But 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?

Thanks
Peter
« Last Edit: January 30, 2015, 06:10:46 pm by kolbep »
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2849
  • Country: au
Re: RS485 Comms - Strange Problem151
« Reply #1 on: January 28, 2015, 08:58:17 pm »
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.
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: RS485 Comms - Strange Problem151
« Reply #2 on: January 28, 2015, 09:53:11 pm »
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 out each pair of the rx & tx the 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...]
« Last Edit: January 28, 2015, 10:17:23 pm by LabSpokane »
 

Offline RJFreeman

  • Regular Contributor
  • *
  • Posts: 207
  • Country: au
    • Australian Technical Production Services
Re: RS485 Comms - Strange Problem151
« Reply #3 on: January 29, 2015, 04:25:55 am »
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.

Quote
But 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.

This 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....
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22200
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: RS485 Comms - Strange Problem151
« Reply #4 on: January 29, 2015, 05:43:24 am »
Any new noise sources in the area?  Do the com channels have isolated receivers, or do they require a common ground?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: za
    • ShoutingElectronics.com
Re: RS485 Comms - Strange Problem151
« Reply #5 on: January 29, 2015, 01:17:52 pm »
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 input

P
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline kolbepTopic starter

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: za
    • ShoutingElectronics.com
Re: RS485 Comms - Strange Problem - SOLVED
« Reply #6 on: January 30, 2015, 06:11:33 pm »
Put the system back in today. It is working fine.
Pics are here :
http://plus.org.za/?p=20
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf