someone said: > > the safest way is to use an opto-coupler. > > I've heard this topic sooo many time it definitely bored me. :( The isolation tehnique ( any one would be ) is not necessary if the final product it's a stand alone ( or it's communicating via optoisolated i2c, RS485, Rs232 etc ). It's also not necessary even if the product have a LCD and a keypad and *all* isolation requirements to the operator's hands and to other commands are fulfilled ( ie plastic chasis, isolated buttons, optocouplers or transformers for other special inter-modules connections etc. ) It's also not necessary isolation to triacs or tyristors gates driving, but sometime boosting it's required. Think just a little what you'll do when 10 or 20 triacs must be driven. For mains zero cross detection, I'm using succesfully an external schmitd trigger gate (cmos, CD4093 ) input directly to main ( 220V -15%...+20% ) via a 220K resistor and one protective zenner ( 5V1, 4093 supply at 5V ) to ground from the same input. Optionally a 10nF...100nF can be used for filtering, but usually is not necessary. For the system I've described, conecting the system ground to the neutral or to phase does not change anything in normal functioning conditions. And this one was tested. best regards, Vasile -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu