Switching between 3 serial devices - Page 1
Forum section: electronics / beginners

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 02:43:29 pm
content: I'm curious as to the best method to connect 3 ttl level serial devices to a single ttl level serial port. Each of the 3 devices would only have power when needed and never more than 1 device would be active.1) Could I just switch the power between these devices and leave all signal lines connected( RX, TX, RTS, CTS) ?2) Should i use some kind of digital switch? How fast does this need to be?If there's another easier solution or even a better one than I am proposing please let me know.Thanks!

author: Ian.M
author_rank: Super Contributor
timestamp: December 10, 2015, 03:11:10 pm
content: 1. No.2. No, unless you leave unused devices powered or add extra logic to detect which devices are powered and disable outputs to unpowered ones. The total propagation delay needs to be at least an order of magnitude less than 1 bit time at the fastest baud rate you will use.It depends on how you need to control the switch. If its manually, use a four pole three way rotary switch. If its digitally, and you are already committed to powering down unused devices, use analog switch chips to switch all the lines powered from a maintained 5V supply, with their control signals driven by the same signal yoiu use to switch the power to each device.

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 03:24:44 pm
content: I didn't think it would be that easy.I'm planning on controlling it digitally. There will be a micro that handles the power down and switching. What is left to decide is what switches to use? Do they need to be a special type? High speed etc?

author: Ian.M
author_rank: Super Contributor
timestamp: December 10, 2015, 03:26:23 pm
content: What's the max baud rate?How are you switching the power (e.g. relays or high side MOSFETs, or Shutdown pins on individual regulators etc.)

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 03:34:17 pm
content: Max baud should be no more than 115200 but the devices i'm using can go to 3 Mbaud.Switching is undecided, going to try to go with lowest power consumption possible.

author: Ian.M
author_rank: Super Contributor
timestamp: December 10, 2015, 03:56:20 pm
content: That's nasty if you need to go past 115Kbaud. You need a bandwidth at least an order of magnitude better than the baud rate to keep the rise and fall time of the edges acceptable, so to support 3Mbaud, you need switches that will pass 30MHz.You'll probably get away with a 74HC4066 for each device, but the 220R worst case on resistance may be an issue if any of your devices have low impedance inputs or if you need to use higher baud rates, so you may prefer a digital only solution using non-inverting quad tristate buffers, e.g 74HCT136 (which would be OK for 3Mbaud operation). Tristate the outputs of the buffers, or open the switches for all the powered down devices. Only the single currently powered device has its switches on or its buffers enabled.You *MUST* *NOT* activate the switches/buffers for more than one device at a time or you will risk causing a level conflict (bus contention) that will result in malfunction and may cause damage.

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 04:01:32 pm
content: Could I just use an IC like TS3A5017DR which is a 2 x SP4T switch? I would need at least 2 of them.

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 04:12:26 pm
content: OK, the TS5A3357 has a BW of 334MHZ and Ron of 9 Ohms and I would use one for each signal line. Hope i'm understanding this.

author: Ian.M
author_rank: Super Contributor
timestamp: December 10, 2015, 04:30:33 pm
content: Yes. That could work. However 4x TS5A3357 is going to cost you far more than 3x 74HCT136 or 74HC4066.

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 04:33:57 pm
content: Yes of course but if I was understanding you correctly the resistance was possibly too high with those 2 IC's

author: Ian.M
author_rank: Super Contributor
timestamp: December 10, 2015, 04:43:16 pm
content: No. The resistance *MAY* be too high for 3Mbaud operation using a '4066. See if your device works at 3Mbaud with a 220R resistor in series with each signal except ground. If it does, the '4066 will be fine. The '136 is a digital buffer so on resistance isn't a useful concept, and it 'runs out of steam' somewhere >30MHz.

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 04:58:18 pm
content: Thanks for the advice Ian, I really am new to this stuff if you couldn't already tell.

author: networkingdude
author_rank: Contributor
timestamp: December 10, 2015, 06:50:05 pm
content: Just so I know in the future, when DO i need to satisfy rise/fall times? Do you have any suggested reference material I can read?