Mains PCB design questions - Page 1
Forum section: electronics / beginners

author: exal
author_rank: Newbie
timestamp: June 30, 2021, 06:32:15 pm
content: Hello!I am trying to help fix a friend's old waffle iron where the thermostat completely broke down. While doing so we decided to upgrade the iron and add a lcd display with a rotary encoder for navigation. This is the design I came up with:From that I made this pcb:The idea of this circuit is to use the arduino as the brains of the system measuring the temperature of the iron with a PT-100 and the Max-31865. The arduino will act as a PID controller (probably overkill, but it's fun to play around with) and determine the power to the heating elements in the waffle iron. The temperature will be set by the user with the encoder and that information will be displayed on the lcd display. With this circuit I would be able to controll the power to the waffle iron with either phase control or zero crossing, although as I've understood it, zero crossing is best if the response of the system is slow which a heater is. The iron draws around 9A when on full power so all components on the mains side should be able to handle at least 10A. Now that is the part which I am not to confortable with: the high voltage. Now made the trace thickness of the power carrying lines 4mm and I also added traces on both bottom and top layer. Will this be enough of should I add wires/solder (order without soldermask) once I get the pcb?I am also wondering about the clearance. Looking atthisfor 330Vpk it shows an external clearance of 2.5mm and coated clearance of 0.8mm. Does that mean that between pads, which are not coated, there needs to be 2.5mm clearance between them, and between traces only 0.8mm?The last thing I'm worried about is the cooling of the TRIAC. Now looking in thedatasheet for ACST1210it shows it will generate 11W of heat at 10A. It's thermal mass is 1.5 C/W and the heatsink Iselectedhas a thermal mass of 3.7 C/W without a fan. Now am I right to assume that (1.5 + 3.7) * 11 + 20 ≈ 80C so that should be good?Any other suggestions/remarks are also welcome! Mostly I just want to make sure I am making a temperature controllor and not a smoke generator

author: M4trix
author_rank: Frequent Contributor
timestamp: June 30, 2021, 07:41:13 pm
content: Hi,Probably that should pass but my OCD suggests to mill a 2-3mm wide slot under the optocouplers and at least 3mm clearance between the pads of the mains connector. Use a wider connector.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 30, 2021, 07:52:35 pm
content: J1 & J2 are not fit for mains voltage because of too small of a clearance.Don't put any zone under the optocoupler to increase clearance. Depending on your local rules and the "contamination level" you want to design for, you may even have to add isolation slots under the opto couplers.Swap the two AC connections of your power supply, again to increase the creepage distance. More clearance (up to a few cm) is almost always better for AC voltage.When designing PCB's with mains voltage you should first make yourself familiar with the ruls for such things.

author: Jeroen3
author_rank: Super Contributor
timestamp: June 30, 2021, 07:58:35 pm
content: The opto's will be fine, try to not extend the plane under them or the psu, no need.Will the board get dirty?The triac though... you'd want the clearance there, so shrink those thick tracks a bit. And add somesnubber, since there will be some inductance somewhere always. Mind the ratings on the parts for the snubber.The heatsink you picked is probably fine, I've used that one before, it tops at 15 Watts at room temp free air. Doesn't fit on your board there though. What about enclosure?The heatsink will be live unless you fit insulating material.The connectors looks insufficient, especially clearance. Find some Phoenix MSTB style or similar cagescrewthings.(you know, where the screw pulls up a cage with the wire instead of the screw pushing down into the copper)

author: Neilm
author_rank: Super Contributor
timestamp: July 01, 2021, 07:00:05 pm
content: Personally, I would use 3 mm as a minimum distance between Live and Neutral. More is better. Some standards will allow less protection after the fuse so you could halve that if needed (if not needed, don't). Given that, the mains connectors do not look suitable.The website you linked talks about coatings without ever saying what a coating is. A coating is NOT resist. Solder resisit is easy to damage by poor handling, either during manufacture or assembly. I suspect that the coating they are referring to is a properly qualified and applied conformal coat. This is expensive and / or a pain to do.I do have a comment on the layout - the trace from the fuse to U2 is passing directly under the fuse. Without knowing what sort of fuse you have used, you may have have clearance issues due to this if it opens. I have seen similar situations in inductive circuits punch holes through dipped components similar to thermal fuses.Also - your schematic is showing the Safety Earth symbol. Is this connected to Earth? if so how as I don't see a connector? The reason for asking is that if it is floating, it will float to an unknown level and the user could get a capacitive shock from the control unless you are sure it is suitable insulated.In regards trace widths, have a look at this linkhttps://www.miscel.dk/MiscEl/miscel.html. It has a calculator that will tell you the temperature rise for traces depending on the copper thickness and width. It also has a lot of other calculators that I have found useful over the years

author: exal
author_rank: Newbie
timestamp: July 01, 2021, 08:14:21 pm
content: Quote from: Jeroen3 on June 30, 2021, 07:58:35 pmQuote from: Doctorandus_P on June 30, 2021, 07:52:35 pmThe reason I had the ground plane there was because some of the opto pins are connected to ground. But should I instead just make a trace for the ground connection to the rest of the ground plane?Quote from: Jeroen3 on June 30, 2021, 07:58:35 pmIf I shrink the tracks will they still be able to handle the current? Also not sure if snubber is needed since it says in the datasheet:Quoteand seeing as the load will (mostly) be resistive should it not be fine without? Regarding the heatsink I was thinking that I should add an insulating layer between the triac and heatsink and then ground the heatsink to earth. I was thinking of putting it all into a box with a hole for the heatsink. The connectors going into the box (and out to the waffle iron) will have an earth cable.Quote from: Jeroen3 on June 30, 2021, 07:58:35 pmQuote from: Doctorandus_P on June 30, 2021, 07:52:35 pmQuote from: M4trix on June 30, 2021, 07:41:13 pmYeah I was also sceptical to those connecters but they were rated for 250V. But I guess I will be changing them to something more sturdy. Maybethiswill suffice?Also thanks for the feedback!

author: SteveyG
author_rank: Unknown
timestamp: July 01, 2021, 08:26:34 pm
content: Watch out for R4, you're burning over 5W!

author: exal
author_rank: Newbie
timestamp: July 01, 2021, 08:50:00 pm
content: Quote from: Neilm on July 01, 2021, 07:00:05 pmYeah wasn't sure about the coating.Will the triac though be fine? If I meassure the distance between the traces as I have them now it's only ~1.5mm but it will be hard to spread the legs more?Quote from: Neilm on July 01, 2021, 07:00:05 pmDidn't think about that. Will check that, thanks!Quote from: Neilm on July 01, 2021, 07:00:05 pmI thought protective earth was different, but yeah the power supply is an insulating power supply so the low voltage side should be isolated from mains. As I mention before, the wires going into the box will have earth. Should I connect this to ground on the low voltage side?Quote from: SteveyG on July 01, 2021, 08:26:34 pmTrue thanks for pointing it out!