Controlling AC devices using ATmega8

atmegaavrthyristortriac

I have an microcontroller ATmega8, TRIAC MOC3083 and thyristor M166P. I need to develop and device which will turn on/off lamp(220V).

But while I'm developing I don't want work with AC 220V now, DC 12/5V will be fine for me.

How can I connect these parts on the breadboard to be able debug my code? Please, show me a correct circuit.

Best Answer

Just replace the MOC3083 with a visible LED (pin 1 is + pin 2 is -). Unless your drive circuit is very low voltage, the LED will indicate when the triac should be on.

http://www.fairchildsemi.com/ds/MO/MOC3083M.pdf