0
\$\begingroup\$

I have a plug and socket. Before I turn on the 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: Plug
(source: volusion.com)

The socket I am using is: socket
(source: volusion.com)

All four pins of both sockets and plug are connected to neutral, ground and (120 V) AC lines.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ what kind of plug and socket? \$\endgroup\$ Apr 3, 2015 at 16:25
  • \$\begingroup\$ Something like this? \$\endgroup\$
    – EM Fields
    Apr 3, 2015 at 17:00

2 Answers 2

1
\$\begingroup\$

Assuming your power supply will have the microcontroller to control the power, there are several ways to do this:

  • Always have a small voltage and monitor the current. When there's current, there's something connected.

  • Have a couple extra pins with a resistor or a diode on it, and use those pins to electrically control the power supply (note: this doesn't even require a microcontroller)

  • Have a physical switch in the socket to detect if something is in it

As with literally everything engineering related, be creative. When there's something you want to detect, always ask yourself what its effects will be. Is there a physical state you can measure (with a switch, or a magnetic breaking switch)? Is there an electrical state you can measure (resistance, or an closed circuit)? Then see how you can detect those and use them.

EDIT after your update:

Put a switch on the plug and turn it on when you need it.

\$\endgroup\$
0
\$\begingroup\$

If it is not too late, you an add a presence detect pin. This would be pulled up on the microcontroller board. On the other board, it would be grounded. The microcontroller can poll the pin. When the pin is high, there is nothing attached. When it goes low, attachment has occurred, and you can energize the contactor.

edit: Another variant of presence detect pin with active-high logic. Sketch courtesy of EM Fields.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ @iAdjunct mkeith ..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 ? \$\endgroup\$
    – bhuvan
    Apr 3, 2015 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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