Connecting AC mains power to a DC circuit board is a very serious matter because doing so in a wrong way can electrocute a person or start a fire. In the U.S.A., making electrical connections to AC mains power is covered by a set of standards called the National Electric Code to insure no electrocution or fire results
from operating an AC mains powered device.
However, because I am not an electrician, I am not schooled in all aspects of the National Electric Code.
I am designing a DC-powered relay to switch on/off a heater that runs 10A at AC mains voltage (120VAC). My opinion is that AC mains voltage should not appear on a PCB for the situation that the device stops working and a 9 year old boy starts to try to fix it. Let us also assume the 9-year-old has not been schooled in safely working with AC mains voltage.
In other words, I recommend that all conductors carrying AC mains voltage, or that can possibly carry AC mains voltage only be connected to other conductors inside a metal box with a screwed-on lid that (meaning the metal box) is wired to AC ground.
This way, flexing a wire at AC mains voltage will either (a) connect AC power to AC ground if it is a “hot” wire, or (b) cause the metal box to be connected to AC mains ground if the wire is the “return” one, or © cause the AC “hot” wire to short with the AC “return” wire.
Not sure how any of the AC wires inside the metal box might possibly flex. I suppose one must make sure strain relief is applied to all of them where they enter the box if the machine being powered is portable.
Case (a) would cause a short circuit, making the AC circuit breaker open. Case (b) would cause a dangerous situation with the metal box chassis grounded to AC ground. Case © would also cause a short circuit in the AC line that would trip the AC circuit breaker.
Cases (a) and © would immediately remove AC power from the heater. I think that only case (b) might possibly electrocute a person when that person is touching the metal box. But I don’t know when that might possibly happen.
So my DC control circuit will only run 12VDC control wires into the metal box to switch on/off the relay inside the metal box with the AC wire connections. The circuit converting 120VAC to 12VDC will also be inside the metal box.
Insulation inside the metal box will prevent the AC from reaching these two DC power wires. (Therefore,the insulation on the DC wires must not just be sufficient to withstand12VDC, it must also withstand 120VAC.)
Please criticize me if I have overlooked something important, or if my reasoning is flawed.