This question already has an answer here:

enter image description here

Can anyone teach me how to convert a light activated switch into dark activated switch vice versa.


marked as duplicate by Dave Tweed Jan 2 at 18:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    \$\begingroup\$ Simply flip the position of the R1 with LDR. \$\endgroup\$ – G36 Dec 30 '18 at 13:35
  • 2
    \$\begingroup\$ Your schematic shows a mains earth connection to the mains supply. This should not be done. You must have a floating 12 V supply and you must treat the whole circuit as live. \$\endgroup\$ – Transistor Dec 30 '18 at 13:48
  • \$\begingroup\$ What do you mean by "a floating 12 V supply" sir? Sorry im a bit new in this field \$\endgroup\$ – Delion Dec 30 '18 at 14:14
  • 1
    \$\begingroup\$ A floating power supply is one whose output has no internal connection to the mains or earth. Your schematic shows an earth connection connected to one of the mains wires. This is a "bad thing". When you're new in this field you should work on something other than live circuits. \$\endgroup\$ – Transistor Dec 30 '18 at 15:40
  • \$\begingroup\$ To elaborate, the identified conductor(neutral/return) of your 230VAC mains connection must not be grounded downstream of the nearest circuit breaker. It is connected to ground in the panel, and it is important it not connect to ground after it leaves the panel on a branch circuit because the intent of an identified conductor is to provide a "grounded" wire that is fully separate from the ground used for safety. Current travelling on the actual line voltage ground wire is fault current and undesired in almost every case. \$\endgroup\$ – K H Dec 30 '18 at 22:38

Browse other questions tagged or ask your own question.