enter image description here

I was wondering how I need to handle clearance and creepage in this scenario. It's AC mains line detection circuit. I need to achieve around 2.5mm creepage.

  • \$\begingroup\$ Why do you have a problem achieving this requirement? \$\endgroup\$
    – Andy aka
    Commented Jun 4, 2020 at 8:49
  • \$\begingroup\$ I was wondering if the sum of the creepage between the pads of R2 and the creepage between the pads of U2 need to be bigger as 2.5 aswell. Could the voltage arc across the resistor? Is there any rule for that? \$\endgroup\$ Commented Jun 4, 2020 at 9:09
  • \$\begingroup\$ Rules depend on what you are trying to aim for in terms of product certification. \$\endgroup\$
    – Andy aka
    Commented Jun 4, 2020 at 9:26

1 Answer 1


I also posted the question on reddit and got the answer there:

So a few things before the actual answer:

What's the mains voltage? 2.5mm sounds like 240V if I'm not mistaken. (correct)

In situations like this, you can increase creepage distance by adding a board cutout (slot) between the pins. You can also reduce creepage requirements by adding a conformal coating.

It would be weird if the datasheet of a component intended for AC mains use violated clearance/creepage requirements, and made no mention of the above, right? That usually means something else is going on.

In this case (real answer now) you are looking in the wrong place. Because you have two LEDs that are anti-parallel, one of them will always be on. That means the voltage between the pins is not 120/240/whatever but just the forward voltage drop of the LED. You don't have mains voltage between the pins, you have 1.4V (per the datasheet). So that spacing is perfectly fine.

What you do need to consider is that nearly all of that voltage is actually dropped across R2. That is where you need to worry about creepage, and in this case the two SMT pads of that resistor do look way too close together. I also do not see any current limiting, meaning that if that resistor fails short or a short otherwise develops, you're in for a bad time.

In this case just choose a larger resistor package to maintain the requisite spacing requirements. You can also add a slot between the resistor pads to improve the situation slightly, but you'll need to upsize either way as the resistor body itself still provides a bridge.

220k is also quite a large value, make sure it's enough to actually turn the output on sufficiently. That's 1mA at 240 which is probably enough but double check. And of course power rating and all that which you're already aware of.

Credit: u/happyhappypeelpeel


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.