I want to detect if main switch of room (placed outside room) is closed and send logic level signals to controller (Arduino?) according to that. I need suggestions for way best of doing that. I know I can do it by converting 230V AC to DC but I want to avoid transformers as they'll be little bulky. I have thought about following possible solutions :

  1. The main switch has little red light (not sure if it is LED though, because I don't see anyway for LED to get DC supply) built in which glows when switch is closed (I can upload pic if needed). There are connections for that light too but I am not sure if I can use them to get DC, help?

  2. Are there any 'Relays' which can do this work? Although I've always seen relay sensing low voltage signals and closing high voltage circuits (using CBs, if needed). Can I do it using "No Voltage Relay"? Like if there are volts, there will be normally closed contacts which can be used along with small battery and high value resistance.. (But that would need replacement of batteries ).

Any other suggestions are welcome. Thanks in advance.

  • \$\begingroup\$ Can you post the part number of your switch, or, at least a photo of it? Many main switches are actually SPDT, so you might exploit that. Have you access to both the live and the neutral wires? Instead of relay, I suggest an optocoupler. \$\endgroup\$
    – next-hack
    Oct 1, 2017 at 8:47
  • 1
    \$\begingroup\$ See this answer to a very similar question: Using 240v mains on/off as input to microcontroller. \$\endgroup\$ Oct 1, 2017 at 22:58

1 Answer 1


Consider using the HCPL-3700: -

enter image description here

But there are many other opto-coupler solutions that are out there and all give you a safe isolated signal like this one: -

enter image description here

Or the ACPL-K370

  • \$\begingroup\$ I have never seen this kind optocoupler! Very interesting! \$\endgroup\$
    – next-hack
    Oct 1, 2017 at 8:59

Your Answer

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

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