Project:AC Intensity Controller
I have been working on a circuit to control the brightness of an AC lamp, for the AlarmClock project.
The circuit converts the AC sine wave in to a square wave, and uses this to detect whenever the amplitude of the AC wave falls to zero (the "zero-cross"). At that point the microcontroller switches off the circuit, and at a point 0–10 milliseconds later switches the circuit back on. This creates the illusion of reduced brightness.
To detect the zero-crossing a zener LED (actually a diode and 3 LEDs) converts the AC waveform in to a square wave, which is passed in to an optoisolator (e.g. the CNY17-3) before being passed to the microcontroller.
An otpocoupler (e.g. the K3020P) and TRIAC (e.g. BTB06-600T) is used to switch the circuit output.
This circuit has been designed for incandescent bulbs, unfortunately these are now obsolete and are in the process of being outlawed. It would also work on a custom array of LEDs powered directly from mains (but probably not an LED bulb). Regular compact fluorescent lamps are unsuitable, however dimmable CFLs may or may not be.
There are also potential non-lighting applications. For example, to potentially add rudimentary temperature control to a soldering iron.