Author Topic: RS232 Connection  (Read 3451 times)

0 Members and 1 Guest are viewing this topic.

Offline MomchiloTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: de
RS232 Connection
« on: February 08, 2020, 11:15:07 pm »
Hello,
I'm trying to connect my PC to a multimeter (Gossen Metratop 53) via a RS232 interface.
I'm using a generic COM port of my mainboard with an 1:1 pinout cable to the multimeter. The device has a female DB9 connector.
So there shouldn't be any problem with a direct connection without a null-modem cable or a crossover cable, right?
In the manual of the multimeter the pinout isn't mentioned (pdf manual).
I already tried the connections in the picture:

.

There isn't any response at all. The status of the input lines of the connection are seen in the attached picture.

If I'm using an USB-RS232 adapter cable, at least I can receive some data from the meter (IDN after every change in the interface option), but I can't send anything because the adapter outputs only TTL voltages.
Obviously the baud rate, parity, number of data bits and stop bits are for both devices the same (19200, N, 8, 1).

Do you have an idea what could be wrong? Because I'm quite sure I'm doing something wrong.
Thanks for your help.

Best regards
Momchilo
« Last Edit: February 08, 2020, 11:29:57 pm by Momchilo »
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: RS232 Connection
« Reply #1 on: February 08, 2020, 11:37:36 pm »
The connections you say you've already tried ARE crossover cables (or null-modems, the terms mean the same thing in this case).
Have you actually tried a direct connection, where pins 1-9 map directly to pins 1-9? That would be correct for a DCE-DTE connection.
 
The following users thanked this post: Momchilo

Offline ferdieCX

  • Regular Contributor
  • *
  • Posts: 215
  • Country: uy
Re: RS232 Connection
« Reply #2 on: February 08, 2020, 11:44:26 pm »
Usually   DTR --> DSR and DCD of the other device
See for example: https://www.lammertbies.nl/comm/info/rs-232-null-modem

You don't know the pinout of the multimeter, but you can check which pin is ground and then measure the other pins against it.
This way, at least you can guess which ones are inputs and which ones are outputs
 
The following users thanked this post: Momchilo

Offline MomchiloTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: de
Re: RS232 Connection
« Reply #3 on: February 09, 2020, 12:36:28 am »
The connections you say you've already tried ARE crossover cables (or null-modems, the terms mean the same thing in this case).
Have you actually tried a direct connection, where pins 1-9 map directly to pins 1-9? That would be correct for a DCE-DTE connection.
Sorry, yes. I have a RS232 cable with 1:1 pin mapping. I used this without anything between the PC and the meter. But then I can't get a connection.
After this I tried the other two mentioned methods without success.

After some more investigation there is something strange. I tried a simple echo test on the PC output with shorting Pin 2 and 3 at the end of the cable. No data were received. So I probed the pins with a scope. Pin 2 transmitted the data, should be pin 3. Then I shorted pin 2 with one pin after another and looked for receiving data. So I figured out pin 2 is TXD and pin 6 must be RXD. This is what I get directly at the COM port from the PC, because of the 1:1 mapping of the cable (measured).
Whats going on? I will investigate further, because this shouldn't be the case.
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: RS232 Connection
« Reply #4 on: February 09, 2020, 12:46:15 am »
On a DCE (PC), TX is pin 2.  Pin 6 does not make sense for RX... How are you counting the pin numbers on the DE9 connector?
« Last Edit: February 09, 2020, 01:00:35 am by TK »
 
The following users thanked this post: Momchilo

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: RS232 Connection
« Reply #5 on: February 09, 2020, 01:20:02 am »
On the PC, are you going from an existing back panel connector, or from the IDC-10 connector on the motherboard? If the latter, I'd dig out your motherboard manual (on-line if necessary) and check the pin-out for that connector. Not everyone used the same standard, sadly.
 
The following users thanked this post: Momchilo

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9964
  • Country: us
Re: RS232 Connection
« Reply #6 on: February 09, 2020, 01:30:13 am »
There is a problem, from time to time, with the concept of TX and RX.  You would think that TX always transmits but some equipment means "hey, I want to connect my TX (which will receive) to your TX".  It's truly a PITA.

The other problem is voltage levels.  If you are transmitting at TTL levels (0-5V) you can't interface with RS232 which could be +12 .. -12V and, worse, it's upside down.

You have the right idea, check for which pin transmits on your PC and which pin transmits on your DMM.  I would ignore the other leads, it is doubtful tht they are even used.  I would get pins 2,3 and 5 straightened out first (DB9 pinout).  I don't know what to say about you voltage levels.

https://www.stratusengineering.com/rs232-9-pin-pinout/

Measure the actual voltage swings before deciding you need to invert.  Ordinarily, RS232 idles low while TTL idles high

https://www.sparkfun.com/tutorials/215

Once you find out how the voltages shake out and you find out how to connect pins 2 & 3 on both ends, you will know whether you need a crossover or straight cable.

This serial stuff is always a challenge.
 
The following users thanked this post: Momchilo

Offline MomchiloTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: de
Re: RS232 Connection
« Reply #7 on: February 09, 2020, 01:43:36 am »
On a DCE (PC), TX is pin 2.  Pin 6 does not make sense for RX... How are you counting the pin numbers on the DE9 connector?
I counted like this (male - right side):



For the measurements I simply used the printed numbers next to each pin in the connector to not make any counting mistake.
But I figured out the problem. The stupid connector between the mainboard and the PCI-slot in the PC is different/wrong.
You can see the pinout in the attached pic. So it's not RS232 compatible, I don't know what this is.
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: RS232 Connection
« Reply #8 on: February 09, 2020, 07:05:07 am »
RS-232 doesn't specify connector pin-outs, just the signals.
And that is one of the two most common header pinouts for serial ports. You've just got the wrong add-on cable.

What you currently have is like this: https://www.pccables.com/Products/07121.html  Can also be found with a ribbon-style DB9.

What you need to buy or make is this: https://www.pccables.com/Products/07120.html

That site has good data and pictures of how it's assembled. You can buy from wherever. Include "Everex" as a key word if you search for other sources.

If the one you have has a solder-type DB9 on one end, and you can do basic soldering, you can rework it yourself to be the other configuration.

 
The following users thanked this post: Ian.M, Momchilo

Offline MomchiloTopic starter

  • Regular Contributor
  • *
  • Posts: 122
  • Country: de
Re: RS232 Connection
« Reply #9 on: February 09, 2020, 01:16:00 pm »
If the one you have has a solder-type DB9 on one end, and you can do basic soldering, you can rework it yourself to be the other configuration.
After I noticed the different pinout I resoldered the wires on the DB9 connector and now everything works fine. I didn't think there could be any difference.

Many thanks to all of you.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf