Sean Alcorn - Avion Sydney wrote: > > > Well, I don't think you will be able to > > declare it a good design because that circuit > > connects the AC mains direct to a PIC pin > > via a resistor!!! > > Are you referring to the power supply, the zero cross detect or both? The zero cross detect, the power supply is a capacitve reactance type. > > There's no way you can convince me it's smart > > to couple AC mains into a PIC pin with nothing > > more than one resistor to protect the PIC. > > I wasn't trying to convince you, I was asking opinions. And they seem > to be widely varied. I know. It's an expression of speech. :o) Yes opinions vary, we have been discussing this for months (years?) now on the list with wide varying opinions. > > The cost of a capacitor and zener etc are only > > a few cents. > > Again, on the zero cross detect? How would you configure it? Doesn't > the existing Zener clamp the maximum voltage at 5.6 Volts? Also, the > minimum voltage is zero volts? Can I ask you Roman, when is the neutral > ever more than 0 volts? The PIC doesn't have a zener. It has clamp diodes, very different story. :o) In the circuit you posted (yes I know it's not your circuit, sorry if I gave that impression) the circuit is live to AC mains active, and the Xc supply and zero cross detect are driven from the neutral. This has EXACTLY the same effect as ac mains is, well, ac. :o) The PIC pin is connected to the AC mains full potential via just one series resistor. My reasons for an external zener; * much larger silicon and testable * can be physically away from PIC * WILL clamp 5.1v, even fast spikes And a capacitor across the zener will give some spike protection for negative spikes and reduce zener surge current for all spikes + and -. These two parts cost a few cents and go some way to preventing the AC mains killing the PIC. :o) I've changed the topic as I know lots of people have their own ideas and may want to add... Russell has posted a long and detailed post on the topic recently. -Roman -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics