Getting started with a 240VAC PCB - Page 1
Forum section: electronics / beginners

author: John B
author_rank: Frequent Contributor
timestamp: April 22, 2022, 03:34:26 am
content: I have to create my own mains relay board, probably with 3 zones all isolated from one another. There will be a mains section with 240V in, going to a series of Omron G2R relays, another low voltage DC section which controls the relays, then an opto-isolated RS485 interface section.Is there a good set of documentation outlining sufficient isolation distances? I have found some information on creepage distances, but would like a thorough source to reference against.Also are there other techniques for ensuring the safety of the board? Each mains relay circuit would be fused for starters. I was thinking of things such as isolation slots under the relays, grounding the control section and having MOVs or TVS diodes on the power rails so that should 240V somehow track to the control section it would trip an earth fault circuit breaker.

author: strawberry
author_rank: Super Contributor
timestamp: April 22, 2022, 04:40:05 am
content: IF PCB is in sealed box, but cutouts wont hurt anyway.as good as relays and opto-isolators internal isolation can bedont forget GDT

author: Terry Bites
author_rank: Super Contributor
timestamp: April 22, 2022, 02:15:21 pm
content: Get to grips with creapage and clearance rules. It is good practice to mill a slot in the PCB under the relay.If you have a year and loads of cash to spare, then read IEC 60950-1 .If nothttps://3hp22p4vkie16x1dv48qurbo-wpengine.netdna-ssl.com/wp-content/uploads/2019/04/Clearance-and-Creepage-Dave-Scopelliti.pdfMake sure your traces can take the worst case current, ie less than the fuses in your project.https://www.4pcb.com/trace-width-calculator.htmlFuse each PCB hot side or switched line separately.www.eevblog.com/forum/beginners/pcb-design-and-mains-voltage-advice/

author: John B
author_rank: Frequent Contributor
timestamp: September 27, 2022, 09:11:40 am
content: So I've dusted off this project and made some headway. I would appreciate some feedback on what is good, bad and unnecessary. The traces in the centre consist of a common 24V source and then each relay coil has a lowside driver (on a separate board, connected via the header on the right).All these traces are surrounded by a copper pour top and bottom which is connected to mains earth. The idea is that should any mains voltages track over, it would touch mains earth before any isolated low voltage circuitry. This should then trip the RCD breaker.Each relay has an isolation slot, though I wonder if they are really going to do much in this case. I can't make them any wider due to structural reasons on the PCB, and they only slightly increase the creepage distance. For reference, on one of the pictures I have added a couple of measurements on the left hand side, ~10.3mm and ~13.3mm which seem to be very generous clearances according to what I've read.

author: Wolfram
author_rank: Frequent Contributor
timestamp: September 27, 2022, 09:44:27 am
content: Running the 240 V rail trace directly under the snubber resistors is not ideal. Having any trace directly in contact with the resistor body should be avoided, and especially so when the voltage between the resistor and the trace is significant. You could improve the situation somewhat by swapping the position of the resistor and capacitor in the snubber to have the resistor at the same potential as the trace under it, but there would still be transient voltages between the resistor body and the trace. Best is to remove the trace altogether, and see if you can increase the cross-section on the bottom layer if required, or increase the copper thickness to compensate. You could also reroute the main 240 V distribution to not pass under the snubbers, by moving the isolation slot closer to the coil terminals. I would connect the relay NC terminal to the relay common, and connnect the load to the NO contact instead of the common. This does not have any functional impact on the circuit, and it would give you more effective cross-section for routing the 240 V common.

author: mariush
author_rank: Super Contributor
timestamp: September 27, 2022, 10:06:26 am
content: I don't see any freewheeling diodes for the relays.. I suppose they could be on the other board.Layout wise, the two left most relays would be "weaker" due to thinner traces , and I'd be a bit concerned about pcb flexing and bending due to too much cutouts and the weight of the relays.I'd also consider using 2 2x10 headers instead of a less commonly used 2x16, could also help with rigidity.Yeah, the resistors should be at the very least further away from the pcb, maybe use some ferrite rings or some ceramic/plastic spacers to have resistor sitting above the pcb?

author: John B
author_rank: Frequent Contributor
timestamp: September 27, 2022, 10:17:04 pm
content: You can't tell by the image, but I duplicated the traces of the common 240V input on the bottom layer as well to use the space and lower the resistance. I can remove the top trace running under the resistors and try to fill out the bottom plane more. What kind of clearances are safe on the mains side, between the input, switched loads and snubber networks? If I'm reading the tables right, I'm only seeing a clearance of around 2.5mm for external exposed conductors. Traces covered in solder mask seem to be an order of magnitude smaller clearance, but I don't even need to push it that low. I could set the pad clearances to around 5mm and still fill out more copper on the bottom plane.All the freewheeling diodes are on the driver board. I deliberately kept this relay board to the bare minimum of parts as I'll end up with 5x PCBs and would like the ability to change the driver board.

author: John B
author_rank: Frequent Contributor
timestamp: September 27, 2022, 10:28:32 pm
content: Plus I can use a wider footprint for the resistors, which will give a bit more space to add copper, if necessary. Lastly would it be a good idea to go for a 2mm PCB rather than 1.6mm due to the cutouts? The engineering fee is a fair bit more just to go for 2mm PCBs. Alternatively I can add a few more mounting points, I can add them wherever there's space as I'll have to mount the PCB to another mounting board where I can drill the holes as required.

author: Siwastaja
author_rank: Super Contributor
timestamp: September 29, 2022, 05:42:42 am
content: Regarding coil freewheeling, just use bidirectional TVS, with working voltage just above relay supply voltage, and maximum clamping voltage well below the transistor maximum voltage (Vds_max), it's the simplest and most effective solution by far. For example with 12V relay, SMAJ15CA and 30Vds_max MOSFET does the job.A diode slows down the contact release too much, causing excessive sparking and wear of contacts so the relay performs worse than its datasheet lifetime ratings. And any other solution than bidirectional TVS is a multi-component solution and/or requires some calculation.

author: John B
author_rank: Frequent Contributor
timestamp: September 29, 2022, 06:36:47 am
content: I was going to PWM the coils to save on power, down to approx 70% of their full current. At 490 or 960Hz. As such I was using schottky diodes. I imagine a TVS would be unsuitable for this?