# Standard square pin and Generic Pin Socket

**URL:** https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639
**Category:** Help
**Created:** [December 9, 2023, 10:45am UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639 "2023-12-09T10:45:22Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/tyrn/32/493_2.png) [@Tyrn](https://librepcb.discourse.group/u/Tyrn)
#### Post date: [December 9, 2023, 10:45am UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/1 "2023-12-09T10:45:22Z")

</div>

Hi,

Standard square pin is 0.64mm or 0.025". Generic connectors look like this:

Generic Pin Socket 2.54mm 1x04 d0.9mm  
Generic Pin Socket 2.54mm 1x04 d1.0mm  
Generic Pin Socket 2.54mm 1x04 d1.1mm

Which diameter is suitable for the standard square pin? I believe that the generic pin socket is the right choice for the square pin 🤔 .

BTW, the square pin diagonal must be 0.9mm. So even d0.9mm is possibly a loose fit.

---

<div class="post-metadata">

### Author: ![sasmus](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sasmus](https://librepcb.discourse.group/u/sasmus)
#### Post date: [December 9, 2023, 5:12pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/2 "2023-12-09T17:12:08Z")

</div>

i’d go for 1mm - leaves room for tolerances.  
If you’re etching a prototype yourself incl. manual drilling then minimum 1mm is mandatory imho

---

<div class="post-metadata">

### Author: ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/tyrn/32/493_2.png) [@Tyrn](https://librepcb.discourse.group/u/Tyrn)
#### Post date: [December 9, 2023, 5:17pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/3 "2023-12-09T17:17:09Z")

</div>

You mean, those are soldering pin diameters 🙂 . That is, _all_ the Generic Sockets receive standard square pins. Is it so?

---

<div class="post-metadata">

### Author: ![sasmus](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sasmus](https://librepcb.discourse.group/u/sasmus)
#### Post date: [December 9, 2023, 6:04pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/4 "2023-12-09T18:04:43Z")

</div>

don’t know if i get you right - the given dimensions of the “generic pin socket …” are drill diameters of course. So as you stated - a 0,64mm square pin would fit into such a hole of 0,9mm. But - that is rather tight, especially if you use longer sockets / header in my experience. Therefore i use 1mm

---

<div class="post-metadata">

### Author: ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/tyrn/32/493_2.png) [@Tyrn](https://librepcb.discourse.group/u/Tyrn)
#### Post date: [December 9, 2023, 6:09pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/5 "2023-12-09T18:09:03Z")

</div>

Would you please post a good photo of this? I’m absolutely confused…

---

<div class="post-metadata">

### Author: ![sasmus](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sasmus](https://librepcb.discourse.group/u/sasmus)
#### Post date: [December 9, 2023, 6:19pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/6 "2023-12-09T18:19:37Z")

</div>

sorry, didn’t want to confuse you.  
Here is what i’m talking about:

 ![IMG_2545](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/d3ae1db4ffed2865c15c719dc71fb007720be3dc.jpeg)

Top: pin socket (female)  
Bottom: pin header (male)

both have square pins which fit into the pcb 😉

---

<div class="post-metadata">

### Author: ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/tyrn/32/493_2.png) [@Tyrn](https://librepcb.discourse.group/u/Tyrn)
#### Post date: [December 9, 2023, 6:32pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/7 "2023-12-09T18:32:09Z")

</div>

That is, into the hole always goes the standard square pin 0.64, diagonal 0.9. So your 1.0 mm hole in the board makes perfect sense. But what are then those 0.9, 1.0, and 1.1 diameters? I’m studying now a custom Blue Pill part by **dbrgn** , the holes are 0.8! All this still doesn’t make any sense to me…

---

<div class="post-metadata">

### Author: ![sasmus](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sasmus](https://librepcb.discourse.group/u/sasmus)
#### Post date: [December 9, 2023, 8:21pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/8 "2023-12-09T20:21:46Z")

</div>

The 0.9, 1.0 an 1.1 are footprint variants of the pin header / pin socket. you could simply change the variant and get the holes in your desired size - but its still the same device. This is part of the librepcb library concept and you’ll find it at many other parts/components.

Back to dbrgn’s work: that’s probably because the pin socket (female), where the blue pill is supposed to be plugged in has _smaller_ legs, which fit into 0.8 mm holes.

So the blue pill has those 0.64 square pin headers which plug into the pin sockets which are soldered to the pcb. 🙂

---

<div class="post-metadata">

### Author: ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/tyrn/32/493_2.png) [@Tyrn](https://librepcb.discourse.group/u/Tyrn)
#### Post date: [December 9, 2023, 8:35pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/9 "2023-12-09T20:35:19Z")

</div>

> both have square pins which fit into the pcb 😉

and

> that’s probably because the pin socket (female), where the blue pill is supposed to be plugged in has _smaller_ legs, which fit into 0.8 mm holes.

_Probably_ sounds very depressing 🙂 . So there _are_ different pin sockets. Including those fitting into 0.8mm holes. None of the latter included in the libraries for some reason. Do I have it right?

---

<div class="post-metadata">

### Author: ![sasmus](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@sasmus](https://librepcb.discourse.group/u/sasmus)
#### Post date: [December 9, 2023, 9:18pm UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/10 "2023-12-09T21:18:54Z")

</div>

…i don’t know why dbrgn used 0.8 mm - that’s why i wrote “probably” it is just a guess.

> So there _are_ different pin sockets. Including those fitting into 0.8mm holes. None of the latter included in the libraries for some reason. Do I have it right?

not really - you mix the (female) pin socket and the (male) pin header - and maybe i was not precise enough too.  
please re-read this and see the picture above.

> Top: pin socket (female)  
> Bottom: pin header (male)

The standard format of the (male!) pins is square & 0.64mm. You could just use them to solder into your pcb (as they do with the blue pill). my recommendation is to use 1mm holes then.

If you want to use some (female) pin sockets to get a pluggable connection then the pcb holes could typically be smaller.  
But… to be honest. why bother? just use 0.9 or 1mm.

---

<div class="post-metadata">

### Author: ![dbrgn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/dbrgn/32/25_2.png) [@dbrgn](https://librepcb.discourse.group/u/dbrgn)
#### Post date: [December 10, 2023, 7:44am UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/11 "2023-12-10T07:44:01Z")

</div>

I don’t remember why 0.8mm, I probably measured the headers I got with the blue pill and they were small enough to fit into 0.8mm? It does sound rather tight though, 1mm would be a more conservative choice.

In any case, you should measure the parts you have or look up the datasheet, and verify that the library part you’re using actually works. If you want to make adjustments, you can simply clone the third party library part into a library of your own, and make the adjustments.

---

<div class="post-metadata">

### Author: ![dbrgn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/dbrgn/32/25_2.png) [@dbrgn](https://librepcb.discourse.group/u/dbrgn)
#### Post date: [December 10, 2023, 7:49am UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/12 "2023-12-10T07:49:07Z")

</div>

> [@Tyrn](#):
>
> But what are then those 0.9, 1.0, and 1.1 diameters?

If you want a tighter fit, use 0.9mm. If you want a looser fit or more tolerance, use 1.1mm. Depends on the part. There are no real “standard pins”. Some are a bit thicker, some a bit thinner. 1mm is a good default.

---

<div class="post-metadata">

### Author: ![Tyrn](https://yyz2.discourse-cdn.com/free1/user_avatar/librepcb.discourse.group/tyrn/32/493_2.png) [@Tyrn](https://librepcb.discourse.group/u/Tyrn)
#### Post date: [December 12, 2023, 6:40am UTC](https://librepcb.discourse.group/t/standard-square-pin-and-generic-pin-socket/639/13 "2023-12-12T06:40:09Z")

</div>

> [@dbrgn](#):
>
> I don’t remember why 0.8mm

I can venture a hypothesis. Solderless joint with the good old standard square pin 😃
