Author Topic: Which Test Equipment for field RS485 "Debugging"  (Read 4857 times)

0 Members and 1 Guest are viewing this topic.

Offline dekra54Topic starter

  • Supporter
  • ****
  • Posts: 27
  • Country: de
Which Test Equipment for field RS485 "Debugging"
« on: January 24, 2017, 08:29:14 am »
Good morning from Germany :)

The question ist pretty much self explaining but anyway... :

I'm mainly doing Photovoltaik installations and repairs and last week I had to rapair a monitoring system from a big PV installation (20 inverters) which are connected with an RS485 bus. Narrowing down the fault to one faulty RS485 module was a pain in the.... and took me nearly 3 whole days since it seems kind of an intermittend fault  :(.
Over the weekend I was thinking of some tool (Beside a multimeter) that can help me finding similar faults because these are getteing prety time consuming and much more often with the age of the PV installations.  :scared:

I was thinking of an cheap 2 channel usb scope since i would have to buy it by my self.

Do you have other reccomendations ? :)

Grettings Dennis
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #1 on: January 24, 2017, 08:50:16 am »
We had quite some RS485 based stuff in my last company. Main failure root causes there were
- swapped signal lines
- bad termination (too few, too many)
- ground shift
- missing fail safe biasing

Especially the last two are not so obvious...

Ground shift should theoretically not be a problem because RS485 uses differential signaling. But the reality is that receivers have a certain common mode range limitation. EDIT: solution to that was to ONLY use opto-isolated RS485 components.

The fail safe circuit pulls the differential signal into a well defined IDLE state while all nodes are inactive. If you do not have this, the termination resistors will create 0V differential voltage. Most receivers have internal biasing and treat 0V as IDLE, but there is only a small margin of 100mV or so. Noise can easily feed into listening nodes, confusing them. Plus, the START bit transition can be missed. Many devices have this fail safe built in, but there are also modules that just do this. Make sure to only have one on each bus.

I used multimeter, oscilloscope (with differential probe, and UART decoding option), and a TDR to track down problems, never needed to have more. It always turned out being an electrical signaling problem.
We Are The Watt - Resistance Is Futile!
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6502
  • Country: de
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #2 on: January 24, 2017, 09:54:56 am »
Dedicated RS-485 analysers/testers are available, of course. E.g. this one:
http://www.moreneo.com/en/rs232-rs485-tools/iftools/msb-rs485-analyzer-p-69.html#!tab1

Still needs a laptop to drive it and view the data. But I would imagine that the "segment splitting" capability is helpful for tracking down the culprit in larger bus systems. Disclaimer: I have never used this!
 

Offline forrestc

  • Supporter
  • ****
  • Posts: 653
  • Country: us
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #3 on: January 24, 2017, 10:38:49 am »
I'm mainly doing Photovoltaik installations and repairs and last week I had to rapair a monitoring system from a big PV installation (20 inverters) which are connected with an RS485 bus. Narrowing down the fault to one faulty RS485 module was a pain in the.... and took me nearly 3 whole days since it seems kind of an intermittend fault  :(.
Over the weekend I was thinking of some tool (Beside a multimeter) that can help me finding similar faults because these are getteing prety time consuming and much more often with the age of the PV installations.  :scared:

I was thinking of an cheap 2 channel usb scope since i would have to buy it by my self.

If you're just troubleshooting the electrical properties of a RS-485 bus, a very slow oscilloscope will work nicely.   I used to do this type of troubleshooting with just an old 20Mhz analog scope.   You've got signals running in the Khz instead of Mhz so it's not going to be picky.

Generally you're going to want to probe A and B (tying the scope ground to the common terminal) and look at both to verify nice sharp edges and also that A goes low when B goes high.  The electrical specs for RS-422/485 are fairly easy to obtain.

So... pretty much any scope.  Old analog, slow digital, either should be fine.   

This is one of those rare cases that one of those little pocket handheld oscilloscopes that they sell on ebay might be fine - If I was doing field RS-485 work regularly and needed this type of troubleshooting, I think I at least investigate that option since they are inexpensive enough to be disposable, very portable, and run from battery.  The downside is that they all seem to roll off way more quickly than you would expect and have bugs you might find cause more grief than help, especially if you're running at high baud rates (instead of say 9600 or 19200).  I'm also not sure of your skillset - I have dealt enough with oscilloscopes and RS-485 to be able to tell the difference between a scope issue and a RS-485 problem.  If this isn't the case for you, then don't even consider this option since you're likely going to see oddities with these scopes.

There are a lot of other portable options out there which may also work for you.

In relation to other troubleshooting, unless you're familiar with the underlying protocols of whatever equipment you are running (I.E. modbus), then any additional data sniffing you might do is going to be of limited utility.  Generally you can look at the data on one of these buses with various PC based serial port monitoring tools and an appropriate RS-485 to USB adapter (maybe going to RS-232 first).   I have yet to find one which does much more than shows the raw data, or maybe splits it into packets.   I should qualify this with the fact that I write code which talks to RS-485 devices on a fairly regular basis for my day job - and would love to find a tool which correctly sniffs common industrial RS-485 busses and decodes them to show you what is going on.   Not to say this tool doesn't exist - I'm just saying if it does, my google-fu hasn't found it yet.




 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7390
  • Country: nl
  • Current job: ATEX product design
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #4 on: January 24, 2017, 10:49:33 am »
First, you should get a dual color two lead LED and a resistor. I'm not kidding. Just put it between A and B and you will see if there is a connection error.
Probably the second most useful part is an isolated RS485 transciever with USB interface. you can also build one yourself, its quite simple. Expose the D R T signals on a header, so you can attach an USB logic analyzer to it.
After this, there are several options, the sky is the limit.


 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #5 on: January 24, 2017, 11:43:47 am »
Dedicated RS-485 analysers/testers are available, of course. E.g. this one:
http://www.moreneo.com/en/rs232-rs485-tools/iftools/msb-rs485-analyzer-p-69.html#!tab1

Still needs a laptop to drive it and view the data. But I would imagine that the "segment splitting" capability is helpful for tracking down the culprit in larger bus systems. Disclaimer: I have never used this!
The segment splitting feature sounds good to me. When dealing with a bus with many devices you have to split it in smaller piece in order to find the trouble maker.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline dekra54Topic starter

  • Supporter
  • ****
  • Posts: 27
  • Country: de
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #6 on: January 24, 2017, 11:48:35 am »
Thank you for your suggestions so far :)  :-+

ebastler: I think an dedicated analyzer would be nice but is way overkill since the troubleshooting is more on the electrical side :) (But still might be an option if we decide to make our own datalogger and i have to look into the protocols itself)

forrestc: you're right ist mainly the electrical side. And Probing A and B with ground connected together and to the Bus was what I have thought of. I think i will try an USB scope and one of these cheapy handheld scopes (I really don't want something expensive cause the chance that i have to dig it out of the mud or it falls down something like 10m is pretty high  >:D ). Do you think 20Mhz is still enough for a 19200 baud rate ? Most of the inverters use slower baud rates but i know at least two which use 19200.

NANDBlog: Thanks i will look in my parts bin and try it (think should also work with 2 LEDs back to back ?) This would be a nice and simple tool for checking for a more "basic" fault   :-+
 

Offline forrestc

  • Supporter
  • ****
  • Posts: 653
  • Country: us
Re: Which Test Equipment for field RS485 "Debugging"
« Reply #7 on: January 25, 2017, 02:41:14 am »
Do you think 20Mhz is still enough for a 19200 baud rate ? Most of the inverters use slower baud rates but i know at least two which use 19200.

19200 is by definition 19.2khz, or 0.0192Mhz. But a square wave.  So you probably need something a bit higher bandwidth than 0.0192Mhz.  20Mhz is more than enough.  As long as it's really 20Mhz.    A used 20Mhz analog scope from a reputable supplier would be fine.  Some for pretty much any of the digital storage oscilloscopes out there from a supplier which actually makes test equipment (rigol, siglent, hantek, etc)

On the cheap handheld ones:  There are some of those handheld ones out there which are based on an audio DAC.   These may or may not be fast enough.  Some start to roll off around 20khz, just like audio does... This isn't going to work.  There are others which work up to around 200khz.  They *may* work.   Others run faster than that, which would be fast enough.

I found a video which seems perfect to show off what I'm talking about:  .   The DS203 Quad that he shows *should* be fast enough and *should* work.   Note that the waveform seems decent at 500khz... at 19.2Khz it should be very decent.  $150US or thereabouts on ebay it looks like...   But don't blame me if it's a piece of crap.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf