I've created 2 layer relay board dealing with high voltage 220V AC and 5V DC simultaneously.

Is it sustainable or safe PCB, if I sell to end user? Is there any chance of problem may occur after some months like fire, accidentally stop working etc.?

Because I pass on-board 5V dc line above/below or parallel with the ac live line & neutral line.

enter image description here

Figure 1. Schematic. (Click for full size view.)

relay board

Figure 2. Board topside view.

enter image description here

Figure 3. Board topside-only view.

  • \$\begingroup\$ Is this 5VDC floating relatively to neutral? Or is it 5V relatively to neutral? \$\endgroup\$
    – user76844
    Aug 26, 2016 at 20:00
  • \$\begingroup\$ can you post the schematic along with this? I can't seem to find your 220V live \$\endgroup\$ Aug 26, 2016 at 20:12
  • 8
    \$\begingroup\$ ok, honestly, hoping that we reverse engineer your layout isn't probably the best way to get help :( \$\endgroup\$ Aug 26, 2016 at 20:23
  • 3
    \$\begingroup\$ You need double insulation between high-voltage and low-voltage portions (twice the clearance/creepage between L and N). Also bear in mind that creepages do not add up when they are less than 1.5 mm (e.g. the three resistors and optocoupler in series) \$\endgroup\$
    – venny
    Aug 26, 2016 at 20:42
  • 5
    \$\begingroup\$ I suggest that you look at how good quality power supplies are layed out as these need proper mains isolation. In your design I would want to see a clear separation between the DC and AC sections which I do not see. For me the vertical separation (only the PCB in between) would be unacceptable to me. What I want is a design where you could use a saw to separate the two sections and the saw would have to cut the board without cutting a single copper trace. \$\endgroup\$ Aug 26, 2016 at 21:11

1 Answer 1


I am not a PCB designer by profession (but have designed a few and had them made) and so this should be taken into consideration when reading my comments.

The schematic

A good schematic should convey the design intent and should read left to right. Yours isn't too bad but the missing connections make it hard to trace the flow. e.g.,

  • L and N on top left: show the connections between J1 and J2 on the schematic so that it's obvious.
  • J10 to ULN1: show the connections. They're right beside each other.
  • ULN1 to U$1, etc.: show the connections.
  • COM1, etc.: this has no matching tag on the schematic. I guess (from the PCB) that it's connected to the relay contact common but it's not clear.
  • R20, 21, etc.: unconnected. Again, I guess they should be connected to N. Show it!
  • The opto circuits are clear but GND symbol is rotated 90°.


enter image description here

  • Why is there an N (neutral) pour so close to the relay coil pins (2)? You want to keep a much larger gap there.
  • I would much rather see the NLLN block on the same side as the rest of the mains (1).
  • I agree with @Fakemoustache's comment, "What I want is a design where you could use a saw to separate the two sections and the saw would have to cut the board without cutting a single copper trace." I would add that the only thing the saw should cut would be plain board and opto-isolators. There should be no traces running between the opto-isolator mains and low-voltage sides (3).
  • Inadequate clearance (2), (3), (4), (5) and (6).

enter image description here

Figure 2. Similar problems here on the red traces.

Good examples

enter image description here

Figure 3. A power supply showing very clear isolation between the mains and low-voltage side. Note the creepage distance. Source: Safety analysis of one USB power supply.

enter image description here

Figure 4. An industrial PLC relay board. Relay contacts at the bottom are clearly isolated from the control side. Source: I would love to see a teardown of an industrial PLC on EEVBlog.

Debugging safely

Finally, good isolation makes it much more obvious where the hazardous voltages are on the PCB. This will reduce risk of inadvertent contact with mains voltage during debug and maintenance.

  • \$\begingroup\$ Thank you so much. Your valuable review is most useful for me to make safe pcb. \$\endgroup\$ Aug 27, 2016 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.