Jim Ruxton wrote: > > Hi > I'm designing a PIC based A.C. motor controller and am looking for a > reliable and safe mains zero crossing detector. I've seen the scheme of > putting a large (ie. 5 Mohm resistor in series with a port pin. This > means I'd have to have the hot or neurtral line as my PIC ground. This > makes me nervous. I was wondering if anyone has used a better scheme > with success. I was thinking perhaps of using an opto isolator but if > this needs 10ma to turn on it won't be very accurate. Maybe I need a > common emitter transistor driving the opto isolator with the emitter at > the hot side and the base being driven through a resistor by the > neutral. Any ideas? Thanks!! > Jim Jim, We do something very similar to this already. Use TWO (2) resistors in series (1 Mohm each) from AC hot to a PIC schmitt/capture input, and from AC neutral to ground. UL (Underwriters Laboratory) likes that because it passes hipot (high-potential) testing even if one of the resistors shorts out. This requires careful PCB layout and even more care when testing due to the high voltage on the PCB. Regards, Kirby Cartwright