I'm looking for a safe and simple (also, cheap) way to connect a number of modular devices directly next to each other that share a digital bus and also need mains power (230V 50Hz here).

These devices are cheap, simple and small: BOM cost excluding the parts for connecting them is less than €8 in qty 1000; they typically control 2-3 IOs in specific ways; and ​they are not bigger than 1 DIN module.

Mains power would be quite low current. (Definitely not more than 6A on any one pin.) Digital would be 5VDC, GND, 1-Wire (i.e. 0..5V, <16 Kbps).

I would like the assembly of the stack be extremely simple. The method used for connecting them should provide some minimal rigidity for the duration of installation.

I have explored many solutions but have not come to a conclusion:

  • Pin-and-socket: My current best bet is putting pins on the "in" side of the devices, sockets on the "out" side, and a blind plug at the end, such that live mains is not exposed under operation. However, I have not found any off-the-shelf solutions specifically aimed at my problem. There exist some that are specified for up to 600V 7A and a pin spacing of 3,96 mm; however I'm not sure about the compliance of such a solution with EU electrical codes when used as an external interface. Maybe using two pairs of connectors FAR away from each other or physically separated by some feature of the enclosure?
  • Busbars and front-facing terminals: size constraints mean that at least 6 separate jumper busbars would have to be used; this does not only make the installation complex but raise the cost above budget.
  • Screw terminals and wires: takes much more space and effort to install. Cannot be reasonably protected from miswiring.
  • Backplane: requires extra manufacturing plus still some kind of connectors. Trimming to length is not as clean and foolproof as with busbars.
  • Board edge connectors: anything rated for mains voltage is way out of the project's budget so I have not explored this possibility any further.

Thanks in advance for sharing your experience.

  • 1
    \$\begingroup\$ Would you post any drawings, pictures, datasheets? \$\endgroup\$
    – jay
    Commented Nov 18, 2021 at 13:32
  • \$\begingroup\$ @jay Regarding which parts of the question? \$\endgroup\$ Commented Nov 18, 2021 at 14:36
  • 1
    \$\begingroup\$ Show a drawing of a "modular device" or link to its data sheet if available @KrálikBarnabás \$\endgroup\$
    – Andy aka
    Commented Nov 18, 2021 at 15:36
  • 2
    \$\begingroup\$ Králik , IMO, Focused questions get better answer. Consensus of opinion on general topics often gets TLTR or TBTR,feeling. People drops it before the first paragraph ends. Readers are looking for their own interest. You often find experts "enjoy" giving answers and feedback-s to seemingly very low technical subjects, as much as technically challenging ones. It is like a college essay. Your best interest may not get the most attention. If you poll the "new Questions" on this site, interesting questions get answered immediately, the rest stays in the queue until caught by someone with time. \$\endgroup\$
    – jay
    Commented Nov 18, 2021 at 15:48
  • 1
    \$\begingroup\$ 6A is not low current and 250V, 50Hz adjacent to digital logic with out isolation seems dangerous. How many pins do you need and what are their functions? How many interconnections? \$\endgroup\$ Commented Nov 18, 2021 at 20:30

1 Answer 1


next to each other

I take that to mean "coplanar". enter image description here

If so, consider unshrouded board-to-board right-angle PCB headers. They are cheap and installing them on a PCB is easy.

If it helps, consider using only female headers. Then, uses a male-male interposer between adjacent PCB assemblies.

enter image description here

I don't like it one bit that you plan to run 240 Vac this way, not one bit.

But, if you really must:

Use many more circuits than you need, and leave sections of unused pins as a buffer between the low voltage and high voltage circuits, and between the two AC power lines. The unused pins increase the creepage distance. Also, conformally coat the boards to prevent issues with leakage through moisture.

  • 3
    \$\begingroup\$ I wouldn't want mains on that sort of connector, doubts that's up to code anywhere. \$\endgroup\$
    – Mat
    Commented Nov 18, 2021 at 15:42
  • 1
    \$\begingroup\$ Yes, this is the rough idea and the words that I've been looking for. I will of course use conformal coating. The 3,96 mm spaced, 1,1 mm wide pins should provide ample creepage distance already, shouldn't they? \$\endgroup\$ Commented Nov 19, 2021 at 10:12
  • \$\begingroup\$ @Mat I also have doubts about using regular 0.1" headers as they are not rated to anywhere near my specs. However, I have been unable to locate a standard that specifically deals with this question; could you please give me some pointers? \$\endgroup\$ Commented Nov 19, 2021 at 10:15
  • 1
    \$\begingroup\$ @KrálikBarnabás: I don't have any pointers but regardless of standards/norms and rating, there is no protection at all from inserting this sort of header one slot to the left/right which could be disastrous with high voltages. Mains pins would also be unshrouded while live when you insert/remove the connector. \$\endgroup\$
    – Mat
    Commented Nov 19, 2021 at 10:22
  • 1
    \$\begingroup\$ I really have ethical issues with that statement. What you appear to consider to be reasonable will probably get someone killed. \$\endgroup\$ Commented Nov 19, 2021 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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