Isolation in AC lines on PCB - Page 1
Forum section: electronics / projects

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 07, 2020, 06:19:38 pm
content: Hello i am laying out a pcb and i have a question about proper isolation between the traces. Below i attached a screenshot of my current layout.The distances i measured (from top to bottom) are : 4.856 mm and 5 mm. I live in Europe so i am working with 220V.J1 is the input connector (L and N) , XF1 a 200 mA fuse , XF3 a thermal fuse , V1 a MOV.K1 and K2 are 2 relays i will be using. On top the AC1 module is an AC-DC converter. (HKL-20M05)The thickness of the traces is 1.5mm but the current draw of my circuit will 1.5 A max with a typical 800-1000 mA consumption.My questions :~Will there be a problem with the trace on the bottom (N) going in parallel with the one that goes to the relays (L)?~Is the distance between L and N sufficient ?any suggestion would be greatly appreciated since this is my first time designing a mains board.Thank you so much.

author: TimNJ
author_rank: Super Contributor
timestamp: April 07, 2020, 06:36:00 pm
content: This depends on some environmental characteristics like expected surface contamination, comparative tracking index (CTI) of the PCB material, altitude, etc.For sealed medical power supplies, indoor use, the requirements for line-to-neutral spacing is 2.96mm, for altitudes up to 5000m. If you're measuring around 5mm, that sounds fine. I'm just referencing the medical standard to provide a frame of reference. If used in an environment where dust or humidity is more likely to get involved, add margin. You can also consider potting or conformal coating, but it looks like you have plenty of space to work with.

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 07, 2020, 06:58:26 pm
content: Its a board to replace my recently fried thermostat (my bad). It will be used indoors and enclosed (not fully since i need slots to get the ambient temperature). Another problem i have is clearance between low power stuff (5 Volt traces and components) and mains AC). Will the 3 mm clearance(lets say 4 to be sure) suffice?

author: TimNJ
author_rank: Super Contributor
timestamp: April 07, 2020, 10:11:52 pm
content: Is the 5V supply in any way user accessible?Sounds like no. In this case, the standard 3-4mm clearance is okay. You should use a non-conductive enclosure (plastic). If you need to use metal, then you must earth the enclosure.A couple other things to keep in mind...Where is the 5V rail coming from? Are you using a isolated converter (with a transformer) or is the 5V rail from a simple non-isolated buck converter directly off the mains?If the design is not isolated, then you still need to be careful about any controls (knobs or buttons) that are user-facing. Plastic case is good, but be careful about potentiometer shafts, switch actuators, etc. If they are metallic, there may be a fault condition that puts the users in a dangerous situation.If you are using an isolated design with a transformer, and assuming all controls are on the isolated side of the transformer, then you don't have to worry about the above. However, youdoneed to be concerned with the level of isolation provided by your isolated AC/DC converter. In this case, it's best to just buy an off the shelf PCB module. But, even with a module, you still need to make sure you have adequate spacing between primary and secondary connections. In this case, most safety standards require at least 5-6mm. Most stringent medical standards need 8mm.

author: Nusa
author_rank: Super Contributor
timestamp: April 07, 2020, 10:55:09 pm
content: The issue I see is not the lines in parallel, but the point where you cross L and N. At that spot they are separated only by the thickness of the board.In this case you can easily avoid this simply by running the trace to the relays over the top from the thermal fuse instead of coming from the MOV pin.

author: TimNJ
author_rank: Super Contributor
timestamp: April 08, 2020, 02:03:10 am
content: Quote from: ChrisGreece52 on April 07, 2020, 06:19:38 pmWhoops. I missed this. This appears to be an isolated module, so you can forget about some of the things I mentioned (but maybe still keep them in mind, in general!)Quote from: Nusa on April 07, 2020, 10:55:09 pmWhere do L and N cross on this PCB? I only see traces on one side of the PCB in the image. Regardless, it's no problem to run L and N on top of each other, on opposite sides of the board. The dielectric strength of FR-4 will easily hold off 30-40KV, depending on PCB thickness. However, you should keep in mind creepage around the edge of the board. That is, if there is an L trace against the edge of the PCB, and an N trace on the opposite side of the board, also on the edge, then the creepage around the edge of the board is only the PCB thickness.

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 08, 2020, 02:30:46 am
content: Thanks for your time. There is no way to earth the board (the wires that come through are L , N , one wire going to the water heater and one to the oil burner).The AC input as shown in the picture passes through one 200mA fuse and one thermal fuse (with a varistor 240V in parallel).I also added output protection to ensure smooth operationAs for the relays that trigger the outputs i added optocouplers to their signal lines.So i would hope the 4 buttons and the rotary encoder used for user feedback are isolated.I would also like to thank you for the routing advice. I scrapped the layout since posting because i was not happy with the traces going back and forth and near low voltage traces.I will run the traces again (because Nusa was right the L and N traces crossed (N on the bottom layer and L on the top) ill keep in mind to leave a 5-6 mm gap from the edge of the board and the AC lines.EDIT : Forgot to mention that ill print a case for it (PLA to be exact) with a wall thickness of about 3mm and a plate for the buttons so the only exposed electronics component would be the rotary encoder (which will get a cap probably)Thank you. Ill post an updated picture of the board.

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 08, 2020, 03:10:13 am
content: Here is the new traces and layout . I tried keeping the distances above 4mm but still on the vertical top trace (N)i could not. I only got 3.9mm between the edge of the trace and the pad on the fuse and on the converter. Attached screenshot below.EDIT : Finished the layout... i think ... i think i did my best especially considering that i needed the board to be small.Anyway here is the board layed out . I also marked with a circle (on the relay K1) about 7mms from the connection to the water heater that connects to L when the relay is on.

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 09, 2020, 10:26:12 am
content: Due to some changes in components i changed the layout of the board once again.I have a question about the soldermask insulation. The bottom N trace is 2.9 mm away from a relay contact. That is the NC contact that would be live during most of the time.Edit : I read the conversation above and got my answer.

author: Nusa
author_rank: Super Contributor
timestamp: April 09, 2020, 03:52:25 pm
content: If you can swap L and N on the connector, you could avoid the question entirely. Not that the answer isn't worth knowing.Are you measuring from the center of the pin rather than the nearest point of the through-hole?

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 09, 2020, 04:01:37 pm
content: All measurements you see on the pins are from the center of each pin.Also despite of the answer being simple i had not though of it despite busting my head for a solution. Thank you.

author: Heartbreaker
author_rank: Unknown
timestamp: April 09, 2020, 04:10:09 pm
content: Quote from: ChrisGreece52 on April 09, 2020, 10:26:12 amThere is also an issue with the distance between NO on one relay to NC on the other. When one relay is engaged and the other is not the full line voltage spans this distance through the load(s) connected at the connectors.

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 09, 2020, 04:24:32 pm
content: Did not see that till now ... Even with the cutout i added there is a 4.5mm gap from the center of each pin. (NO and NC)Edit : Made some adjustments. The gap from the relay pins increased to 5.5mm.Edit 2 : Attached a screenshot of the new layout. The measurements are taken from the edge of the pad this time around.

author: free_electron
author_rank: Super Contributor
timestamp: April 09, 2020, 04:56:10 pm
content: Those kind of board cutouts won't work ... they are not millable ( the corners cannot be created, you need rounded corners .non-plated cutouts are milled using either a 1mm or a 2 mm edge router bit. draw those as a line with 1mm or 2mm width and then convert the line into a board cutout.

author: ChrisGreece52
author_rank: Frequent Contributor
timestamp: April 09, 2020, 05:06:36 pm
content: Oh ok got it ... i would prefer it as well since the polygon shapes did not come out pretty