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.
This is based off a schematic below I found online that was said to be for switching on a lightbulb
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.
With a footnote:
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\$).