110VAC Computer Controlled Dimmer

I stumbled on several documents while searching the 'net for AC dimmer circuits. I copied those on to my hard drive and then compiled them into one Word97 document:

  DIMMER.DOC

Most of this information came from Tomi Engdahl's very informative electronics site.  The following link will take you to the light dimmer information on his site:

http://www.hut.fi/Misc/Electronics/docs/lights/lightdimmer.html

The following is the first part of the above document....

AC ZERO-CROSSING DETECTOR

This will output a brief high pulse at each zero-crossing, going high roughly 100uS before the crossing, and going low again about 250uS after the zero crossing, total 350uS. The bridge rectifier can be one of the potted variety or just built out of 1N4148s. You don't need power diodes. One of the little 4-pin mini-DIPs that Digi-Key sells will work OK.

If you need to shift the pulse slightly earlier, just hang a 200WV cap across R1 to shift the current into the 4N25 LED. A .01uF cap across R1 and a 10K for R2 makes the falling edge of the pulse roughly coincident with the actual zero crossing. Reducing R2 to around 5K will widen the the pulse to 250uS before and 250uS after the crossing, but going HIGHER in resistance won't do much other than to reduce the peak pulse level.

This circuit maintains 1500V+ isolation from the AC line, dependant on the V(iso) of the optocoupler used. For any digital or microprocessor designs, I'd strongly recommend the isolation unless you like smoke.

Well I've succeeded at getting a 16C84 microcontroller to dim a light bulb and a set of christmas lights. It took a while and a lot of research but it is done. Basically the microcontroller watches the AC line for the zero-crossing, delays a variable length of time (i.e. how much dim you want), and then fires an optoisolator/triac pair. Now have I a few other things to do and test before this project is completed:

  1. Isolate mains voltage from the microcontroller using an optoisolator (such as the 4N25 or equivalent listed above). I'll probaby just use the circuit above to see if it works. I've already blown a couple of pins on my 16C84's because I'm directly connected!
  2. Computer control (the actual goal we are shooting for here, right?). Seeing how time sensative the dimming is, I think I'll employ another microcontroller to "watch" the serial line from the computer while the other microcontoller is "watching" the AC sine wave and controlling the dimming. From the knowledge I have right now, that will give me 255 levels of dimming.

NOTES: Always remember that power (in watts) is equal to the voltage times the current. If you have the value any two of these variables, one can easily figure out the value of the third. The formula would look like this:

W (watts) = V (voltage) x A (current in amps)

Reutrn to Electronic Projects page

Return to HOME, Dorothy!

Created on 3/31/98 / Last modified on 12/15/07
by Drew Hickman / drew@hickmans.net