2
\$\begingroup\$

I am trying to detect mains with an ESP32. For that I am planning to use HCPL-3700

enter image description here

When I try to calculate the clearance for mains, I can see this in the KiCad calculator: enter image description here

But when I set 1.25mm as clearance in Kicad, I cannot use DIP chips anymore because they are closer than that

enter image description here

What am I doing wrong? What is the appropriate clearance for 220VAC with very low Amps?

\$\endgroup\$
5
  • \$\begingroup\$ But do you realize that since you have the 47k resistors, and current flowing through them, the voltage at the optocoupler inputs would not be 220VAC any more? It will be 220 VAC only up to the resistors. \$\endgroup\$
    – Justme
    Commented Sep 12, 2021 at 11:19
  • \$\begingroup\$ Thanks @DaveTweed! That is what I was missing. Do you want to post it as an answer? \$\endgroup\$ Commented Sep 12, 2021 at 11:29
  • 1
    \$\begingroup\$ Mains gives you spikes of up to 1500 V, which means you need 8 mm creepage and 4 mm clearance between the high voltage and low voltage tracks \$\endgroup\$
    – Neil_UK
    Commented Sep 12, 2021 at 11:41
  • 1
    \$\begingroup\$ 220V AC has peaks exceeding 300V so you're using the wrong row of the table. \$\endgroup\$
    – user16324
    Commented Sep 12, 2021 at 13:58
  • \$\begingroup\$ @user_1818839 but most PCBs I see connected to mains do not have that clearance \$\endgroup\$ Commented Sep 13, 2021 at 23:14

1 Answer 1

4
\$\begingroup\$

If you have soldermask on your board, you're in category B4, not B2.

Also, keep in mind that 220 VRMS means that you have peak voltages approaching 400 V, so you need to be looking at the next row in the table.

However, because of how the input series resistors and the optocoupler interact, the voltages at the pins of the chip are actually clamped to about ±7 V. The peak AC voltage only exists at the other ends of the resistors.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.