detecting if connector is plugged in

Thread Starter

ton88

Joined Nov 10, 2019
18
The basic problem were trying to solve is certain secondary device's cables gets left unplugged and we need a way to detect a cable that is plugged into my device,and check if that cable is actually plugged into a secondary device and not hanging around unplugged.
I have a cable with 5 pins on both ends that are plugable i have 2 pins that are not used in the connector's and 1 pin is ground,and the other 2 pins are rs485 signal pins.My device has a mcu,and ports on the pcb that one end of the cables connector will plug into,i dont have access to the other end of what the cable will plug into.what i need to be able to detect is
  1. If the cable is connected to my device
  2. Is the other end of the cable connected to a secondary device
Iam not sure if this is even possible with how iam trying to go about this, without there being a mechanical switch inside the connectors or on the connector ports. Any input is appreciated thanks
 

MrChips

Joined Oct 2, 2009
30,708
With one or two spare pins you can easily detect that the cable is plugged in at your end.

In order to detect that the cable is plugged in at the remote end you either have to modify the remote device or you have to detect the signals or loading on the RS-485 data lines.
 

LesJones

Joined Jan 8, 2017
4,174
This assumes that your "device" has a low voltage DC supply available. Use one of the spare pins as follows. In the cable link the spare pin to the ground pin. Connect the spare pin in the device to the positive supply via a suitable value resistor to provide a current of about 2 mA ad also to the base of an NPN transistor. Connect the emitter of this transistor to ground. Connect the collector to the positive power supply via a resistor in series with a warning LED. Choose the resistor to give the desired LED current. (Make sure the polarity of the LED is correct. (If you only have a negative supply available then use a PNP transistor.)

You will have to do the resistor calculations yourself as you have given no details of your "Device"

Les.
 

Deleted member 115935

Joined Dec 31, 1969
0
If you can modify the far end,
one wire devices are very good at this,

No need for power, just a ground and the one wire signal

https://www.maximintegrated.com/en/design/technical-documents/tutorials/1/1796.html

Put a one wire device in each unit, and connect the signal wire and ground,
then the master can read what and how many one wires are on bus.


If you can't modify the far end,
You are asking to detect the difference between when the cable is plugged in or not, by measuring its characteristics.

does the plugged in system have a different resistance to not plugged in

does the plugged in system have a voltage on signal that you could detect such as a pull up / down.

If the far end is plugged in and working, could you do a "ping" type operation,

Classically , a TDR is used to detect discontinuities on a transmission line,
could you send a pulse down signal, and see what the reflection is ?
 

Thread Starter

ton88

Joined Nov 10, 2019
18
This assumes that your "device" has a low voltage DC supply available. Use one of the spare pins as follows. In the cable link the spare pin to the ground pin. Connect the spare pin in the device to the positive supply via a suitable value resistor to provide a current of about 2 mA ad also to the base of an NPN transistor. Connect the emitter of this transistor to ground. Connect the collector to the positive power supply via a resistor in series with a warning LED. Choose the resistor to give the desired LED current. (Make sure the polarity of the LED is correct. (If you only have a negative supply available then use a PNP transistor.)

You will have to do the resistor calculations yourself as you have given no details of your "Device"

Les.
I didnt clarify in my first post i dont have access to the secondary devices design implementation all secondary devices are all made from different manufacturers.Wouldnt this circuit only determine if the cable is plugged into both ends and the secondary device is powered on.There are situations were a secondary device could be powered off but still have its cable plugged in on both ends wouldnt i get a false cable unplugged flag when the secondary device is powered off with a cable plugged into it?
If you can modify the far end,
one wire devices are very good at this,

No need for power, just a ground and the one wire signal

https://www.maximintegrated.com/en/design/technical-documents/tutorials/1/1796.html

Put a one wire device in each unit, and connect the signal wire and ground,
then the master can read what and how many one wires are on bus.


If you can't modify the far end,
You are asking to detect the difference between when the cable is plugged in or not, by measuring its characteristics.

does the plugged in system have a different resistance to not plugged in

does the plugged in system have a voltage on signal that you could detect such as a pull up / down.

If the far end is plugged in and working, could you do a "ping" type operation,

Classically , a TDR is used to detect discontinuities on a transmission line,
could you send a pulse down signal, and see what the reflection is ?
We dont have access to any secondary devices only are device there is no 2 way communication only transmit from are device.as far as measuring the characteristics when the system is connected,in are case the cable length can vary from 3ft to 300ft of cable built from different cable manufacturers we could profile each cable being unplugged aslong as each cable is close to each one another otherwise we will have a giant catalog of different cable behavior.

A TDR would be ideal i dont think they will go for building a new module especially the time it will take to design,we were looking for something that could be used with are existing system hardware.Unless you have a easy way to put a tdr in are system iam not to familiar with them.
 
Top