What is the real pitch of JST-XH? - Page 1
Forum section: electronics / general

author: Tonn
author_rank: Contributor
timestamp: December 15, 2016, 01:39:21 pm
content: Well, I just threw away a PCB because my JST-XH 4-pin connector didn't fit.There's a lot of confusion about the pitch of these connectors: 2.54mm as many seem to think, or 2.5mm as the spec says.Most Eagle footprints use 2.54mm, so I made my own using 2.5mm and it doesn't fit.Now, I spent the last hour measuring the pitch of these connectors (I have 10 of them),and comparing them against pin-headers, breadboards, female dupont connectors etc. under a microscope.The pitch is 2.54mm every time.I checked the invoice, I checked the dealer (Farnell) information, I checked the datasheet. They all say 2.5mm.I checked the connectors; the look like JST-XH and it says "4" at the top and "H JST" at the bottom just like in the spec.Does someone have an explanation?(picture attached)

author: wraper
author_rank: Unknown
timestamp: December 15, 2016, 02:30:22 pm
content: Quote from: Tonn on December 15, 2016, 01:39:21 pmIf you are comparing it with 2.54mm pin header on the picture, then it looks like 2.50mm like in the datasheet, as pin header pin pitch looks wider. Anyway, for 4 pin connector it should not make much of the difference, and my guess you just screwed up pad layout.Is it according to this drawing (looks like you have smt version with look from the top, although I'm not sure)? EDIT, no' it should be through hole. For through hole it does not matter either as long as you are using correct hole size.

author: GreggD
author_rank: Regular Contributor
timestamp: December 15, 2016, 03:36:35 pm
content: I just made 35 boards with 4 and 8 pin (Aliexpress) JST-XH connectors. These are 2.54mm pitch. Real JST-XH connectors are 2.50mmI used the fake connectors to match the wire harness of China step motors and rgbw led assembly.Measure twice, cut once.

author: wraper
author_rank: Unknown
timestamp: December 15, 2016, 05:44:16 pm
content: Hole size according to the datasheet must be 0.9 +0.1/-0 mm (note that hole plating reduces it's diameter a little bit), for 4 pin connector 2.54 vs 2.50 mm pin pitch will cause only 0.06 mm off hole center offset of pins 1 and 4, and half of that for pins 2 and 3. So it's impossible they won't fit vice versa, unless your holes are too small. But it such case, even if they did have correct pin pitch, most likely, connector still won't fit.

author: DerekG
author_rank: Frequent Contributor
timestamp: December 16, 2016, 05:18:06 am
content: Quote from: wraper on December 15, 2016, 05:44:16 pmwraper has hit the nail on the head. For short connectors (ie 4 way or even 8 way) if you opened up the hole a little you could fit any manufacturers part 2.5mm or 2.54mm.

author: Kjelt
author_rank: Super Contributor
timestamp: December 16, 2016, 09:28:35 am
content: Pitch is 0,1" which is 2,54 mm.I am afraid some websites round it off or do they say 2,50 mm ? If they state 2,5 mm I order the parts first and measure them myself between 10 pins to get a more exact pitch estimate then between two pins.

author: Tonn
author_rank: Contributor
timestamp: December 16, 2016, 05:47:07 pm
content: Today I repeated my measurements using a digital caliper and a microscope with microscope ruler.The board is spot on. The pitch of the connectors is still 2.54mm.The drill size is an exact fit. Meaning the fit is smooth without bumps but indeed no room to spare.Pin for pin no problem, but the connector as a whole doesn't fit.Had I been a bit less accurate I might not have noticed any problem at all.Interesting to hear about chinese versions with 2.54mm pitch.It would explain why so many footprints on the internet are 2.54mm pitch with rather large drill sizes (even up to 1.3mm).I wonder, do the chinese versions have JST markings?For now I am simply going to adjust my footprints to match my connectors.Everyone thanks very much for your help.

author: wraper
author_rank: Unknown
timestamp: December 16, 2016, 05:51:22 pm
content: Quote from: Tonn on December 16, 2016, 05:47:07 pmThis is not accurate, this is making footprint completely out of spec. No experienced engineer will do an "exact fit". Moreover, first and last pins have bump on them.

author: GreggD
author_rank: Regular Contributor
timestamp: December 16, 2016, 06:34:20 pm
content: Chinese versions do not have JST markings and the part numbers on the bag do not Google well.5-pin bag label;7F:1003-0202-00Pa15082500ux0698

author: nctnico
author_rank: Super Contributor
timestamp: December 16, 2016, 11:09:05 pm
content: I have various designs with JST XH connectors (up to 6 positions) and with the footprints made according to the datasheet (including the specified hole sizes) the connectors always fit just fine. The pitch is 2.50mm BTW. Maybe the grid was wrong during creation of the footprint?? Datasheets can be confusing but are the leading source for information on a part. Whatever else is written on a website or catalogue should be considered (at least) wrong.There can also be a problem in the PCB manufacturing process. Some PCB manufacturers use the specified hole sizes for their drills and after plating the holes are 0.1mm smaller which can lead to problems.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: December 16, 2016, 11:36:55 pm
content: Real JSTs are 2.50mmThere are a lot of copies out there, and as 2.54 is such a common pitch it wouldn't surprise me if some are 2.54.Reminds me of a more confusing situation - plug-in terminal blocks, where there are "real" ones in both 5.00 and 5.08mm pitch. Why...

author: DerekG
author_rank: Frequent Contributor
timestamp: December 17, 2016, 01:27:13 am
content: Quote from: mikeselectricstuff on December 16, 2016, 11:36:55 pmYes, if Tonn purchased the connectors from a reputable supplier with direct factory buying (ir Arrow, Digikey etc), he would have been guaranteed to receive an OEM part.QuoteConnectors that came out of the USA & the UK in the early days were all imperial whereas those that came out of Japan & Germany were metric.Many manufacturers supply both imperial & metric pitches to cater for both markets.

author: ovnr
author_rank: Frequent Contributor
timestamp: April 16, 2018, 05:21:29 pm
content: Quote from: Tonn on December 16, 2016, 05:47:07 pmIf it's just a 4-pin connector: Just ram it in there? The error isn't so big that it won't work; sure, it might not seat perfectly, but just because it doesn't drop smoothly into the board doesn't mean it's not salvageable.

author: Tonn
author_rank: Contributor
timestamp: April 19, 2018, 11:34:50 am
content: Hi Spork,As you can read above, the discussion is not conclusive.Two things I have learned:1) The real pitch is 2.5 mm. JST says so in their datasheet and they were happy to confirm this to me directly.2) There are Chinese knock-offs that have a 2.54 mm (100 mil) pitch. As far as I know these do not have JST markings.I bought mine at Farnell, an OEM supplier (I believe someone missed that).I had them measured at a company that makes small metal components. They use a projection device that projects the connector on a large circular screen. The connector appears 60 cm wide! A calibrated scale allows for accurate measurement.And it's 2.54 mm with JST markings.My best guess is that they are counterfeits that found their way through some cracks in the system. Most likely a one time issue.@ovnr: I did ram it in there. Salvaging the board was never the problem. My curiosity was.Thanks everyone,Tonn

author: Monkeh
author_rank: Super Contributor
timestamp: April 19, 2018, 12:06:49 pm
content: 2.54mm is within tolerance for 2.5mm. They are 2.5mm. Even the clones. If they don't fit your footprint is broken.

author: Siwastaja
author_rank: Super Contributor
timestamp: April 20, 2018, 03:52:43 pm
content: Quote from: Monkeh on April 19, 2018, 12:06:49 pmPin pitches, though, use a special classification of tolerance where the error is not allowed to accumulate: the measurement is calculated by exact nominal value times pin index, only after that the tolerance is applied. This is obvious and has to be this way (and always is for pin pitches), since as anybody who has ever tried putting a 2.54mm pitch component on a 2.5mm grid knows, they are non-interchargeable when the pin count exceeds about 5-8 (depending on the hole size and amount of violence allowed in assembly, of course). With a 20-pin component, for example, accumulated error would be 0.8mm, necessitating a hole diameter 1.6mm larger than normal, which is already impossible.A 4-pin component, though, should fit the proper footprint despite the wrong pitch. If not, the holes are probably too small.If really needed, a hybrid footprint with 2.52mm pitch and slightly increased hole size would work well up to about 12-14 pins.

author: thm_w
author_rank: Super Contributor
timestamp: April 20, 2018, 08:09:39 pm
content: Quote from: Siwastaja on April 20, 2018, 03:52:43 pmYeah it says in the datasheet: "Note: 1. Tolerances are non-cumulative: ±0.05 mm for all centers."So 4 pins would have a tolerance range from 7.45mm to 7.55mm and what OP is seeing is 7.62mm (roughly).http://www.jst-mfg.com/product/pdf/eng/eXH.pdf

author: Tonn
author_rank: Contributor
timestamp: June 10, 2018, 12:23:20 pm
content: @Siwastaja and thm_2Thanks. That's a very interesting piece of info I am glad to learn about.You are right about the hole size. They were on the small side, although I could jam the connector in the pcb. I already adjusted my footprint.However the footprint was not the subject of this post.I was able to have a precision measurement done (yes, I am that curious). It was spot on for 2.54mm.On the internet I found both sizes specified. So I started wondering ...@ thm_2: pin1 to pin4 was measured to be: 7.619mm.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 11, 2018, 12:27:21 am
content: There are 2.5mm connectors and 2.54mm connectors made by huge number of vendors. I have no doubt that if you search for JST-XH on Aliexpress or eBay, you'll get both varieties in your search.It is not important if you need to apply force to push the connector into PCB. What is important is that the pitch of the connector matches the pitch of the plug which you're going to insert into the connector.

author: ConKbot
author_rank: Super Contributor
timestamp: June 19, 2018, 05:59:57 pm
content: Quote from: wraper on December 16, 2016, 05:51:22 pmTo expand on this further, you have to allow for finished hole size tolerance (typically +/- 2 or 3 mil for good fabs), pin dimension tolerance,and you want room for solder to flow around all sides of the pin in the hole, rather than relying on it wicking down from the pad you're soldering. Max pin diagonal plus 5 mil is usually a good starting point

author: TomS_
author_rank: Frequent Contributor
timestamp: June 22, 2018, 07:24:03 pm
content: For a recent project I used a 8 way JST XA on a standard 0.1" proto board without any difficulties.XA series is 2.5mm, but the error across 8 holes is not so great that you cant mount it.I would only do that for prototyping though. If you are designing boards, I would recommend using the manufacturer specified pitch.

author: CZroe
author_rank: Contributor
timestamp: January 03, 2023, 09:39:27 pm
content: Adding to this old topic since it comes up when you search on the subject.Years ago I followed instructions that explicitly tell you to use 2.5mm pitch when interfacing with their product’s onboard 9-pin JST-XH header. It even stresses that 2.54mm is incorrect:“JST Connector is type ‘JST XH 9 position 2.5mm’. Note that 2.5mm is not the same as 2.54mm.” This was for an “advanced” installation and I only needed one connection, so I just soldered a wire with in-line DuPont connections.The next time I was asked to do an “advanced” install I found that the JST-XH assortment I bought for my 3D printers was all 2.54mm without any that were 9-pin. Since I didn’t need to populate every position I made it work by cutting and gluing two connectors. This worked well presumably because I only populated the few pins I needed and the cumulative deviation was reset by my cut. Still, I wanted to be more professional without a hacked together connector for my next install.After that experience I slogged through listings and the only reasonable options were either a bunch of pre-made wire harnesses on eBay or a particular assortment from Amazon. Sure enough, almost everything else on Amazon specified 2.54mm… but I finally found one with only “2.5mm” in the product name and ordered it. Unfortunately, the product details specified “2.54mm” and the assortment matched the later description. I was able to get a refund due to this contradiction.So here I am, preparing to do this for someone yet again and I STILL don’t have 9-position JST-XH 2.5mm connectors… and not for lack of trying. I totally understand the OP’s frustration with finding that even connectors with JST’s markings did not conform to spec and were actually 2.54mm. True 9-position 2.5mm JST-XH seems to be unobtainium even though it’s the spec and that’s the point where they get long enough for that to matter!

author: thm_w
author_rank: Super Contributor
timestamp: January 04, 2023, 06:49:16 am
content: Quote from: CZroe on January 03, 2023, 09:39:27 pmI have a random mix of JST XH purchased from aliexpress, all of the 5, 6, and 7 pin measure as 2.50mm. One dyed blue 7 pin was 2.54mm but still mates ok with 2.50. I would just buy from a few sellers, its not exactly expensive to try.And definitely ignore if they list it as 2.54mm, this seller says 2.54 in title but the drawing says 2.50mm for example:https://www.aliexpress.com/item/32701800317.htmlThat or buy from Digikey:https://www.digikey.com/en/products/detail/jst-sales-america-inc/XHP-9/1651015I can't see them screwing up something like this.

author: Kean
author_rank: Unknown
timestamp: January 05, 2023, 12:54:02 pm
content: Digikey have tons of genuine JST XHP-9 and B9B-XH in stock.Buying from random vendors on eBay or AliExpress will rarely get you genuine parts, especially with recent shortages.

author: thm_w
author_rank: Super Contributor
timestamp: January 09, 2023, 11:51:30 pm
content: And to no ones surprise: the JST-XH 9-pin I ordered from Digikey measures at 2.51mm pitch, within tolerance.They also fit fine in various 2.54mm prototyping PCBs, although one was a bit tight.I don't have a mating 2.54mm JST XH to test though. Maybe some chance the outside walls of a clone 2.54mm female housing wouldn't fit into a genuine 2.5mm male 9 pin?

author: tooki
author_rank: Super Contributor
timestamp: February 06, 2023, 05:27:27 pm
content: I have various genuine and clone XH, it’s all 2.50mm. I’m unconvinced that 2.54mm XH clones actually exist. There’s no sense in inventing such a thing.It’s easy to test: insert an 8-pin or longer into standard 2.54mm perfboard. You’ll see the error accumulate the farther you get from the center. On typical perfboard hole sizes, you can get up to a 10-12 pin 2.50mm connector to fit.

author: tooki
author_rank: Super Contributor
timestamp: February 06, 2023, 05:29:08 pm
content: Also, FYI it’s easy and inexpensive to order from JST directly. I’ve been meaning to put together an order. (Only issue right now is huge lead times on many items.)

author: thm_w
author_rank: Super Contributor
timestamp: February 06, 2023, 11:08:48 pm
content: Quote from: tooki on February 06, 2023, 05:27:27 pmAs I stated above, I have 7 pin 2.54mm XH clones, in blue.I'll take some photos later.

author: thm_w
author_rank: Super Contributor
timestamp: February 08, 2023, 02:31:29 am
content: The white JST will slightly bind when inserted into a protoboard. Whereas the blue will not.The measurements worked out to something like 2.49-2.50mm for the white JST, and 2.526 or so for the blue. So not quite 2.54mm, but probably intentionally wider?I'd have to get one with more pins for a better measurement, as the pins flex a bit inwards from the caliper force.

author: Kean
author_rank: Unknown
timestamp: February 08, 2023, 11:35:20 am
content: Quote from: thm_w on February 08, 2023, 02:31:29 amI have various bags of JST XH that came directly from JST Australia (via an old client)I grabbed a pack of 12 way "B12B-XH-A (LF)(SN)" and measured a few with some Mitutoyo digital calipers - outsides of pin to pin 28.33, 28.28, 28.31, 28.27 - lets say 28.3mm.Pin thickness is 0.62mm (measured 0.61-0.63), so (28.3mm - 0.62mm) / 11 = 2.516mm pitch

author: NorthGuy
author_rank: Super Contributor
timestamp: February 08, 2023, 02:48:38 pm
content: Quote from: Kean on February 08, 2023, 11:35:20 amLooking on the picture, you may be measuring at a slight angle, although it is hard to see.

author: Kean
author_rank: Unknown
timestamp: February 08, 2023, 03:22:35 pm
content: Quote from: NorthGuy on February 08, 2023, 02:48:38 pmYeah, it does look like that in the "staged" photo. I was pretty careful and did the measurement multiple times across several parts, and also across different pin counts.I couldn't be bothered to try find a micrometer for an extra digit (same as thm_w) as the flex on the pins and general tolerances really don't warrant it, but I did go down to the workshop to get my better calipers.Anyway, it is fair to say the nominal pitch is 2.5mm (as per the JST XH datasheet) and definitely not 2.54mm. The datasheet explicitly says "Tolerances are non-cumulative +/-0.05mm for all centers". My result is within that tolerance... I was just kinda hoping for it to be exact