4
\$\begingroup\$

I am looking at RS-232 control for various TV displays which use a different type of input connector for RS-232. The combination of RS-232 inputs on different TV displays is the standard 9-pin DB9 connector or either a 2.5mm or 3.5mm input. The set-top box that is being linked to each TV uses a 3.5mm connector. Therefore one end must always be 3.5mm on one end.

Cable wise there's plenty of 2.5mm/3.5mm to DB9 (male/female) cables available which works directly for some of displays, but no direct cable solution for 3.5mm to 3.5mm or 3.5mm to 2.5mm connectors where are rated for serial communication. It is of course possible to use convertors or chain cables between the two to make up a serial cable, although it does get expensive for the amount of devices, given having to purchase more cables/convertors.

It raises the question, in theory could RS-232 communication be achieved through audio cables? My initial thoughts are that it could be possible, but how likely would it be that an off the shelf 2.5mm or 3.5mm audio/aux cable has the right pin out for RS-232 or if it would even be reliable without essentially DIY'ing your own?

It potentially suggests it would be unlikely and therefore using converters or chaining cables is likely the way to go for proper specification/reliability, despite being much more costly with the amount of cabling required.

I am however not an expert on component/electronics and would like to ask others with more experience.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ There are many products that already do this \$\endgroup\$
    – Voltage Spike
    Feb 18 at 17:50
  • \$\begingroup\$ @VoltageSpike I was unable to find any cable that was specifically stated to work with RS-232 that was either 3.5mm on one end or 2.5mm/3.5mm on the other. Standard audio cables exist of course and the 3.5mm to DB9 exists, but would then require further cabling afterwards to convert for the final receiving end. \$\endgroup\$ Feb 18 at 18:12
  • \$\begingroup\$ In asynchronous RS232 communications where the data is control commands or status info, the typical settings are 9600 bits/second or slower. 9600 bits/second would transmit with a fundamental frequency of 9.6 kHz. The harmonics would be higher. So it's possible for a short audio cable to carry RS232 signals. The higher the bandwidth of the cable, the less distortion of the RS232 signal, and the more likely the signal will be received successfully. \$\endgroup\$
    – Sotto Voce
    Feb 18 at 20:08

4 Answers 4

9
\$\begingroup\$

RS-232 levels and rates are not very different from audio. Probably there is no such thing as an audio cable that cannot handle serial at say 115.2kbps. Things start to get iffy when you're talking analog video (<10MHz bandwidth), or long cable lengths, or noisy environments (audio cables are typically poorly shielded, being loosely wrapped rather than braided), but even then, RS-232 is slowed down by cable capacitance faster than its noise margin is used up, and its higher voltage means it takes quite a bit of noise to be a problem.

Mind, there is some discrepancy there, as modern RS-232 transmitters are usually on the low side (~ ±6V, versus the standard's recommendation of 12-15V), but it still does well in general.

\$\endgroup\$
4
  • \$\begingroup\$ The standard says many things, but where does it recommend 12-15V and why, since the whole 5V to 15V range is allowed? \$\endgroup\$
    – Justme
    Feb 18 at 20:36
  • 1
    \$\begingroup\$ Wikipedia indicates "The standard specifies a maximum open-circuit voltage of 25 volts: signal levels of ±5 V, ±10 V, ±12 V, and ±15 V are all commonly seen depending on the voltages available to the line driver circuit", though without access to the original text I cannot confirm this further. \$\endgroup\$ Feb 18 at 21:02
  • \$\begingroup\$ Yes, I agree all those could be common levels, yet they are all within allowed range where no voltage is more preferred than any other. You could have -7V/+11V or any other combo that is within the allowed range. \$\endgroup\$
    – Justme
    Feb 18 at 21:16
  • 2
    \$\begingroup\$ Aha, found a copy on amobbs. The official range is 5-15 (loaded), giving no preference otherwise. One would reasonably interpret, however, that the generous range is provided in the interest of increased range and noise margin, and if one wants to optimize for that, higher levels should be selected. \$\endgroup\$ Feb 18 at 21:21
7
\$\begingroup\$

It raises the question, in theory could RS-232 communication be achieved through audio cables?

Yes.

If the baud rate is quite low, or the cables are relatively short, then audio cables can handle that signal just fine. If the baud rate is high and the cables are long, you might have problems, or it might work perfectly. I'd say it's definitely worth a try.

My initial thoughts are that it could be possible, but how likely would it be that an off the shelf 2.5mm or 3.5mm audio/aux cable has the right pin out for RS-232 […]?

Very likely.

Almost every 2.5 or 3.5 mm audio cable you find will have the same pinout: "straight through," or, in other words, tip to tip, ring to ring, and sleeve to sleeve.

Is that what you want? Maybe. The big question is: do the TVs use the same pinout that the set-top boxes use?

I don't know whether or not there's a standard for RS-232 over 3.5 mm connectors. However, keep in mind that consumer electronics are designed with the average consumer in mind. The average consumer is likely to see a jack that looks like an audio jack, and think, "Oh, I need to get an audio cable and use that to connect these." It's likely that the engineers at least tried to design everything so that that will work perfectly.

Hooking things up incorrectly shouldn't cause any damage. Tim Williams writes in a comment that "if the devices are compliant to RS-232, they are definitively short-circuit tolerant."

\$\endgroup\$
6
  • \$\begingroup\$ A stronger statement can be made: if the devices are compliant to RS-232, they are definitively short-circuit tolerant. \$\endgroup\$ Feb 18 at 21:17
  • \$\begingroup\$ @TimWilliams Ah, thank you for that information! My original statement was incorrect; it was based on a project that I worked on last year and misremembered. That project did have short circuits as a possible hazard, but the situation this question is asking about is different (RS-232 instead of unprotected 3.3 V GPIO). \$\endgroup\$ Feb 18 at 22:30
  • \$\begingroup\$ RS-232 interfaces should be tolerant of connecting it incorrectly to another RS-232 interface. What happens if RS-232 cable is accidentally plugged in to another port on a device that is not RS-232 but something else like headphones port, is another thing. It can't be known which port damages or survives, the RS-232 port or the other one. \$\endgroup\$
    – Justme
    Feb 18 at 22:56
  • \$\begingroup\$ I don't see a problem in typical scenarios -- headphones outputs are low impedance and low voltage, easily shunting the 232's meager current-limited output, and even the high-frequency content of an unfiltered class-D amp shouldn't bother the transmitter -- but completely generally, there can always be something, it's true. \$\endgroup\$ Feb 19 at 6:45
  • 1
    \$\begingroup\$ If the devices are compliant to RS-232… but serial connections can often be loosely referred to as 'RS-232' even though they might well not actually be compliant. \$\endgroup\$
    – nekomatic
    Feb 19 at 14:46
1
\$\begingroup\$

Audio cable is just cable like anything else. RS-232, being a 60-year old standard initially, does not have much special requirements for the cable, except the cable having low enough capacitance.

So if you can find cables that have suitable connectors and pinout, they likely work. If you have any doubts, buy connectors and cable separately and make your own cables, with any off-the-shelf adapter only on one end.

You can also cut off-the-shelf cables and extend them with suitable cable.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks. I don't have the skills to DIY my own cable, but convertor/gender changers is possible, just costs more. I will potentially see if I can find any pin outs of audio cables to see if one could work as a test, as they are relatively cheap. \$\endgroup\$ Feb 18 at 18:13
1
\$\begingroup\$

An ordinary audio 3.5mm TRS plug to plug cable may work, but is more likely to result in both devices talking on the same wire, and listening on the other, so unable to communicate.

I suggest getting a cable a 3.5mm plug to two RCA plugs, and another 3.5mm to two RCA jacks. Connect the RCA ends together, red plug to white jack, and white plug to red jack. This will swap the transmit and receive connections, so the transmit connection of each device will connect to the recieve connection of the other.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ It will; assuming that the RS-232 connector has ground on sleeve. Which I would guess would be the most likely connection, but is not 100% guaranteed. \$\endgroup\$
    – Justme
    Feb 18 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.