On Thu, 4 Sep 1997 10:38:26 -0500 Fred Thompson writes: >Consider using an Opto Isolator. You could put series resistors on >both >sides of the LED, and then the Sensor side goes to your logic >isolating >the logic from the mains. Also putting a zener and diode circuit in >parallel with your LED could bring the "on" time closer to the zero >line >without frying the LED. > There are optoisolators with two LEDs in inverse parallel for AC operation listed in the Digi-Key catalog. Connecting the input of one of these to the line through a limiting resistor, the output should be mostly on, with the center of the off period corresponding reasonably closely to the zero crossing point (subject to the balance between LEDs, etc). If the project uses a line0frequency transformer power supply, the isolated AC from the secondary of the transformer should be close in phase to the line.