I am showing a method of using a CdS photoresistor to control a standard triac dimmer circuit that is wired to an electric drill motor (a universal motor). The CdS photoresistor is driven by an LED that is controlled by a PWM pin an an arduino microcontroller. This system provides a very easy way to control 120V AC devices with a single PWM pin, and not use any timing code or worry about zero-crossing of the AC power since this is done intrinsically in the circuit. It also offers true electrical isolation between the AC line voltage and microcontroller.