PDA

View Full Version : RS232 - RS485 - DB9 - RJ45 Help!



jhartley
01-27-2011, 09:25 AM
I am going to be placing my SS24 board about 70' from the controlling computer. I purchased an RS232 > RS485 connector to send the signal. I also purchased a DB9 > RJ45 connector so I do not have to wire the Cat5 straight into the RS485 screw connectors. The setup will looks like this when completed. http://www.c3inet.com/PICProgrammer/DSCN1799.JPG. I have searched and searched for the correct pinout for this scenario, but I am completely confused. I did find an image on Kevin Cook’s site showing one possible solution… http://www.c3inet.com/PICProgrammer/DSCN1797.JPG. If anyone has done this setup and has any suggestions, I would appreciate the input.

kychristmas
01-27-2011, 10:02 AM
I use a Moxa card with those DB9-to-RJ45 adaptors. Here's what I believe is the pinout. I'm not sure why Kevin's doesn't show any ground connections. Its possible it works, but just doesn't provide the best signal. I actually remember cutting one of the wires do I could tie the GND to 2 pins.

Here's what I found in my notes. If needed, I can verify when I get home. Someone helped me out and sent me a couple of them when I started. I would be happy to mail you one of my ones that I know works.

DB9-------------------RJ45
P7 485- ----------- 4
P2 485+ ------------ 5
P3 GND ----------- 1
P3 GND ----------- 2

jhartley
01-27-2011, 05:20 PM
Yep... still a bit lost. I am not sure what a Moxa card is, does it give you more RS232 ports? [EDIT] I see a reference to a Moxa board on Kevin Cooks site as well [EDIT] The pinout diagram you listed, will that work going from the RS485/DB9 to RJ485?

Thanks,
Jon

Wayne J
01-27-2011, 05:34 PM
Do you have the pinout (or a downloadable instruction sheet) of your converters? Need to know what each pin is, so you can wire it correctly.

jhartley
01-27-2011, 08:03 PM
There's not much documentation, but here is what I found for the DB9 > RJ45:

Pinouts:
1-Blue
2-Orange
3-Black
4-Red
5-Green
6-Yellow
7-Brown
8-White

http://www.cablewholesale.com/specs/db9-to-rj45/31d1-1720bk.htm

For the RS232 > 485
http://www.dealextreme.com/p/rs232-to-rs485-converter-6040

Thanks again!

Wayne J
01-27-2011, 08:33 PM
Not much help. Can you look at the adapter, and list what pin number the D+, the D-, and the GND are on the 9 pin connector? If you look inside it, very small, it will have them numbered.

kychristmas
01-27-2011, 08:42 PM
Not much help. Can you look at the adapter, and list what pin number the D+, the D-, and the GND are on the 9 pin connector? If you look inside it, very small, it will have them numbered.

From my Industrial Automation customers last year, I was told that all RS485 DB9 are the same. I was assuming that his 232 -> 485 DB9 would have the same pinouts as any RS-485 9pin D connector. No? Maybe it was a bad assumption.

Edit: The info provided was incorrect. As it turns out, my notes were wrong and the the 9 Pin connector on my RS-485 ports are:

1: Data-
2: Data+
5: Gnd

You may want to verify these as Wayne suggested.

kipk12
01-27-2011, 10:23 PM
So, I've found that a DB-9 used for RS-422 or RS-485 can have several pinouts. Many of the converters will use their own pinout. But there are some more standard ones. National Instruments makes a lot of hardware with their standard pinout in this chart (http://www.ni.com/pdf/manuals/371253a.pdf)

And there is a "standard" that is commonly used for security cameras sometimes referenced as the SMPTE standard. http://www.antona.com/tblsmpte.htm

Good luck, different pinouts can be really annoying when you have a lot of different converters laying around.


From my Industrial Automation customers last year, I was told that all RS485 DB9 are the same. I was assuming that his 232 -> 485 DB9 would have the same pinouts as any RS-485 9pin D connector. No? Maybe it was a bad assumption.

Don't worry about the Moxa, I was just stating what kind of RS-485 setup I had. It provides for RS-485 ports with 9-Pin D connectors.

Based on your adator colors and my interpretation of the pinouts...

In the adaptor, keeping one of the pins usable, I wired the Blue and Orange together and put the it in the 3 hole on the D-connector.
Put the Red Pin in the 7 hole on the D-connector
Put the Green Pin in the 2 hole on the D-connector

I actually cut the other wires, but you may want to wait on that. I am also not sure whether it necessary to tie both grounds together, but I did it as diagrammed and it worked. I had also located a nifty little Pin Remover tool, that gave me the confidence.

Of course, if you can verify that D-,D+ and the Grn pinouts on your Converter as Wayne suggested, then that would be best.

jhartley
02-13-2011, 11:33 AM
After much searching, I was able to locate the online user's guide for the RS232/RS485 adapter I have. http://www.ram-e-shop.com/ds/general/STM485.pdf. Unfortunately I am still a little lost on how to wire my DB9/RJ45 plug.

Any Help would be appreciated.

Jon

kychristmas
02-13-2011, 12:11 PM
OK, well it looks like your adaptor is the same as my RS-485 pinout.

D-Pin 1 goes to pin 4 of RJ45 (So place Red wire in the Pin 2 hole)
D-Pin 2 goes to ping 5 of RJ45 (So place Green wire in the Pin 2 hole)
D-Pin 5 goest to both 1 and 2 of RJ45 (So wire Blue and Orange together preserving the Pin on one of them and place in the Pin 5 hole)


Edit: I fixed the pin number above. Man, I am terrible at the data quality!

RavingLunatic
02-13-2011, 12:46 PM
From the SS series wikis (recently updated):

Data cable for Renard SS board hookup using a RS232->RS485 or a USB->RS485 converter

Due to the many different types of RS232->RS485 and USB->RS485 converters available, the drawing only refers to the signals coming from the converter. Check the documentation for your converter to figure out how/where to hook up the correct wires.

http://www.doityourselfchristmas.com/wiki/images/thumb/b/b4/Wiki_-_Renard_SS_RS485_Data_Cable.jpg/350px-Wiki_-_Renard_SS_RS485_Data_Cable.jpg (http://www.doityourselfchristmas.com/wiki/index.php?title=File:Wiki_-_Renard_SS_RS485_Data_Cable.jpg)

Converter signal RS485(-)/T-/D-/B/485- connects to RJ45-pin 4 (blue CAT5 wire)
Converter signal RS485(+)/T+/D+/A/485+ connects to RJ45-pin 5 (blue/white CAT5 wire)
Converter GND signal connects to RJ45-pins 1 & 2 (orange and orange/white CAT5 wires)

An example is shown here with the HXSP-2108F Adapter Hook-up (http://www.doityourselfchristmas.com/wiki/images/1/15/Wiki_-_HXSP-2108F_adapter.jpg)
From your documentation:

9752

Just match up the signals.

kychristmas
02-13-2011, 03:53 PM
I was giving him the colors from his DB9-Rj45 converter/adapter.


From the SS series wikis (recently updated):

Data cable for Renard SS board hookup using a RS232->RS485 or a USB->RS485 converter

Due to the many different types of RS232->RS485 and USB->RS485 converters available, the drawing only refers to the signals coming from the converter. Check the documentation for your converter to figure out how/where to hook up the correct wires.

http://www.doityourselfchristmas.com/wiki/images/thumb/b/b4/Wiki_-_Renard_SS_RS485_Data_Cable.jpg/350px-Wiki_-_Renard_SS_RS485_Data_Cable.jpg (http://www.doityourselfchristmas.com/wiki/index.php?title=File:Wiki_-_Renard_SS_RS485_Data_Cable.jpg)

Converter signal RS485(-)/T-/D-/B/485- connects to RJ45-pin 4 (blue CAT5 wire)
Converter signal RS485(+)/T+/D+/A/485+ connects to RJ45-pin 5 (blue/white CAT5 wire)
Converter GND signal connects to RJ45-pins 1 & 2 (orange and orange/white CAT5 wires)

An example is shown here with the HXSP-2108F Adapter Hook-up (http://www.doityourselfchristmas.com/wiki/images/1/15/Wiki_-_HXSP-2108F_adapter.jpg)
From your documentation:

9752

Just match up the signals.

jhartley
02-13-2011, 03:59 PM
Thanks a ton! I could not have asked for more!