How do detect RS232 signals without interfering - Page 1
Forum section: electronics / projects

author: blackbit
author_rank: Contributor
timestamp: February 20, 2025, 05:00:18 pm
content: So...There are these RS232 breakout boxes.Besides giving you the ability to easily break signals or reroute them, you also get LED indicators for the (most common) signals.This is handy as a visual aid, it helps you to understand dataflow or the lack thereof.The LEDs are just inline with the signals, nice and simple. Most of the time it's bi-color LEDs for positive and negative voltages.Unfortunately, these LEDs cause a voltage drop that occasionally leads to problems.I've been thinking about options to avoid this, but have a hard time pinning down the 'right' approach.Here is what's going through my head:* Every form of detection logic will require some form of power supply. External is too inconvenient. Coin cell or perhaps 2xAA would be acceptable in terms of size and weight. Obviously that doesn't give a lot of horsepower for driving any kind of logic, but it should do.* We cannot rely on signal ground being on a particular pin of the DB25 connector. The contraption should work if whatever signal goes over it doesn't follow the RS232 standard. Just think about IEEE1284 for instance.* The objective is to distort the signals as little as possible (within reason)* The detection logic should be as simple as possible, but it's okay to spend the equivalent of a non-fastfood meal on a tool that will come in handy for hopefully decades.* Voltage differentials of around 20V should be within spec of the used components. I am aware that with a supply voltage of 1.5 or 3V that'll create a challenge with opamps, etc.* I am aware that it won't be possible to differentiate "side A pulling the signal negative" from "side B pulling the signal positive". That is simply a limitation we have to live with.* We're talking about 115k baud signals here, no high speed stuffSo, what would you do?I am simply not sure about the right approach.One opamp per signal? Referencing one of the inputs to the ground of the opamp through a resistor or similar doesn't feel right to me for some reason. Can it be avoided?Perhaps better use a special variant of an opamp like a differential amplifier? an instrumentation amplifier?Better use discrete components and build something like a long-tailed pair?Do something entirely different?

author: David Hess
author_rank: Super Contributor
timestamp: February 20, 2025, 05:25:26 pm
content: How complex do you want to get?For a maximum effort design, I would use a pair of comparators for each line with the thresholds of like -2 and +2 volts, so two LEDs show high, low, and not connected. The comparators could be line receivers, operational amplifiers, or differential transistor pairs.I have seen some designs where for power, a pair of diodes rectify each line to produce a positive and negative supply. Combined with low power comparators and low power LEDs, this could be better than just directly attaching LEDs.

author: blackbit
author_rank: Contributor
timestamp: February 20, 2025, 11:13:02 pm
content: Yes, that is roughly what I had in mind.What I didn't say in my original post is that I would hook up the inputs of (let's say) the opamp on the two sides of a shunt resistor so that I arrive at a voltage differential.As mentioned, I would prefer to have an external power source of some sort as stealing power from the signal lines disturbs them more than I would like.I am just not sure if it is feasible to utilize (e.g.) an opamp if the two inputs do not share a common reference with the opamp itself and its supply.It must be possible, considering that a multimeter in DC voltage mode or a scope differential probe do exactly that.I just struggle a bit to figure out what a minimal approach for 'measuring' an RS232 signal line is without sharing a reference.

author: ledtester
author_rank: Super Contributor
timestamp: February 20, 2025, 11:22:33 pm
content: Use a floating supply for the opamps/comparators and connect the floating supply ground to the RS232 ground.Floating supply could be batteries or a transformer. Hand held multimeters use batteries whereas bench instruments generally use a transformer.Generally the power supplies for IT equipment are either floating or earth ground referenced. In either case connecting your scope ground clip to the equipment ground is not a problem.

author: blackbit
author_rank: Contributor
timestamp: February 21, 2025, 12:10:29 am
content: The thing is, you cannot make assumptions about on which pin on a DB25 connector the signal ground is going to be. It could be anywhere.The only way around that would be to beep it out beforehand and then have a series of jumpers, a rotary switch or some such on the contraption we are discussing here to select which pin is carrying ground.That's... inconvenient.

author: David Hess
author_rank: Super Contributor
timestamp: February 21, 2025, 12:26:46 am
content: Quote from: blackbit on February 20, 2025, 11:13:02 pmAn operational amplifier configured that way with a shunt resistor combined with detecting the level will allow showing which side is the source and which is the load. The operational amplifier does not care where ground is when configured that way, except insofar as the common mode voltage must be within range.This would be complex, however I think the signal ground could be detected by rectifying all of the signals to establish a positive and negative reference, and then shorting any pin located close to the average between them to signal ground. However this completely fails if for instance a 3 wire RS-232 connection is used when nothing is happening.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 21, 2025, 12:29:43 am
content: Use white or deep green LEDs with high resistor values- these are visible with a few hundred microamps, which isn't going to cause any loading issues

author: Smokey
author_rank: Super Contributor
timestamp: February 21, 2025, 01:48:07 am
content: I'm super confused here.... What are the LEDs doing? Are they on the tx and Rx lines? If so are they going to be flashing at 115200? What function does that serve?

author: Terry Bites
author_rank: Super Contributor
timestamp: February 21, 2025, 08:45:31 am
content: RS232 can be multidrop if the end devices are listeners only.Terminate the cable for best results.