DB9-DB25 serial port switch

Thread Starter

popcalent

Joined Mar 17, 2018
128
Hello,

I have an old computer with a DB25 serial port. I want to add a DB9 connector and the ability to switch from one to the other. I know that converters exists and can be found for as cheap as $5, but I want to work on this project anyway.

I thought about using two 74157 quad 2-to-1 selector (or similar) ICs for the port inputs, and a 74255 dual 2-to-4 decoder (or similar) IC as seen in the schematic:
db9-db25.png
My question is: is this going to work? The reason I'm using so many different ICs is that some pins are inputs, and some pins are outputs, and these ICs only work one way... but perhaps there exists a selector IC that works both ways and hopefully is a 16-to-8 (or 2 x 8-to-4) that I'm unaware?
 

nsaspook

Joined Aug 27, 2009
13,636
As usual, more information is needed for a better answer like pictures of what you have and the actual old computer model number.

Most likely the voltage levels from the old computer is RS-232 bipolar voltage.
Traditionally, RS232 uses bipolar voltage levels, where a positive voltage represents a logic 0 and a negative voltage represents a logic 1. The voltage levels typically range from -3V to -15V for a logic 1 and +3V to +15V for a logic 0
TTL logic can' handle that. Buy a proper serial port switch/converter/cables.
 
Last edited:

Thread Starter

popcalent

Joined Mar 17, 2018
128
As usually more information is needed for a better answer like pictures of what you have and the actual old computer model number.
This is the first time I interact with you, so I don't know what you mean by "usually". I'm sorry, but your previous experiences with other users have nothing to do with me.

Most likely the voltage levels from the old computer is RS-232 bipolar voltage.

TTL logic can' handle that. Buy a proper serial port switch/converter/cables.
This is a PC104 board. It's powered with just 5V. That's the only voltage.
 

nsaspook

Joined Aug 27, 2009
13,636
This is the first time I interact with you, so I don't know what you mean by "usually". I'm sorry, but your previous experiences with other users have nothing to do with me.



This is a PC104 board. It's powered with just 5V. That's the only voltage.
Unfortunately it does matter with this set of questions as usual, it's not about you personally, it's a general statement about people assuming others have specific information, it's human nature. More specificity of information gives us all an advantage to solve the issues. I had no idea it was a PC104 board with a 5V supply voltage before. Most RS232 drivers have internal voltage converter circuits to make the bipolar voltages from the 5V supply. So just saying it's a PC104 format (that doesn't define serial voltage levels) machine doesn't really answer the question about the serial port.
1709672683740.png

A measurement of the mark/space voltages would be nice as a definitive answer.
1709670912768.png
 
Last edited:

Papabravo

Joined Feb 24, 2006
21,345
Hello,

I have an old computer with a DB25 serial port. I want to add a DB9 connector and the ability to switch from one to the other. I know that converters exists and can be found for as cheap as $5, but I want to work on this project anyway.

I thought about using two 74157 quad 2-to-1 selector (or similar) ICs for the port inputs, and a 74255 dual 2-to-4 decoder (or similar) IC as seen in the schematic:
View attachment 316934
My question is: is this going to work? The reason I'm using so many different ICs is that some pins are inputs, and some pins are outputs, and these ICs only work one way... but perhaps there exists a selector IC that works both ways and hopefully is a 16-to-8 (or 2 x 8-to-4) that I'm unaware?
Probably not since those chips are NOT capable of achieving the proper output voltage levels. The negative voltages on the input lines will likely fry the chips you are using. Why are you still using TTL parts?
 

Thread Starter

popcalent

Joined Mar 17, 2018
128
Well, the other thing that occurs to me (other than using a DB9 to DB25 converter) is using a mechanical switch that can switch eight different pins. If this exists, it's probably very expensive and bulky. I'm not near where the board is to measure the voltages, so at this moment I can't get back to here with the voltages.
 

nsaspook

Joined Aug 27, 2009
13,636
Well, the other thing that occurs to me (other than using a DB9 to DB25 converter) is using a mechanical switch that can switch eight different pins. If this exists, it's probably very expensive and bulky. I'm not near where the board is to measure the voltages, so at this moment I can't get back to here with the voltages.
A mechanical switcher is always a good choice, with a good set of adapters.
https://www.blackbox.com/en-CA/store/browse?cat=Cables_Serial_Adapters
You can find Chinese ones that are affordable.
https://www.amazon.com/rs232-switch-box/s?k=rs232+switch+box
 

MisterBill2

Joined Jan 23, 2018
19,630
How about a simpler scheme, which would be to wire the two connectors directly in parallel, since very seldom would you have multiple serial port devices connected at the same time?? Cheaper, easier, correct voltages all at the same time.
And as the switch packages mentioned are obsolete, they are often available really cheap, or even for free. I would GIVE you one if you lived nearby and would pick it up. The enclosures are nic for small projects.
 

Papabravo

Joined Feb 24, 2006
21,345
Well, the other thing that occurs to me (other than using a DB9 to DB25 converter) is using a mechanical switch that can switch eight different pins. If this exists, it's probably very expensive and bulky. I'm not near where the board is to measure the voltages, so at this moment I can't get back to here with the voltages.
If they are legitimate RS-232 voltage levels I can tell you the range.
 

Thread Starter

popcalent

Joined Mar 17, 2018
128
I was thinking the same MisterBill2 suggested. Just wire both connectors in parallel, and use one at a time. This is for a very small computer and adding an external switch box makes the whole thing too bulky...

Papabravo, they should be legitimate RS-232 voltage levels.
 

Thread Starter

popcalent

Joined Mar 17, 2018
128
By the way, will my approach work with a parallel port? I have two lpt devices that I often use and I don't want to be constantly connecting and disconnecting them. The parallel port is just 5V/0V.
 

Thread Starter

popcalent

Joined Mar 17, 2018
128

nsaspook

Joined Aug 27, 2009
13,636
One of the things I want to connect is an OPL3LPT adlib card. It needs to be powered with 5V and it has a 3.5mm output jack. The idea is to have the OPL3LPT inside the case and power it with the same power supply. Then the back panel would have the LPT switch, the output jack, and the other LPT connector that I'll have available for other stuff.
Ad Lib audio capability, that's a blast from the past. You might be able to gut a cheap switch and move the parts inside a case.
 

Thread Starter

popcalent

Joined Mar 17, 2018
128
Ad Lib audio capability, that's a blast from the past. You might be able to gut a cheap switch and move the parts inside a case.
It's a PC104 386 computer. I have it inside an IBM 7207 case. There's not much space inside. There's the PC104, the 5V/12V power supply , and a combo 3.5"/5.25" drive. So not much space inside.
 
Top