03-13-2025 09:15 AM
Hi all,
I have a cabling question about RS-485H for you all. I have a device that has this pinout:
Pin 5 = GND
Pin 6 = RS485-
Pin 7 = RS485+
And my serial port (actually on a Serial-to-Ethernet box) has this pinout:
Pin 3 = RS485+
Pin 4 = RS485-
Pin 5 = GND
The pins don't match. Anybody know of a cable I can buy to make this connection? The answer is probably "you gotta build your own custom cable", but I am hoping to avoid that. I'm not a hardware guy. I don't want to be stripping and soldering wires. Looking for tips on any prebuilt cables or kits I can use to easily make this connection.
Also: No, there is no way to change the pinouts via software or dip switches. They are fixed.
03-13-2025 09:26 AM
Sorry forgot to specify it is a DB9 connector on both sides, if that wasn't clear.
03-13-2025 09:42 AM - edited 03-13-2025 09:47 AM
You already know the answer...
But RS-485 uses a twisted pair the ground is just for a shield that I have never found necessary.
So the easiest way to make your cable without soldering would be to use something like these DB9 to RJ45 adaptors and Ethernet cable.
03-13-2025 09:51 AM
There are also connector with terminal blocks, something like this.
But I would use them only for testing.
03-13-2025 11:07 AM
Thanks! Those are good ideas.
But what about termination resistors? I'm reading lots of conflicting opinions on this. And I see that NI says I should include one. I don't think I could fit a termination resistor into a DB9-RJ45 adapter. So I guess my best option is a shielded breakout connector like this one. I could squeeze a resistor in there:
03-13-2025 12:38 PM
I think it depends on how big your 485 network is before termination resistors become important. I don't recall if I have ever had to install one.
03-13-2025 02:46 PM
@josborne wrote:
Thanks! Those are good ideas.
But what about termination resistors? I'm reading lots of conflicting opinions on this. And I see that NI says I should include one. I don't think I could fit a termination resistor into a DB9-RJ45 adapter. So I guess my best option is a shielded breakout connector like this one. I could squeeze a resistor in there:
As a hardware guy that has stretched RS485 to it's physical and bandwidth limits I can say that if it works without a termination resistor (and it might) then you don't need one ; )
03-14-2025 02:09 AM
Resistors are not needed in most cases. Very long cables and (relatively) high baud rates may require them. For sure not on a workbench test.
03-14-2025 03:30 AM
@josborne wrote:
Thanks! Those are good ideas.
But what about termination resistors? I'm reading lots of conflicting opinions on this. And I see that NI says I should include one. I don't think I could fit a termination resistor into a DB9-RJ45 adapter. So I guess my best option is a shielded breakout connector like this one. I could squeeze a resistor in there:
As usual, there is not one single right answer. Some RS485 hardware has a built in termination that can be switched off, sometimes in software, sometimes through a DIP switch somewhere. If none of the devices has such a resistor, you can sometimes get away without any if the cable is very short, such as a test setup on your table.
But! You are working entirely outside of the actual specification of the RS-485 (and RS-422) standard and I would never ever consider such a setup for a permanent industrial setup. It's simply not worth it. Hardware may initially seem to work fine, but it will physically age and at some point start to have intermittent communication errors and eventually cease to work at all. Possible reasons are manifold:
- Natural aging of the hardware
- Change of wiring in your setup of other parts that influence the earth or ground design
- Introduction of new parts that can cause electromagnetic influences that disturb the unbalanced signals on the wire
- Operating of the RS-485/422 drivers outside of their designed mode can slowly degrade the performance until they start to work unreliably
So for your quick and dirty test setup on your table: If it works it works!
For a permanent installation in a test system on the factory floor: Don't do it ever under any circumstances!
03-14-2025 01:46 PM
I've used a custom cable service before for something similar. I recall the pricing being pretty reasonable, ~$30 for a one-off cable.
https://www.cablesforless.com/custom-db9-cable-9-pin-serial-or-null/