How to detect a plug is connected to socket

Discussion in 'General Electronics Chat' started by bobdxcool, Apr 3, 2015.

  1. bobdxcool

    Thread Starter New Member

    Feb 12, 2012
    18
    0
    I have a plug and socket. Before I turn on power supply from a contactor, I need to detect if the plug is connected to the socket via a microcontroller. Any ideas on how to do this ?

    The Plug I am using is

    [​IMG]

    The socket I am using is

    [​IMG]

    All the four pins of both socket and plug are connected to neutral, ground and (120v) ac lines.

    The issue is that all the four pins of both socket and plug are connected to neutral, ground and (120v) ac lines. Please see the pictures posted above. So, there are no other pins left to use. I was thinking of using a magnet near the socket and a hall sensor stuffed (Not a safe idea I guess) somewhere near the plug. Any better ideas ?
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,542
    2,369
    Presuming you are committed to the items shown, you could use any thing from a small honeywell prox detector such as the SS400 series to a simple miniature microswitch on the socket/plug protection cover.
    Max.
     
  3. Reloadron

    Active Member

    Jan 15, 2015
    963
    232
    Your plug looks like a socket to me (female) and your socket looks like a plug (male). Personally I would look to embed a magnetic reed switch in the yellow one and a small magnet on the connecting cable. There is also a micro switch option. Either way should work fine. Pretty much ditto what Max had to say.

    Ron
     
  4. DickCappels

    Moderator

    Aug 21, 2008
    2,651
    632
    Assuming this is AC, put a rectifier in series with a high value resistor (for example 10k) across the conductors or the socket. Have your circuit use a low voltage to continually check for that resistance (not accepting an open or a short) in one direction only by reversing the "ohmmeter" circuit several times at high frequency. The check should only allow the contactor to close after several successive successful tests.

    I did this a long time ago with a similar system at about 170 VAC -the objective was to keep the power from coming on until the cable was safely connected so nobody could get shocked while handling the cable. The test was performed by taking ten cycles of one complete test cycle per second. Back in the days before single chip controllers.
     
  5. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Since L,N,Gnd only need three pins, what is the forth pin used for?
     
  6. bobdxcool

    Thread Starter New Member

    Feb 12, 2012
    18
    0
    Can you explain this in a little more detail ? I am not very clear with the idea of yours ?
    I bascially have 2 120v lines connected to 2 pins and 1 neutral and 1 ground connected to the two other pins of socket (blue color picture posted above) , all from the main power supply.
     
    Last edited: Apr 4, 2015
  7. bobdxcool

    Thread Starter New Member

    Feb 12, 2012
    18
    0
    2 120V AC lines, 1 neutral, 1 Ground.
     
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Use the same principle as a GFCI but reverse the logic. Put a ??MegΩ resistor from L to Gnd in the load side plug, and use a hacked GFCI output to switch something instead of opening the load.
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,542
    2,369
    One advantage with the SS400, et-al, is it is not only non invasive ( Galvanic isolation) it will interface directly to the microcontroller.
    Max.
     
  10. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Maybe he has a L1/L2/N/G 120/220 feed. I would assume that there is a resistive current path via the load attached to the socket from L to N. If this is the case then maybe, monitor the voltage (high impedence meter) across the contactor's input/output contacts from the L supply to the L in the plug. Not connected...no voltage reading. Connected...voltage reading from L to N via the load. The current available at the plug would be at a safe level due to the meter's impedance. Activating the contator just shorts out the meter. OOPS! An activated contactor with the plug out would also give a OVAC reading. If the contactor is a DPST, than another meter/indicator across the two output contacts. And a circuit to detect the logic of the two meters.
    Meter 1 no reading, meter 2 no reading = contactor not closed and plug not connected.
    Meter 1 reading, meter 2 no reading = contactor not closed and plug connected.
    Meter 1 no reading, meter 2 reading = contactor closed and plug connected.

    Sound right?

    Ken
     
  11. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,804
    833
    Maybe I am missing something, but when you say measure from the L supply to L in the plug ( the contactors input/output contacts) isn't that between the plug and socket? And if so, wouldn't it imply a permanent connection, making the plug/socket useless?

    I'm sure I'm not envisioning this correctly. Can someone clarify the connection for me?
     
  12. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    I'm still wondering if the OP has an L1/L2/N/G 120V/220V power source. What I'm also assuming is that both 120v branches and the 220V is used on the load end. I'm envisioning a DPST contactor. The input supply's L1 and L2 are going to the fixed contacts The output L1 and L2 are connected to the movable contacts and then to the plug, along with N and G. Meter#1 is connected between the fixed and movable contact on the L1 side of the DPST. Meter#2 is connected between the output L1 movable contact and N.

    Ken
     
  13. bobdxcool

    Thread Starter New Member

    Feb 12, 2012
    18
    0
    Pls note that I have 2 in phase 120V lines , a common neutral and a ground , which are connected to my socket (Blue color picture above). The voltage between the two 120V lines is 240V and voltage between 120V and neutral is 120V. The plug (yellow picture) also has 4 pins (2 lines, neutral, ground) which are connected to equipment. Some of the equipment are powered by one 120V line and the others by the 2nd 120V line. When the socket is connected to the plug and contactor (3 phase contactor) is turned on, the equipment are turned on.
     
  14. PeterCoxSmith

    Member

    Feb 23, 2015
    148
    38
    Can't you just detect the presence of the voltage on the floating parting part of the connection?

    Or do you want the detection to be on the fixed side which already always has the voltage present? If the floating load takes some current, you could detect the current flow on the fixed side.

    If the contactor is on the fixed side and there is no voltage on the socket then you could modify the socket and use a proximity switch. Or you could use a high resistance connection to the socket, apply a voltage and detect the low current drawn by the load.
     
  15. bobdxcool

    Thread Starter New Member

    Feb 12, 2012
    18
    0
    The socket (Blue colored picture above) is connected to the power supply via a contactor. The plug (yellow colored picture) is connected to the load. I want to be able to detect when the socket is connected to the fixed plug, before turning the contactor ON. I want to be able to detect this from the socket end.
     
  16. PeterCoxSmith

    Member

    Feb 23, 2015
    148
    38
    What is the load and how much current will it take?
     
  17. bobdxcool

    Thread Starter New Member

    Feb 12, 2012
    18
    0
    30 amperes for each 120V line is the maximum load.
     
  18. Reloadron

    Active Member

    Jan 15, 2015
    963
    232
    Years ago we had a problem where technicians would occasionally disconnect a similar plug and socket combination at work while a large stator was energized. These connectors were similar to what you have but with silver plated pins and very expensive. Attempting disconnect under load would cause arcing and mar the pins. Finally I tried using a proximity sensor so the main contactor would drop out before arcing would occur. I went with sensors as pictured in this link. I used the 24 VDC versions and had some mounts made from nylon stock material. All that was needed on the socket end was a metal bolt or in some cases a washer for the sensor to sense. The 24 Volt out of the sensor drove a small 24 VDC relay which was placed inline with the contactor. Depends on what you want to spend? Another cheap option is go to a home improvement store and buy a magnetic reed switch as used to detect entry in home security systems. Something like this and break the actual switch out of the enclosure and enclose to your liking. That or simply buy the switches themselves from a distributor like Mouser. Then enclose in whatever works for you. Switch on one end and a magnet glued in place on the other end, unless switch is closed contactor can't be energized.

    I have no clue if this will work for your application, the principal worked well for mine.

    Ron
     
Loading...