# Pin header

A pin header (or simply, header) is a form of electrical connector. A male pin header consists of one or more rows of metal pins molded into a plastic base, often 2.54 mm (0.1 in) apart, though available in many spacings. Male pin headers are cost-effective due to their simplicity. The female counterparts are sometimes known as female headers (also as pin sockets), though there are numerous naming variations of male and female connectors. Historically, headers have sometimes been called "Berg connectors" or "DuPont" connectors, but headers are manufactured by many companies.

## Overview

Normally pin headers are through-hole devices (THD/THT), but surface-mount devices (SMD/SMT) exist too. In the SMD case, the solder side of the pins are bent on a 90-degree angle so as to be soldered to pads on the printed circuit board (PCB). On single row SMD headers the pins are bent alternating to one side or the other, on dual row SMD headers the pins are simply bent outwards. If pin headers are optional, the THD variant is often chosen for ease of manual assembly.
Headers can be either straight (vertical) or right-angle, the latter form is sometimes used to connect two PCBs together horizontally. Most often, headers are available in one or two rows, though three or more rows are available from some manufacturers. They are often sold as long strips (typically 36 / 40 / 50 pins) which can easily be cut apart to a required number of pins. Many pin lengths are available to minimize labor during PCB assembly.
Male pin headers are often associated with ribbon cable connectors. When used alone, they can be recipients of jumpers, which have spacings of 2.54 mm (0.1 in) and 2.00 mm (0.079 in).
Header types can be categorized by their pitch (uniform distance between pins measured from center to center). Some common header pitches are:
* 5.08 mm (0.200 in)
* 3.96 mm (0.156 in)
* 2.54 mm (0.100 in) with 0.64 mm (0.025 in) square pins or precision machined 0.50 mm (0.020 in) round pins
* 2.00 mm (0.079 in) with 0.50 mm (0.020 in) square pins
* 1.27 mm (0.050 in)
* 1.00 mm (0.0394 in)

## Shrouded or box header

Pin headers with a plastic guide box around them are known as a shrouded header or box header (BH) and are normally used in combination with insulation-displacement connectors (IDC) for ribbon cables. A square notch (key) in the shroud prevents placing the connector (polarised by a "bump" on one side) the wrong way around. Some are available without the square notch cutout.

## Polarizer key

Some systems polarize or key the pin header connection with something that fills and blocks one of the holes in the sockets. One pin of the wrong pin header (or the correct pin header rotated in the wrong orientation) hits that obstruction and prevents an incorrect connection. The correct pin header has one or more pins in the header removed or clipped to indicate a key for correct orientation.

## Pin numbering

In absence of a pin 1 designation on the header, if a designation is missing from the header, the PCB may have a marking indicating orientation (historically, the solder pad around the hole of pin 1 of a THD header is often square rather than round).
For multi-row pin headers, the pin number is more complex, because knowing the location of pin 1 doesn't automatically ensure how the remaining pins are numbered. Typically for headers attached to ribbon cables, the pins are numbered so they go linearly across the cable. Because of the way the connector attaches to the cable, this means in a two-row header, pins in one row have odd numbers and pins in the other row have even numbers.