Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB and RS232 on the same connector

Status
Not open for further replies.

subpilot

Newbie level 4
Joined
May 7, 2020
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
42
I have an a subsea scientific instrument that has an existing 5 pin connector that is currently being used for supply power 6 to 30 VDC and bidirectional RS232. I am upgrading the internal electronics of the instrument and want to be able to use the existing connector for Power/RS232 as well as a USB connection to Native USB port of a NRF52840 inside the bottle. I cannot change the connector or add more pins. It has to keep same connector and cannot just use USB solely. The idea being that when instrument is deployed it is communicating via RS232 and being supplied with 6 to 30VDC. When instrument is brought into lab I want to be able to plug in a USB in order to download data.
The power issue is no big deal as instrument is powered from internal battery or via external power. I figure I can put the RS232 TX line from the PC on its own pin so that I don't have RS232 levels on a USB data line. Which leaves 2 pins to put USB D+/D- or the RS232 TX from the instrument depending on what is plugged in. So I need ability to switch one pin between USB Data or RS232 out based on what is plugged in. The instrument is a sealed titanium bottle with only the 5 pin connector available so no external switches etc available to reconfigure it.
The USB data lines to the nrf52840 have 14V TVSs and 33 ohm series resistors. I am thinking that I make it so it is in USB mode unless it gets power from external supply. Connect the RS232 Transceiver TX to the USB data pin but only enable output of transceiver based on the supply power being present. There would never be a case where instrument would be required to be outputting RS232 when not being supplied with power. Is this a viable solution or is there something that would be better?
USB Switch.jpg

- - - Updated - - -

Need to add something to open connection on D+ line to uController. Not sure what that would be. Maybe I just need to use a relay.

- - - Updated - - -

Maybe like this? Do not care about power consumption when externally powered and have real estate for the relay. Don't know of a USB multiplexer that would be tolerant of RS232 signals.

USB Switch Ver2.jpg

- - - Updated - - -

I guess I should just power the max3221 off the 5V regulator as well.
 

Hi,

are your RS232 and USB interface connected to different ICs? I assume so.

A possible solution would be a Single Pole Double Throw (SPDT) switch IC, as it seems your USB D- pin has not to be switched.
Connect the normally connected output pin to D-, and the normally open output pin to the MAX3221.
Use your supply voltage to change the switch psoition e.g. by a voltage devider followed by a scmitt trigger. So if your voltage is above the SPDT switching logic level, the switch position is changed.

I assume you will have to create an appropriate cable by your own, which is connected to your input pin (P? - Header 5). If so, just do not connect RS232 DL so you have not to disable the MAX3221 (except for power consumption issues). Otherwise use a dual SPDT switch.

greets
 

Hi,

Why not use the /invalid signal if MAX3221 to detect whether RS232 is connected or not?

And a SPDT with "beyound rails" feature.

Or use the MAX3221 "high" voltages as supply for the SPDT.

Klaus
 
  • Like
Reactions: stenzer

    stenzer

    Points: 2
    Helpful Answer Positive Rating
Hi,

Why not use the /invalid signal if MAX3221 to detect whether RS232 is connected or not?

And a SPDT with "beyound rails" feature.

Or use the MAX3221 "high" voltages as supply for the SPDT.

Klaus

That's indeed a very simple solution :thumbsup:. I haven't had a look on the MAX3221 pins, and wasn't aware of the /INVALID pin.
 

Thank you both for the great ideas. There would be two seperate interface cables a USB cable for download in the lab and a subsea connector with RS232 and power. I used the Double Pole because I thought it best not to have the USB D- pin exposed to the potential hazards of the outside world particularly as the connector could flood with sea water. I was not aware of the "beyond the rails" parts but the USB bandwidth could be an issue from what I see looking at the Maxim BTR switch datasheet. The bulkhead connector on the housing and the somewhat of a Kludge external USB interface cable are already a bit of a concern bandwidth wise. Other than a select few Subsea Ethernet connectors the deep water rated connectors are not fast signal friendly.
 

Hi,

I used the Double Pole because I thought it best not to have the USB D- pin exposed to the potential hazards of the outside world particularly as the connector could flood with sea water.
As long as the (unused) D- pin is not connected to a long cable... I soo no problem here.

I was not aware of the "beyond the rails" parts but the USB bandwidth could be an issue from what I see looking at the Maxim BTR switch datasheet.
As said, I see no problem in usuing "non BTR" switches when you use the generated supply voltage V- (pin7 ) and V+ (pin 3) of the MAX3221.

And the USB signals are just 12MHz ones. There should be plenty of suitable switches/MUXes.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top