Electronic – Triac and Optoisolator not turning on lightbulb

microcontrollertriac

I'm trying to switch on a lamp using a microcontroller. I've wired the schematic below using a 5v power supply instead of the microcontroller for now and the first time I turned on the lamp the light bulb flashed quickly and would not come back on or flash again. Note: I am using an MOC3010 instead of a MOC3081.

enter image description here

This is based off a schematic below I found online that was said to be for switching on a lightbulb

enter image description here

Did I miss something completely? Why isn't mine working correctly?

Best Answer

Are you sure whatever is driving the MOC3010 can sink 15 mA? The MOC3010 is only guaranteed to switch at 15 mA forward current through the LED. The optriac may switch at lower forward currents, but the apparently Motorola bins those parts by forward current sensitivity, and the 3010 is the lowest sensitivity.

enter image description here

IFT = LED Trigger Current, Current Required to Latch Output

With a footnote:

All devices are guaranteed to trigger at an IF value less than or equal to max IFT. Therefore, recommended operating IFlies between max 3.IFT(15 mA for MOC3010, 10 mA for MOC3011, 5 mA for MOC3012) and absolute max IF(60 mA).

What is driving the LED? Can you measure the voltage on the IO line going to the optocoupler?

It's also worth noting that even with the microcontroller completely out of the picture, you'll only get 10 mA forward current with a 330Ω resistor (\$5V - 1.5V_{F} = 3.5V\$ across the resistor. \$\frac{3.5V}{330} = ~10.6 mA\$).