On Fri, 5 Sep 1997 09:07:33 BST Keith Dowsett writes: >Only drawback, 240V @ 10mA = 2.4W dissipated in the resistors >(assuming the >opto-isolator requires 10mA). > >I suggested (by e-mail) using a small capacitor to couple an >opto-isolator >to the mains. (along with a diode or three to protect the opto). This >dissipates hardly any power. > Couple things... Wouldn't the opto current (and output) be shifted by 90 degrees from the mains phase? We'd see the opto current drop to zero at positive and negative peaks of the AC. Since the opto LED voltage drop is so small compared with the mains voltage, we have an almost classic differentiator here (voltage source driving a capacitor with a current sensor). Also, as noted in Maxim application notes on transformerless power supplies,where they also do most of the voltage drop with a capacitor, there's a chance of plugging the thing in during a voltage peak resulting in a large near instantaneous change in voltage, resulting in near infinite current. They added a series resistor to limit this current. I STILL like just running a resistor from the transformer secondary to the INT pin. Did that on a 16c74A, and it works well. Again, I used negative edge triggering on the INT pin, which results in an interrupt a little before the negative zero cross. If positive edge triggering were used, we'd get an interrupt a little AFTER zero crossing. I used a timer to figure out where the positive zero crossing is based on the negative zero crossing. Harold