RS232 Connection - Page 1
Forum section: electronics / beginners

author: Momchilo
author_rank: Regular Contributor
timestamp: February 08, 2020, 11:15:07 pm
content: 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 regardsMomchilo

author: Nusa
author_rank: Super Contributor
timestamp: February 08, 2020, 11:37:36 pm
content: 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.

author: ferdieCX
author_rank: Regular Contributor
timestamp: February 08, 2020, 11:44:26 pm
content: Usually DTR --> DSR and DCD of the other deviceSee for example:https://www.lammertbies.nl/comm/info/rs-232-null-modemYou 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

author: Momchilo
author_rank: Regular Contributor
timestamp: February 09, 2020, 12:36:28 am
content: Quote from: Nusa on February 08, 2020, 11:37:36 pmSorry, 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.

author: TK
author_rank: Super Contributor
timestamp: February 09, 2020, 12:46:15 am
content: 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?

author: Nusa
author_rank: Super Contributor
timestamp: February 09, 2020, 01:20:02 am
content: 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.

author: rstofer
author_rank: Super Contributor
timestamp: February 09, 2020, 01:30:13 am
content: 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 highhttps://www.sparkfun.com/tutorials/215Once 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.

author: Momchilo
author_rank: Regular Contributor
timestamp: February 09, 2020, 01:43:36 am
content: Quote from: TK on February 09, 2020, 12:46:15 amI 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.

author: Nusa
author_rank: Super Contributor
timestamp: February 09, 2020, 07:05:07 am
content: 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.htmlCan also be found with a ribbon-style DB9.What you need to buy or make is this:https://www.pccables.com/Products/07120.htmlThat 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.

author: Momchilo
author_rank: Regular Contributor
timestamp: February 09, 2020, 01:16:00 pm
content: Quote from: Nusa on February 09, 2020, 07:05:07 amAfter 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.