On Thu, 10 Dec 1998 12:37:21 -0700, Toby Stensland wrote: >I would like to control how much power is delivered to some Christmas lights, using a PIC12C671. Initially, I was going to detect AC zero crossings, wait for my desired phase delay, then fire an SCR (phase control, repeat every half cycle). The only problem with this is that I am a PIC newbie and would rather find a method with simpler programming. > >My question is are there simpler ways to control the power to my christmas lights with a PIC? The reason I ask, is that in our lab there is a very simple device to vary the power delivered to a AC motor (universal vacuum type motor). It consists only of a potentiometer (100k, to select voltage), a red disc capacitor marked V130LA10A, a orange capacitor inductor looking thing marked .22-200 DC, a small resistor looking thing (diode maybe?), and a triac (SK3659 or MAC15-8). I don't know how this works, but whatever it does, must not require the timing that I would need for phase-control. Nope, sorry to disappoint. But it DOES use the timing you would need for your project. The diode thing is really a DIAC which is really kind of a voltage controlled switch. Above a certain voltage it turns on. It's also bi-directional. The DIAC will behave the same regardless of which way you supply the voltage. The circuit is setup so that as the voltage from the AC rises, it eventually hits a point where the DIAC is triggered on. This in turn fires the TRIAC for the rest of the cycle, after which point the Triac turns itself off, and the whole thing starts over on the opposite edge of the cycle. The variable resistor is used to change the voltage across the DIAC so that a higher or lower line voltage is needed to trigger the DIAC. This in turn cause the DIAC to trigger later to earlier in the cycle, for a dimmer to brighter light. So the timing is all built in, using the level of the AC cycle as the trigger point/timing -- everything happens 120 times a second. Capacitors and inductors are thrown in to keep the whole unit from acting too much like a wide band AM noise generator. (Just try using an AM radio near one of these things!) -Zonn <><><><><><><><><><><><><><><><><><><><><><><><><><><>< ------ ___ Member of A.A.C.S.: |---- | ( ) Association for Artistically / / ( () ) Challenged Signatures / / //\\ // (__) / ---/ // \\ //\\ // zonn @ zonn . com -------| // \\/