Now we can control DC power, what about controlling AC ? The SCR almost gives us what we want, except that since it acts like a diode it rectifies the voltage. What about putting a pair of SCRs together with their polarities reversed ? It turns out that this is the right approach, such a device is known as a TRIAC. The matched reversed SCRs means that a TRIAC will conduct current in both directions when it is turned on. In other respects a TRIAC behaves just like an SCR. This means that if it is being used to control AC power and the control signal turns it off, the current will cease to flow when the source current drops to zero. The current drops to zero 120 times per second for AC (or 100 times for 50 Hz current), so the voltage out of the TRIAC will drop quickly (but not immediately) when the control signal turns it off.
If you are like me, the idea of getting AC power that close to your computers logic level circuitry will make your nervous. That is why in my example TRIAC circuit (Figure 3), the logic signal is optically isolated from the AC supply, the optical isolator output drives the TRIAC control input.
For controlling inductive AC loads, we still need to consider that huge voltage spike we will get when the magnetic field collapses when power is switched off. Because of the alternating current, we don't use a diode to do the shunting, instead we use a capacitor.