I'm new to the world of electronics and I have a quite simple question.

Can I control my light bulb with something like this schema?


Power source is regular AC 230V (~320Vrms) source.

Here is The MOC3052 data sheet.

I want to control this using Arduino but is the underlying principle OK or not?


Modification with respect to Spehro's comments: enter image description here

But now I do not know how to connect the TRIAC :)


Would this circuit be OK?

Now the optocoupler is switching the triac.

enter image description here

  • \$\begingroup\$ Please take a look at the circut at the top of p. 4 of the data sheet. \$\endgroup\$ May 29, 2014 at 22:21

2 Answers 2


The ground connection on the left should not be be there. The whole point of the optoisolator is to provide galvanic isolation between the low voltage and mains sides.

It's also conventional to have signal flow from left to right, so normally the schematic should show the switch at the left and the output on the right. That's a style thing, it does not affect the actual circuit.

The input circuit has a problem- you will destroy the LED as soon as the switch is depressed since there is no series current-limiting resistor.

The output circuit has problems as well, the MOC3042 is not designed to switch a lamp load, it's main purpose is to switch a larger triac. If the incandescent bulb in your schematic is 100W and you have calculated the 580 ohms as the resistance, that is the resistance when it is hot. When you first apply power, the resistance will be much less, perhaps 1/10 to 1/20 of the resistance at operating temperature. That means that the current at switch-on could be in the 5-10A range, which could be enough to damage the device (the only hint is that the repetitive current is limited to 1A in the datasheet, and that will certainly be exceeded at times with such a load).

Even if it survives the initial turn-on, the power dissipation rating will be exceeded. See "Figure 2 On State Characteristics", and the maximum dissipation rating Pd of 150mW - 1.76mW/°C- which implies you should keep current to maybe 25mA to allow for moderately high ambient temperatures.

A small triac (8-16A range) will provide a lot more beefy ratings for switching a serious load, and the MOC3042 can be used to switch it. And don't forget the input resistor.

  • \$\begingroup\$ Thanks for the valuable input @Spehro. I'we made modifications on the input side and added triac but now I do not know how to connect the triac... \$\endgroup\$
    – StjepanV
    May 29, 2014 at 19:28
  • \$\begingroup\$ See the suggested circuit in the data sheet is a good start, is there anything that isn't clear? \$\endgroup\$ May 29, 2014 at 19:32

This will burn out the driver on both sides of the opto and is not suitable for ANY tungsten light bulbs of any size except possibly a 3W bulb.

  • The use of common ground is also incorrect for safety reasons.

  • IR diode input must have a current limiting resistor for 1.5V input and thus 3.5V drop @ 10mA min or 330 Ohms in series.

  • most important failure is the Triac ON-STATE characteristics show voltage drop of 6V @ 1A implies power loss of 6Watts for a 330mW package rated at 25C. since self heating will occur, power dissipation must be derated minus 4.4mW per deg C above this 25C. So conservative limit of 100mW is implied and I suggest is practical steady state. Since ON-STATE curve implies a resistance almost linear at 6 Ohms your continuous load should not exceed 100mW =P=I^2*R or I= 130mA RMS max. This gives good thermal margin.

  • lastly all tungsten bulbs have a thermal resistance that is 10% of the nominal hot resistance meaning inrush currents will be 10x if switching occurs at random during peak voltage. So your calculated resistance of 580 Ohms is closer to 60 Ohms when at room temp.

Consider a 90W bulb (230V,580R) can momentarily peak at 900W if turned on at peak voltage meanwhile the 6 Ohm Triac will peak at 90 Watts loss and only capable of 330mW means the chip will pop or crack open.

This Opto Triac is only suited for driving Power Triac or very small power loads.

If you look at the efficiency of this Opto switch, you can use 5V*10mA=50mW DC drive to switch a load of 130mA*230Vac=30W, overall very good efficiency. This translates to only a 3 W tungsten bulb for inrush.

  • \$\begingroup\$ Jeez... My ignorance is breathtaking :( \$\endgroup\$
    – StjepanV
    May 29, 2014 at 19:59
  • \$\begingroup\$ The application notes of the chip show how to connect a triac \$\endgroup\$
    – user43594
    May 29, 2014 at 20:02
  • \$\begingroup\$ Glad to enlighten you. No pun intended. \$\endgroup\$
    – user43594
    May 29, 2014 at 23:54
  • \$\begingroup\$ Thanks for the input Klaus! I see that I have to study those elements really well and play with them first and then try to combine them :) \$\endgroup\$
    – StjepanV
    May 30, 2014 at 4:11

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.