Dale, >Hi, >I'm working on a light controller for my yard lights. My old power supply >is a nice 12VAC transformer with a timer and photocell that lets you >select several modes, including on all night, on for 1-12 hours after >dusk, always off, or always on. The new lights came with a new xformer >but no fancy stuff, just an on/off mechanical timer. Unfortunately it has >no indication of its current rating and it's running pretty hot - I'd like >to use the new transformer but don't want to lose all the cool features. >So of course I'm building a nice PIC-controlled add-on! 8-) I plan to >add the same thing to the deck lights in back of the house once I get it >working. Do you want to control each lamp separately or all at once ? >My question relates to how to switch the 12VAC to the lights on and off. >I'm thinking a sensitive-gate (logic) TRIAC on each leg of the AC line to >the lights, with both gates controlled by the PIC. From the looks of what >I have seen in various Web resources about TRIACs, it looks like I could >use one instead of two, but it just seems to me that for safety's sake >using two would be like using a DPST switch and completely remove any >potential from the lights when turned off. Or should I even worry about >that? >Ebmarrassingly, I have never used a TRIAC before, but it looks from the >data sheet like I can turn the AC on and off with nothing more than a >logic HI to the gate(s). Am I reading that right? Is there a better way >to do this? I guess I could use a SSR, but a couple of TRIACs will be a >lot cheaper and a LOT smaller. >Comments? Suggestions? Am I making this harder than it needs to be? Turning on and off with triac is easy but if you want to dim it Then you need to detect zero crossing on each phase and call Delay up to 7.3ms >Dale Andre Abelian -- "Curiosity is the very basis of education and if you tell me that curiosity killed the cat, I say only the cat died nobly." - Arnold Edinborough -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.