Summery: I am trying to figure out if I can use a bilateral switch as if it was a tiny relay capable of communicating UART signal, or are there things I am missing. Now, the long explanation.
So, I never used a bilateral switch before. The problem I am trying to solve involves having 2 devices which have one UART port each share one UART output port. Basically I have a UAV drone with a Flight Controller (FC) and an On Screen Display (OSD) units. During flight I want the FC to talk to OSD via the UART. However, on the ground, on occasion, I need to connect to either the FC or the OSD via their respective UART ports to update software, etc.
So basically I am shooting for the following states:
- S1: FC <-> External Port
- S2: OSD <-> External Port
- S3: FC <-> OSD
To do this I figured I could use 8 bilateral switches in this kind of arrangement:
I want to use the Texas-Instruments CD4066BPWR (Datasheet: ti.com/lit/ds/symlink/cd4066b.pdf). And this is the way I would like to connect it up:
What my question boils down to is do I properly understand how bilateral switches in general and this particular IC in particular work. If I substitute the bilateral switches with tiny relays my diagram should work just fine. But with bilateral switches are there any catches I am not seeing, such as for instance if they do not work at high frequencies? I don’t need them to switch quickly, but I do need them to communicate high frequency data signals (standard serial speeds).
Also, I can’t figure out if I need a set of resistors to pull the control pins low to disconnect the connection? And when disconnected, will the IN/OUT pins just float with circuit potential or will they be pulled low or high, or stay in the last known state or something strange like that? I am treating these bilateral switches as if they were relays basically, but am I wrong to do so?