enter image description here

Can I use a 12 V power supply as the source of electricity for this circuit? And where do I connect the positive/negative of my power supply?

I'm a bit new to this so please understand, thank you.

  • \$\begingroup\$ You can start by NOT SHOUTING AT US!!! \$\endgroup\$ – Dave Tweed Jan 2 '19 at 12:47
  • 4
    \$\begingroup\$ If you don't know what you are doing, DO NOT touch anything connected to mains (230 V) power. There is a high risk of fire, electrocution and death. \$\endgroup\$ – jcaron Jan 2 '19 at 12:50
  • 2
    \$\begingroup\$ Please don't ever build this circuit! It's dangerous if you don't know what you're doing. If you really want to proceed, at least use something called a "opto-isolating triac driver", like a MOC3043 or something like that (almost any generic general purpose type and brand would fit your need) \$\endgroup\$ – MartinF Jan 2 '19 at 12:56
  • 2
    \$\begingroup\$ It's a really bad circuit anyway. The transistor is wired as an emitter follower, which provides no voltage gain and no hysteresis. \$\endgroup\$ – Dave Tweed Jan 2 '19 at 13:04
  • 1
    \$\begingroup\$ Possible duplicate of How to convert light activated switch THIS IS THE FOURTH TIME YOU'VE POSTED THIS. STOP REPOSTING AND EDIT YOUR ORIGINAL QUESTION \$\endgroup\$ – Chris Stratton Jan 2 '19 at 18:35

Maybe you could build something like this:


simulate this circuit – Schematic created using CircuitLab

Please do note that this is a darkness activated switch, since the schematic you've posted is that as well. For a light activated switch, swap R1 and the LDR ;-). I'm not saying this is the best possible solution, but it uses somewhat the same parts as you intended in the first place. Whether this solution is usable really depends on your application. If you want to learn about electronics it might be a good starting point to get this to work. (Otherwise you might want to consider buying a ready made solution.)

Be careful not to touch the 230V part of the circuit! You can use a standard 12V DC supply for the left part of the circuit. The positive terminal (+) is marked on the schematic.


I've added R7, to prevent too much current through the LDR when the light is on and R1 is is the lowest (0R) position.

Please also note that R4, R5, R6 and C1 must be able to withstand the mains voltage. Normal 0.25W resistors usually have a max. working voltage of only 250V which is not enough ((230V + 10%) * sqrt(2) = 358V). That means you'll need 1W resistors, or at least resistors with a max. working voltage of 450V or higher. Also you'll need an X rated capacitor for C1. If that's a problem, you could try omitting R6 and C1, as your load is a simple light bulb and a snubber might not be necessary.

  • \$\begingroup\$ Hii sirr what are those 2components inside the MOC3043? Sorry for asking too many question im jusr a student hehe. \$\endgroup\$ – Delion Jan 2 '19 at 13:59
  • \$\begingroup\$ And btw am i be needing to use 2 power supplies? \$\endgroup\$ – Delion Jan 2 '19 at 14:04
  • \$\begingroup\$ Those two components are a representation of what's inside the MOC3043. It's just what the schematic of a opto-isolating triac driver looks like. Look at the datasheet and you'll see the (somewhat) same schematic. It's just ONE component with 6 pins - just to be clear. The pin numbers are in the schematic. Pins 3 and 5 are not connected. You'll need just one 12V DC power supply (on the left). The supply on the right is the mains voltage coming out of the socket in your house, like the one you drew in your schematic on the right. I don't know where you caught the idea of a second power supply? \$\endgroup\$ – MartinF Jan 2 '19 at 14:15
  • \$\begingroup\$ Last question the + and - of the 230v should not meet right? Cause that can cuase a short circuit? \$\endgroup\$ – Delion Jan 2 '19 at 14:20
  • 1
    \$\begingroup\$ That is correct. But if that's really a question you're asking, I think you'd better buy a ready made solution and study some more electronics before you proceed! Be safe! \$\endgroup\$ – MartinF Jan 2 '19 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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