Skip to content

BAT-5 Battery connector polarity vs the common convention

Severity Status Implementation
suggestion planned judgement, depends on netlist

Looks at. Battery connector family, which pin carries the positive terminal.

What it catches. A battery connector whose pin assignment differs from the convention most packs for that connector use: the positive pin of a JST PH battery socket, the centre of a barrel jack.

Why it matters. There is no standard for which pin of a JST PH battery plug is positive, and both versions are sold. A pack plugged into a board with the other convention reverses the battery on the board: without reverse protection (PIN-1) the charger and the regulator die, and a lithium cell is shorted through their diodes.

Example. A board whose 2-pin JST PH socket has pin 1 as positive, to match a hobby pack bought online; the LiPo packs from Adafruit, SparkFun and Particle use the other assignment (looking at the pack's plug with the key up and the holes towards you, positive is on the right). The first customer with an Adafruit pack sees smoke.

How to check. A connector with a battery role and a known family (library class); compare its positive pin with the project's chosen convention. better_erc can list battery connectors and their polarity for review; there is no rule to decide it.

Fix. Choose the convention of the packs you will ship with and write it on the silkscreen next to the connector, and add reverse protection in any case (PIN-1).

References. Particle community, Why isn't battery polarity always the same in JST pins? (2018: no standard; Particle, SparkFun and Adafruit use the same polarity) community.particle.io; DigiKey TechForum, Polarity standard for JST PH connectors on LiPo batteries (2026) forum.digikey.com; Adafruit, Li-Ion & LiPoly Batteries ("Do NOT install the battery in reverse polarity").