This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN74LVC1G3157: Analog switch to connect to RS232 or RS485 network

Part Number: SN74LVC1G3157
Other Parts Discussed in Thread: TMUX6236

Tool/software:

Hello,

I need to connect a microcontroller to a RS232 or RS485 through the same connector (selection via dip switch).

The microcontroller is connected via a single UART port to an RS232 (MAX3232EIPWR) and an RS485 transceiver (+ an AND port to merge RXD signals on the microcontroller side).

The outputs of the two transceivers must be muxed to a single connector and I'd like to use the SN74LVC1G3157.

Voltage reference is 5V, maximum speed is 115200bps, so I don't expect any issues related to delays and the selector will be only switched while the system is off.

Do you see any potential issues in the application, in particular:

- Are ports fully bidirectional (i.e. either A or B is driving the line HIGH/LOW)?

- Should I expect any OFF- current flow between A and the unconnected port in either direction, when A=5V and B=0V or vice versa (some sort of bulk diode conduction, besides the OFF-state switch leakage current as per Section 6.5 of the datasheet)?

Thanks for your support.

Kind regards,

Stefano

  • What do you mean with "outputs"? Transceivers have inputs and outputs on both sides.

    RS-232 and RS-485 bus voltages can go beyond 5 V. Can you switch the bus lines with DIP switches?

  • > What do you mean with "outputs"? Transceivers have inputs and outputs on both sides.

    I mean the transceiver side facing the external connector, not the one towards the uart and microcontroller.

    > RS-232 and RS-485 bus voltages can go beyond 5 V. Can you switch the bus lines with DIP switches?

    I am using a DIP switch to drive the S input of SN74LVC1G3157 switches, to connect both the external port (RS1_TXD/RXD on A side) to the selected transceiver (B side).

  • RS-485 voltages cannot go beyond the driver's supplies, but there could be a ground shift between nodes. Can this happen in your application?

    RS-232 bus voltages are ±6 V, or more for some other drivers. If you know that the driver at the other end does not go beyond that, you can use the V+/V− pins to suply a high-voltage switch like the TMUX6236.