Simple question to control AC from microcontroller

Thread Starter


Joined Sep 14, 2011
Hi, I have a simple question.

Can I control AC using optocoupler such as MOC3021...

...instead of the relay?

is there any other better idea to control the AC via µ-controller?


Joined May 11, 2009
Most often a relay is the best thing. Then it comes to the end they are least burdensome. But yes your IC can do the work that to


Joined Apr 24, 2011
Generally the answer is yes, that is what that part is designed to do. You can google the part number and get some suggested schemAtics.

But as this will probably be a direct line connected device is violates our terms of service so we can't give detailed advice. We want to keep the new people safe. <smile>