Author Topic: Switching between 3 serial devices  (Read 3464 times)

0 Members and 1 Guest are viewing this topic.

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Switching between 3 serial devices
« on: December 10, 2015, 02:43:29 pm »
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!
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Switching between 3 serial devices
« Reply #1 on: December 10, 2015, 03:11:10 pm »
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.
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #2 on: December 10, 2015, 03:24:44 pm »
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?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Switching between 3 serial devices
« Reply #3 on: December 10, 2015, 03:26:23 pm »
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.)
« Last Edit: December 10, 2015, 03:28:20 pm by Ian.M »
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #4 on: December 10, 2015, 03:34:17 pm »
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Switching between 3 serial devices
« Reply #5 on: December 10, 2015, 03:56:20 pm »
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.
« Last Edit: December 10, 2015, 06:16:35 pm by Ian.M »
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #6 on: December 10, 2015, 04:01:32 pm »
Could I just use an IC like TS3A5017DR which is a 2 x SP4T switch? I would need at least 2 of them.
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #7 on: December 10, 2015, 04:12:26 pm »
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Switching between 3 serial devices
« Reply #8 on: December 10, 2015, 04:30:33 pm »
Yes. That could work.  However 4x  TS5A3357 is going to cost you far more than 3x 74HCT136 or 74HC4066.
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #9 on: December 10, 2015, 04:33:57 pm »
Yes of course but if I was understanding you correctly the resistance was possibly too high with those 2 IC's
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12852
Re: Switching between 3 serial devices
« Reply #10 on: December 10, 2015, 04:43:16 pm »
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.
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #11 on: December 10, 2015, 04:58:18 pm »
Thanks for the advice Ian, I really am new to this stuff if you couldn't already tell.
 

Offline networkingdudeTopic starter

  • Contributor
  • Posts: 39
Re: Switching between 3 serial devices
« Reply #12 on: December 10, 2015, 06:50:05 pm »
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?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf