Electronic – the least complex way to implement a DP3T ON-X-ON switch

circuit-designpcbpcb-designswitcheswiring

I have an application below that requires 2 MCUs to be on a PCB, along with a single FTDI header. Both are programmed thru their RX/TX UART pins.

In normal operation, the RX pin on MCU_1 is connected to TX pin on MCU_2, and vice versa, for inter-MCU communication.

To flash MCU_1, a DP3T switch is toggled to the left to route the MCU_1 TX/RX pins to the FTDI header.

To flash MCU_2, the switch is toggled to the right to route the MCU_2 TX/RX pins to the FTDI header.

schematic

simulate this circuit – Schematic created using CircuitLab


So far, I have found DP3T switches with the following configurations:
DP3T configurations

I'm looking for such a configuration instead:

ON-X-ON

I'm guessing such a switch probably doesn't exist? How is it best then, using the least wiring/components as possible, to implement such a setup?

Best Answer

If you can guarantee that all the TX outputs will be tristated (floating) when the switch is thrown, then you can use a 4P3T slide switch wired as follows, for the given switch:

  • 1 and 3 to MCU 1's TX
  • 4 and 7 to MCU 2's TX
  • 5 and 8 to the FTDI's TX
  • 2 to 10
  • 6 to 14
  • 9 and 12 to the FTDI's RX
  • 11 and 16 to MCU 2's RX
  • and 13 and 15 to MCU 1's RX

P.S. the lack of a schematic is due to CircuitLab not having appropriate symbols for a 4P3T switch.

Related Topic