6

What would be ways to determine with example with Arduino, is current 220V AC socket on or off state? Any other than using relay (noisy) or current sensing sensor (too big)?

JYelton
  • 32,302
  • 33
  • 134
  • 249
Mike
  • 61
  • 1
  • 1
  • 2
  • 2
    Current sensors aren't too big: The [ACS712 isolated current sensor IC](http://www.allegromicro.com/Products/Current-Sensor-ICs/Zero-To-Fifty-Amp-Integrated-Conductor-Sensor-ICs/ACS712.aspx) is `6 x 4.9 x 1.75 mm`, that sounds reasonably small. However, a current sensor will only tell you when current is flowing, not when the socket is on but without any current being drawn. Which of these statuses do you need to detect? – Anindo Ghosh Aug 22 '13 at 20:41
  • 1
    If the arduino were connected to the socket and there was a small battery on board that exclusively powered a flashing LED, it would be simple, nay trivial, to have the arduino preventing the LED flashing and when the power fails, the arduino goes high impedance and the LED flashes. – Andy aka Aug 22 '13 at 21:05
  • 1
    Are you aiming for contact or non-contact? Are you interested if power is getting to the socket or if the switch is on and power is getting out? Do you want detect voltage presence or current flow? – SLaG Aug 22 '13 at 21:35
  • Small optoisolator, surely? Or even a socket with integrated neon indicator + photosensor, which avoids opening up the socket at all. – pjc50 Aug 23 '13 at 10:26
  • Is it not possible to just detect the EMF using something like this? http://www.instructables.com/id/Arduino-EMF-Detector/ It may need Calibration by checking the difference between the on and off state/what the background levels are, but I don't see why it can't work. – Luke Sep 26 '13 at 13:50
  • If the Ardunio is on fire, the mains is live. – John U Oct 01 '13 at 07:58
  • Related question: http://electronics.stackexchange.com/questions/17008/how-can-i-detect-a-power-outage-with-a-microcontroller – m.Alin Oct 01 '13 at 08:13

2 Answers2

3

Use any optocoupler in parallel with socket (of course, current-limiting resistor and reverse-polarity protection is necessary), and RC-filter on secondary side.

user2053898
  • 141
  • 2
1

You could simply add a serial usb charger.

Or you could use a hall effect current sensor like ACS712 (small).

If it is to know if a light is on, maybe a photoresistor on your arduino.

hanoo
  • 117
  • 3