12
\$\begingroup\$

I have an old, custom pair of connectors in use by what will be a large number of systems. The connectors are mother/father and symmetrical, as in they don't have a mechanical guide to have the user plug it in in the "right" position.

I cannot alter the father device and connector in any way.

father connector (this is what the users plug in)

The 4 pins are: VCC GND Rx Tx. I have a high voltage on the power pin and Rx/Tx logic is at 5V. Rx/Tx clock is pre-set at a particular value.

mother connector pinout

Therefore, the father connector can be plugged in in 4 possible ways.

Mother supplies father with VCC under 1000V and under 100A if and when the pins are "aligned". Until then, the devices can talk through Rx and Tx @ 5V (there is a small rechargeable battery on the father connector end device).

Connectors' and devices' case(s) are non-conductive.

I need to be able to detect the orientation / how the father connector is inserted so I can relay current and signals properly, so that the devices will connect and talk regardless how the connectors are plugged in.

What is the best way to accomplish this? By "best way" I mean least number of components/FETs/relays/diodes. I can use any type of MCU on my end, was looking at a L0-class from STM.

NB: an electro-mechanical device behind the mother connector, in the form of a disk is rotated by a motor in steps of 90' clockwise (basically up to 4 "tries" are made until the signals are properly aligned) has been proposed through another channel, I am not looking for this kind of solution, need something solid state, without moving parts.

\$\endgroup\$
  • 9
    \$\begingroup\$ I cant think of any solution that wont cost you more than throwing those connectors away and buying new, keyed, connectors or housings. \$\endgroup\$ – Trevor_G Oct 14 '17 at 17:19
  • 11
    \$\begingroup\$ BTW: You have another issue you have not mentioned. You need to be able to detect when it is unplugged too, so some idiot does not unplug it when powered on and rotate it and plug it back in. \$\endgroup\$ – Trevor_G Oct 14 '17 at 18:07
  • 10
    \$\begingroup\$ You say this can't be changed because of certifications, but honestly any "certification" which allowed this connector to be used for 1000 V is worth less than zero. I would walk away. This isn't worth dying over, and any solution to this is going to be intrinsically risky. There is basically no way you can prove that the microcontroller (or whatever) can't hang and leave the power in a dangerous state. \$\endgroup\$ – Evan Oct 14 '17 at 18:44
  • 9
    \$\begingroup\$ @NickM: (1) Nobody has asked, but what exactly is the device? (2) Why would it have been designed without a polarised connector? (3) What is the serial protocol? (4) Can you elaborate on how TX / RX are referenced to GND? (5) You should condense all the points raised here back into your question. \$\endgroup\$ – Transistor Oct 14 '17 at 19:11
  • 11
    \$\begingroup\$ Of course. High voltage, salt water, and stupid regulations had to be involved, all at the same time. Especially salt water. For the record, I will state that this is a bad idea, in case someone gets electrocuted. \$\endgroup\$ – peufeu Oct 17 '17 at 21:31
4
\$\begingroup\$

Since the thing you are plugging in is pushing out a voltage relative to the ground pin on the Tx line (and maybe a pullup on the Rx) you ought to be able to use a circuit like the one below as a start.

schematic

simulate this circuit – Schematic created using CircuitLab

Pull each pin to ground one at a time and examine which other pins are driving back. You ought to be able to figure out which pin is the actual ground pin that way. Once you know that, switch in the TX/RX signals to the correct pins (not shown) and verify communication before turning on the appropriate power P-MOSFET.

Once you know which one is ground, and have it powered up, detecting the plug getting pulled should simply be a matter of monitoring the transistor on the Vcc line.

\$\endgroup\$
2
\$\begingroup\$

You can use a circuit similar to two-stage barrel shifter to allow rotating the signals by 0, 90, 180 or 270 degrees:

schematic

simulate this circuit – Schematic created using CircuitLab

You can use either solid state or mechanical relays for the switches. There are only two control signals, allowing 4 possible settings corresponding to the 4 possible orientations.

To find the correct orientation, just toggle through the settings until you get a valid RX/TX signal. Because the high-voltage supply is not enabled before you find the correct orientation, the logic only has to handle +- 5V on the rx/tx signals. A simple series resistor and diode clamp could be sufficient.

(Of course it would be smart to have some kind of fall-back protection in case the high voltage does end up on the wrong pins, but that's enough of a topic for another question.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.