7

I'm designing PCB which has pin header connectors(0.1" pitch). So my question is - Is it the standard to put female headers onto PCB and solder male headers to wires or vice versa?

My idea is next: Female pin headers is better to put on PCB. Why? They are protected with plastic around them, so you can't accidentally short connections and damage PCB(assuming that PCB is more expensive than female headers).

PCB has 34 pins for Arduino and DS3231 module(those pins will be female pins), six pins are signal pins, one is VCC, one GND pin.

Pararera
  • 421
  • 5
  • 12
  • 1
    "solder male headers to wires " Crimping pins to wires is more common, be they female or male. Take a look at the board-mount headers and ribbon-cable crimp on connectors here. https://www.peconnectors.com/ – CrossRoads Feb 03 '19 at 23:43
  • 2
    What's the purpose of the connections? What's the purpose of the PCB? Will the PCB be used as a naked board? Or, will it sit in an enclosure? By the way, here's a [somewhat related answer in an old thread](https://electronics.stackexchange.com/a/50094/7036). – Nick Alexeev Feb 04 '19 at 07:31
  • It is easier to solder male header(and protect with heatshrink tube) for me. I don't have tool for crimping. – Pararera Feb 04 '19 at 08:01
  • 6 headers are in use for signal, one vcc and one gnd. This is small pcb(project isn't complex) – Pararera Feb 04 '19 at 08:02
  • @SilvioCro please [edit] your question to provide those additional informations. Comments can get lost and a question should contain everything needed for an answer. – guntbert Feb 04 '19 at 12:11
  • I didn't write those details because I think it doesn't affect situation. – Pararera Feb 04 '19 at 12:24

6 Answers6

15

My theory is that male headers are less likely to suffer damage by contamination since everything is "out there" and visible. Use the shrouded kind for more protection.

The females, when part of an IDC cable, are more easily replaced if they fail, rather than trying to replace a part on an expensive multilayer PCB.

You will find most products where there was a choice such as IDE disk drives and PCB motherboards will agree with this choice.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • 2
    Female crimp and IDC connectors are definitely more common, and often cheaper as a result. – Chris Stratton Feb 04 '19 at 00:25
  • 1
    Counterexample: VGA/Serial connectors usually have male pins on the cable side, and female sockets on the host side. Replacing a cable with a damaged male pin is trivial, but trying to replace a bent or broken male pin on a laptop is an extensive rework. +1 for 'use the shrouded kind for more protection'. I think it's good practice to make the more fragile side of the connection the easier one to repair/replace. – Chris Fernandez Feb 04 '19 at 15:28
7

There is no standard. Male pin headers on PCBs got their start in the electronics world back when ribbon cables became popular. These cables were equipped with 0.1" pitch female socket connectors which mated with male pin box headers. Over time many applications eliminated the shrouded box header in favor of the open male pin header due to cost and space savings reasons.

These days there are so many choices it really becomes a case of finding the connection technology that best fits the packaging concept for your electronics gadget.

Michael Karas
  • 56,889
  • 3
  • 70
  • 138
  • How to protect reverse connection with shrouded male headers? – Pararera Feb 03 '19 at 22:31
  • 3
    With a shroud you can add a plastic "key" to the cable, just like on IDE connectors. The shroud + key only allows it to be plugged in one way. See: https://images-na.ssl-images-amazon.com/images/I/41KqrBdXtZL._SL500_AC_SS350_.jpg – DeadChex Feb 03 '19 at 23:11
  • 1
    The shroud also helps prevent other common errors, such as off-by-one. (Of course those are only harmful if not noticed before applying power, and none of these are suitable for hotplugging) – Ben Voigt Feb 04 '19 at 00:33
  • 3
    @SilvioCro I can't believe you've never seen an IDC connector. Do a google image search for "idc connector". The answer to your question is obvious – slebetman Feb 04 '19 at 00:43
  • @slebetman - There are many, many, IDC connectors which are not keyed to prevent reverse-insertion. – SiHa Feb 04 '19 at 12:27
6

There's not a standard, but a good rule of thumb is to think about would happen if someone untrained took hold of the board. For example, mains wiring is always a socket in the wall so it is impossible or difficult to touch a live wire accidentally. If there is power being supplied by one side, I would generally make that a socket (female). Cost wise, male tends to be cheaper than female, so if you're doing big numbers that may also be a consideration for you.

awjlogan
  • 7,879
  • 2
  • 29
  • 45
3

Contrary to your statement, male headers also come with shrouds.

If you are plugging in cables, then use male headers that include retaining clips.

I do not know if you can even get a female connector with retaining clips.

enter image description here

jsotola
  • 2,497
  • 2
  • 12
  • 21
  • 2
    Female connectors for flat (ribbon) cables often have locking clips: http://i.ebayimg.com/images/i/182350451902-0-1/s-l1000.jpg – sleblanc Feb 04 '19 at 03:47
  • In this case, a screw that falls into the enclosure on an unpopulated header can still short the pins – crasic Feb 04 '19 at 04:33
3

The standard, if there is one, may be based on the old rule of thumb that says

Ma Bell has the female parts

It applies to phone, electric, USB, and all manner of other signal circuits. For safety, the electrically active parts of the circuit are protected; barring tampering, the matching plug is required to access the power or signal. For usability, in general, the plug is more likely to be damaged by repeated or incorrect usage. And a cable end is usually easier to replace than a mounted connector.

But there are exceptions, especially if the duty cycle for the connection is very low.

3

You do not provide many details, so I will be generic.

You should consider safety. Safety for the device, safety for the cables, safety for the users (people).

Applied to electricity networks, inputs are male and outputs female. In this way you make sure you cannot have a direct link to the electricity supply - which can be accidentally touched by people. You cannot easily create a short-circut.

On the other hand, we (sometimes) use fuses not to protect the devices, but the cables - replacing cables can be a lot more expensive, because of dismantling, re-assembling...

So analyze your setup from these points of view. Protect as much as possible. Prioritize.

virolino
  • 439
  • 3
  • 11