RS232/RS485 sanity check

Hi all,

I’m designing an interface board that needs to communicate with one of two different plug-in boards using RS232 or RS485. The board needs to use the same connector for both protocols and has only one spare pin. The RS485 board is already in use and can’t be changed, but the RS232 board is in design so I have some freedom there.

The two boards are physically very close with short cables and connected grounds, so I’m not worried about ground loops.

The obvious issue here is that RS232 and RS485 have different voltage ranges, with RS232 presenting voltages that are out of spec for the RS485 transceiver.

My first and simplest thought is to simply to wire the two transceivers in parallel (using the enable pins to turn off the unneeded one) and either select an RS485 device like the SN65HVD21 which has a higher voltage range or an RS232 device with a lower drive voltage. Does this seem like a reasonable approach, or have I overlooked something?

My next thought was to use some form of switching to selectively route the signals to the correct receiver, but I’m not really sure how to switch positive and negative going signals.

Any thoughts appreciated.

Regards,
Chris

So you need to design a board that can accept either RS-232 or RS-485 signaling?

Or are you designing an interface to accept the (already existing) adapter to RS-485 and the (yet to be finished) adapter to RS-232?

Perhaps you can describe a few more details to clarify the scenarios you need to support?

Yes, one or the other but not both at the same time. Both variants (RS232 and RS485) will use the same 6-pin connector, of which five pins are already in use (12V, 5V, 0V, A, B, ). The interface board needs to detect which variant is connected and decode the correct signal type.

It’s not cheap but the MAX3160 is a multiprotocol transceiver that uses an IO to switch between RS232 and RS485. The RS232 is only +/-5V but might be good enough.

Are you transmitting and receiving? RS422 to RS232 receive only is fairly trivial.

Both transmitting and receiving. I’ve considered a multi-protocol transceiver like the above mentioned MAX3160, but good grief, the cost of them is eye-watering.

422 is differential. Are you sure you have enough pins for the +/- signals?

Yes, it’s half-duplex RS485, so using two pins for A/B. These same pins would need to be repurposed for Rx/Tx for RS232.

You would need a power supply (possibly vampire power feeding off the remote end) to drive an analog switch (integrated or discrete FETs) so that the positive and negative rails for the switch span the operating voltage range for both protocols. You would need to level shift your enable signal so that the gates that make up the switch would be driven to the respective rails.

You can also get muxes with its own supply generator to generate those rails: MAX14763 Datasheet and Product Info | Analog Devices (for instance)

I browsed the selection of analog switches for handling wide voltage ranges – ouch, they are all pricey!

That’s pretty much what I found too. By the time you’ve costed all the switches, etc. it would be cheaper to buy the MAX3160.

Dunno if it’s practical/desirable in your application, but you might want to look at mechanical latching set/reset relays. Something like https://www.digikey.com/en/products/detail/kemet/EE2-5TNUH-L/4506472