subpilot
Newbie level 4
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?
- - - 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.
- - - Updated - - -
I guess I should just power the max3221 off the 5V regulator as well.
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?
- - - 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.
- - - Updated - - -
I guess I should just power the max3221 off the 5V regulator as well.