# HCPL3700 - 220V sensing circuit

I want to use HCPL3700 optocoupler for sensing 220V (line). I design a circuit but I want to ask some questions.

• HCPL3700 is an open-collector output so I pull-up Vout. In AC voltage sensing some people says HCPL3700 is halted on zero-cross so I add a cap (C30) is this (10uF) enough for zero-cross pulse filtering?

• I add a resistor (R29) (100k) to the input of HCPL3700 for 200V threshold is this ok?

thanks

• R29 is unlikely to have a voltage rating of the peak of your mains voltage, $220 \sqrt 2$. It should be made up of two or more series resistors. – Transistor Apr 22 '19 at 15:41
• C30 will not work. When in pull-up it will charge the 10uF cap slowly via R28, a 10k resistor. When in pull down it will pull down almost instantaneously, shorting any voltage on the capacitor. Destructive. I think you need a 100k series resistor before C30 to fix both problems. – scorpdaddy Apr 22 '19 at 18:06

Yes, not only is R29 OK, I think it might be mandatory. Take a look at the graph below from the data sheet. It indicates that the value of the series resistor affects the detector's switching threshold. It's hard to tell from the graph which curve to use. Suggest you use the 100K and then measure the voltage where the detector changes state. Tune the value of R29 until you're happy with the voltage threshold.

(Image source: Figure 8 from HCPL3700 datasheet)

• The answer should also address the asymmetric pull up/down and the effect on C30 and the signal ISO_INT. – scorpdaddy Apr 22 '19 at 18:07

This question has already been answered here: How to sense AC with a 5V Microcontroller