This isolated shield for controlling a triac was found in the March 1999 issue of Electronics Now magazine. The circuit is suitable for PIC microcontrollers, but it can be used on others with a 5 V output.