The MOC3023 is an optoisolator to keep your BS2 separated from the triac. The Q6015L5 is the actual triac that I've used (although another triac with a different part number works, as long as it's a triac). The Control pin connects to a pin on the BS2, the Hot connects to power, and the Load connects to whatever you're controlling with the triac (make sure MT1 connects to the Hot side and MT2 connects to the Load side). The resistors carry very little current; I've used 1/4 watt resistors. Setting the control pin high turns it on, and pulling the control pin low turns it off.
I've used this to control the 120VAC mains electricity to control lights.
I do warn that if you do use this for higher-voltage/higher-amperage applications like 120VAC light control,·please follow all safety precautions to keep yourself from getting shocked and you stay within the maximum ratings (the Q6015L5 for example has a 15A rating, but I never controlled that much current on one triac)
While this circuit is intended for a BASIC Stamp, it really applies to any microcontroller so I am going to move it to the Sandbox where it is more appropriate. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Engineering
Comments
The MOC3023 is an optoisolator to keep your BS2 separated from the triac. The Q6015L5 is the actual triac that I've used (although another triac with a different part number works, as long as it's a triac). The Control pin connects to a pin on the BS2, the Hot connects to power, and the Load connects to whatever you're controlling with the triac (make sure MT1 connects to the Hot side and MT2 connects to the Load side). The resistors carry very little current; I've used 1/4 watt resistors. Setting the control pin high turns it on, and pulling the control pin low turns it off.
I've used this to control the 120VAC mains electricity to control lights.
I do warn that if you do use this for higher-voltage/higher-amperage applications like 120VAC light control,·please follow all safety precautions to keep yourself from getting shocked and you stay within the maximum ratings (the Q6015L5 for example has a 15A rating, but I never controlled that much current on one triac)
Hope this helps!
Post Edited (InSilico) : 1/3/2009 7:23:39 PM GMT
Thank you
While this circuit is intended for a BASIC Stamp, it really applies to any microcontroller so I am going to move it to the Sandbox where it is more appropriate. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering