check if a plug is in plug socket

hey there,

i want to test if a plug is in a plug socket. I tought about the following:

  1. check if there is a connection. However there is 230v on the socket. If i bring this voltage into the arduino it will be burned

  2. current transformer. I saw people how measured the current flow with a current transformer. However if there is something plugged in but the device doesn't draw current, it would not recognize it.

  3. a light sensor. This is the only option so far. The problem however is that i need to isolate everything from light. Also i dont think that is a smart way to do that.

So what would you do? Thank you!

I would put a microswitch on the socket, to be activated when a plug is present.

look001: 3. a light sensor. This is the only option so far. The problem however is that i need to isolate everything from light.

Really? How do you think your TV remote works in a bright room?

Try an opto-coupler with bipolar input and appropriate current limiting resistor on the 230VAC side and a pullup resistor and filter cap on the Arduino side.

Arctic_Eddie: Try an opto-coupler with bipolar input and appropriate current limiting resistor on the 230VAC side and a pullup resistor and filter cap on the Arduino side.

That would work on the plug (load) side of the connection. My impression is that he wants the information available on the socket (supply) side.

Don

That would have to be load sensor or the plug's physical presence. Can't think of anything else. The OP will have to give us more info.

You have many options here....

  1. Use current measurement on the mains plug to see if any current is being drawn.
  2. Glue a magnet to the socket and put a hall effect sensor on the plug to detect the magnetic field.
  3. Wire a mains voltage relay coil across the plug pins and use the isolated dry contacts to signal the arduino.
  4. Use a IR (or laser) beam break across where the plug goes into the socket, pulg in, beam broken.
  5. Use a RFID tag.
  6. Use IR reflector system to send IR beam out of socket and test for reflections when the plug is in.

I am sure there are many more ways to do this, but these are a start.....