Connecting wires to a PCB, how would you do it? - Page 1
Forum section: electronics / beginners

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 12, 2023, 12:46:34 pm
content: I can think of quite a few ways to connect wires to a circuit board. There are pros and cons for most of them. If you had to connect two wires to a circuit board, let's say for 12V DC, current up to 1A (not signals or high voltage/current) and wanted it to not break over time, be able to be connected and disconnected for maintenance, yet be secure and have a good electrical connection, and have a relatively small footprint, what would be your preferred method?I am considering screw terminals (with wires terminated in ferrules of course) or a latching molex connector. Would you do it differently, if so, why?I'm always interested in finding out the ways other people do things, sometimes you learn something fantastic.

author: ledtester
author_rank: Super Contributor
timestamp: July 12, 2023, 01:04:58 pm
content: I'd look at pre-made JST cables like these:https://www.aliexpress.us/item/2251832768103991.htmlCheap, polarized, pins are 1/10th inch apart and I don't have to crimp anything.

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 12, 2023, 01:09:14 pm
content: Quote from: ledtester on July 12, 2023, 01:04:58 pmThat's one of the options I'm considering, In my mind I think of those as 'molex type', although my mind may just be making that up, hehe.

author: Faranight
author_rank: Unknown
timestamp: July 12, 2023, 02:07:50 pm
content: Go to ebay and search for "pcb terminal blocks", find some pretty cheap connectors there.The only problem I have with those is that the plastic casing isn't the strongest, and they tend to bend when applying high torque with the screwdriver.

author: liaifat85
author_rank: Regular Contributor
timestamp: July 12, 2023, 02:49:51 pm
content: Green connectors (terminal blocks) are used for this purpose. They are available in various pin numbers.https://robotechshop.com/shop/%E2%80%A2prototyping/connectors/green-connector-3-pin/

author: sparkydog
author_rank: Regular Contributor
timestamp: July 12, 2023, 04:35:26 pm
content: Personally, I'm using screw terminalsa lotin my designs. "You don't need to crimp anything" is actually debatable; seeherefor a discussion on proper use of screw terminals. However, it's probably the easiest possible crimping (also, I think only necessary for stranded wire, but OTOH you're almost certainly using stranded). Also, the mechanical life in terms of disconnecting and reconnecting of screw terminals is AFAIK nearly infinite, which isnotthe case for many other connectors. (That said, the need to plug and unplug something more than a dozen times usually only occurs in specific circumstances.)If you can get away with pre-made cables, that may well be better, but it also isn't always an option.

author: Karmaslap
author_rank: Newbie
timestamp: July 12, 2023, 06:57:23 pm
content: I prefer to use a connector over screw terminals almost all the time. You can unplug a connector more easily than you can unscrew terminals, and if your board is part of an assembly that can really simplify installation or maintenance. No risk of reinstalling it backwards and having to go check your ICD either if there are multiple cables

author: james_s
author_rank: Super Contributor
timestamp: July 12, 2023, 07:06:35 pm
content: I like screw terminals personally. If it's something you intend to disconnect occasionally then there are those connectors, the name escapes me, which consist of a shrouded header installed on the board and a plug that has screw terminals for the wires to connect and then that plugs into the header. They're usually green colored, I've seen them in furnaces, alarm systems and pro A/V gear.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 12, 2023, 07:12:43 pm
content: Quote from: james_s on July 12, 2023, 07:06:35 pmThat's just Euroblock isn't it? Beware with the existence of several slightly different contact pitch if you want to use oneThere's also version with or without barriers.

author: Benta
author_rank: Super Contributor
timestamp: July 12, 2023, 07:29:55 pm
content: I prefer flat Faston terminals in 2.8, 4.8 and 6.3 mm depending on current and voltageMale flat for the PCB, either straight up or right angled.For the cables, I use uninsulated female crimp connectors with separate insulation sleeves if needed.Not the smallest solution, but super reliable.

author: james_s
author_rank: Super Contributor
timestamp: July 13, 2023, 12:02:10 am
content: Quote from: ArdWar on July 12, 2023, 07:12:43 pmYeah, those things. They work pretty well, nice compromise between a regular screw terminal block and a plug and socket.

author: EPAIII
author_rank: Super Contributor
timestamp: July 14, 2023, 09:02:53 am
content: Header pins on the PCB: 0.025" square x 0.1" spacing. They are super available and will carry at least 2A per pin.Wire termination is a big question. There are so many header connectors available. Solder, crimp, insulation displacement, screw, strain relief or no, even pre-assembled cables are available. If frequent connect/disconnect was anticipated then the pre-assembled cables may be quite attractive.If only infrequent connect/disconnect cycles, then I have used the insulation displacement, ribbon cable connectors for many projects. There is something wonderful about making 10 or 20 wire connections with just one squeeze of an inexpensive tool or my bench vise. Or just two connections as the case may be. I have saved uncounted hours of time making cables for a number of projects with them. These types of connectors are available in a number of configurations, pin pitches, wire pitches and gauges, and pin counts. They are available for use with ribbon cable and individual conductors. But look to real electronic suppliers where you can find what you want by the specs. and not places like Aliexpress where you can spend hours searching randomly organized offerings and still not find what you need.If you choose ribbon cable and are concerned about the current carrying capability, you can easily double or triple up on the pins used. But, as I said above, header connectors are available for other types of wire or cable.And, for the most part, these methods are very reasonable in price. Particularly as compared to other, "more professional" connection methods.

author: Solder_Junkie
author_rank: Frequent Contributor
timestamp: July 14, 2023, 10:52:22 am
content: I have used "Molex" connectors in the past, but there are lots around these days. Check out Mouser.co.uk as they have the data sheets showing the pin out spacings for PCB design for most of what they sell.For higher current applications, I have been using 30A screw terminal blocks with 7.62mm spacing between pins on the board. Use crimp connectors on the wires to avoid strands of wire causing problems. Both Mouser and CPC stock these.SJ

author: MrAl
author_rank: Super Contributor
timestamp: July 14, 2023, 12:12:21 pm
content: Quote from: Microdoser on July 12, 2023, 12:46:34 pmHello there,Interesting question.A question for you is, do you really need a connector of some type or a way to disconnect the wires from the board at some point.I ask because if i do something more permanent i like to solder the wires right to the solder pads. That means no connector issues.It's not a good idea to JUST solder them though. It is better to drill an extra hole in a non copper part of the board and run the wire with insulation through that hole, then strip the end and solder to a pad or through hole pad.Even better, drill two extra holes and run the wire with insulation down through one hole, then up through the other hole, then strip the end and stick the bare wire end into the through hole solder pad or just a solder pad with no hole.In both cases the extra hole(s) act as a strain relief so the connection itself is not compromised when the wire is tugged on a little.It does take a little more room but it works great.There are other variations on this idea too.

author: Nominal Animal
author_rank: Super Contributor
timestamp: July 14, 2023, 12:48:59 pm
content: Quote from: Microdoser on July 12, 2023, 12:46:34 pmMolex 22-27-2021 on the board, with the wires in a Molex 22-01-3027 housing using female Molex KK crimped pins suitable for the wire gauge (there being at least a couple of different sizes). Ubiquitous, found to be reliable, a locking tab that holds it very well in place and makes sure it only fits in the one correct orientation.This would be the latching Molex connector option, I guess

author: mariush
author_rank: Super Contributor
timestamp: July 14, 2023, 12:51:54 pm
content: I'd consider using a miniFit Jr (or clones) 4 pin or 6 pin or 8 pin connector (6 pin pci-e , 8 pin pci-e , EPS) simply because they're so mass produced they're cheap and they have good locking mechanism.exhttps://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/2-1775099-0/5272720https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/4-1775099-0/5272721https://www.digikey.com/en/products/detail/molex/1724479702/16032776val-u-lok series :https://www.digikey.com/short/fh44t5q5and example 2 pin connector to board header :https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/794954-2/701595If you want smaller footprint ... I think really you could use any connector, and just put a few drops of thread lock or maybe epoxy to lock the connector.Or for example, you could have a small right angle connector, and two small holes in front of the header.Once the plug is inserted in the header, you can run a zip tie through those small holes and lock the wires to the board so they can't be pulled and lock the connector in place.Though really if it's just for servicing, someone servicing would have a soldering iron to unsolder, or just cut the wires and resolder them when done (just make the wires a bit longer from the factory)

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 15, 2023, 09:54:22 am
content: Lots of good thoughts here.I think I'll blend a couple of ideas and terminate the wires with ferrules, which will be soldered directly into the board. There shouldn't be any strain to require strain relief, although to prevent movement fatigue I'll cable tie down the wires.

author: armandine2
author_rank: Frequent Contributor
timestamp: July 15, 2023, 11:26:26 am
content: Quote from: Microdoser on July 12, 2023, 12:46:34 pmDon't hold your breath - I'm at present attaching my wires to pcb / perfboard modules and like you I'm concerned about ease of "maintenance" (come ease of operation diagnosis- hence the modularity).In my modular "designed" approach I will have a couple of +/- 5V regulator boards driving pairs of ammeter/voltmeter displays. The connectors into and from the regulator will be 8-way SIL Molex (KK254), but I will be wiring directly into the display pcbs - those wires will have, at the other end, a Molex socket. It kind of seems unnecessary that there is a final header, in what may well be a small space....

author: tooki
author_rank: Super Contributor
timestamp: July 15, 2023, 12:16:40 pm
content: Quote from: Microdoser on July 12, 2023, 12:46:34 pmThat’s kinda like asking “what’s the best food ingredient?” — it depends on what you’re trying to make!There are a gazillion different connector solutions, and each has its reasons for existing.Some factors that come into play, in the random order they came to mind:CostSpaceMating cyclesWire or cable typeWire size (does it support the size you need? Does it support multiple sizes without needing different contacts?)Strain reliefEase of assembly (how hard is it to assemble or mount the connector itself)Ease of mating (after assembly)CurrentVoltageSignal integrity (characteristic impedance, maximum frequency, shielding, etc)Environmental factors: temperature, humidity, vibration, ingress protection (dust, gases, liquids, …), radiationReliability (e.g. projected lifespan, cost of failure, etc)Backward-compatibility with existing thingsMounting type (panel mount or not, right angle or straight, SMD or THT, etc)Polarization (preventing connecting things the wrong way around, or to the wrong connector entirely)Blind mating abilityAbility to mate/inmate under loadConnection sequencing (e.g. mate-first contacts for ground)Regulatory requirements (e.g. UL94V flame resistance)Tooling (cost, specialized vs generic, availability, etc)Ethics (conflict materials used)Reconfigurability after initial assembly (can you swap wires if needed, etc)With that said, I have a number of favorites. What I’ve been using less and less are basic 0.1” headers. Instead, I prefer connectors that are inherently polarized, like Molex KK and JST XH. Another I’ve been liking is Molex Micro-Fit 3.0 (and the compatible TE Micro Mate-N-Lok), since it isn’t too big, yet has high current capacity, making it suitable for both signals and power. And with a proper latch (not friction latch), it’s easy to insert and release, but holds securely.Another connector type I’ve come to like for connections between boards is the miniature (0.05”/1.27mm pin pitch) dual-row IDC connector. It uses half-size ribbon cable (0.025”/0.063mm pitch), and the connectors are super easy to squeeze on using a small vise or parallel-action pliers. (E.g. Amphenol Minitek 127)

author: tooki
author_rank: Super Contributor
timestamp: July 15, 2023, 12:20:07 pm
content: Quote from: Microdoser on July 15, 2023, 09:54:22 amI wouldn’t solder ferrules into the board. There are special “board-in” terminals specifically for this.

author: SL4P
author_rank: Super Contributor
timestamp: July 15, 2023, 01:06:03 pm
content: If you’re planning to assemble more than a few of these devuicrs - consider thatANYpoint to point wiring other than a ribbon cable is labour expensive,Individual conductors, crimped or soldered can bump the assembly effort exponentially!Pre-made discrete cables are relatively expensive, whil the various machine or hand terminated ribbons are the most reliable and low-cost option.if you can make daughter-boards where necessary, those board to board interconnects are cheaper than hand-fabrication of any cable assembly.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 15, 2023, 03:04:10 pm
content: A nontrivial question, because there are a great variety of applications, and the motivation can be relatively subtle between use cases.For my own stuff, and many commercial cases: Molex SL (ramp lock) or KK (latching). Smaller: JST XH. I have the pins and crimp tools for these, and a few housings and receptacles.Have looked at Pico-SPOX or -Blade things before but not needed them as yet. Also various by Samtec etc. say if you need 2mm, 1.27 or even 1mm pitch.Have seen 1.25mm by JST or Hirose on various things. Not so common over here I think, but many are available from the usual distributors, and some are shielded which can make for interesting compact data cables (with microcoax or twist) without depending on (ab)using commodity/standard cabling like USB, SATA, etc.For less-often-connectored stuff, plain headers are still compatible with crimp connectors, while also being shovable into breadboards, or soldering board-to-board, or wire wrapping if you're into that, or just clip leads.For freer wiring purposes, spring and screw terminals are good. Particularly for panel wiring, as for industrial controls, some breadboard/proto/test stuff, etc.Connector systems with multiple points of contact are good for more current. The basic pin header stuff, with usually two finger or prong contacts, are good for a couple amperes. Pins don't really need to be bigger (a 0.025" square post is, by itself, good for well over 10A, depending on how much heat dissipation is attached to it), it's all about the tiny point(s) of contact and getting enough acting in parallel to do the job. Among cheap header families, the contact styles are largely the same (one or two leaf springs or bumps), just bigger to provide more contact/wiping force plus heat dissipation; so if you need more like 5-8A, the families with 0.156 or 0.2" pitch, and usually 0.045" sq post, are attractive.Which also gets you into pluggable options, like Eurostyle (3.5mm pitch most commonly, with the distinctively shaped plug/socket) and other terminal strip stuff. The 5.08mm Phoenix (and everyone else) kind are quite common and I'm fond of them for medium/light duty power connections; I use 3-5 pin ones for mains and power supply wiring often enough. Some are rated up to 12 and 15A, which is... really pushing it, but 5-8A is reasonable enough. Like, say you have an IEC power cord with 18AWG in it, they're pretty much the same duty.Also these things,https://www.wecoconnectors.com/wp-content/uploads/2019/10/971-SLS_en.pdfwhich are neat that the pin strip serves as friction-lock for terminal blocks or whatever. Insertion is firm, but not quite press-fit. I say "neat", but I guess I do wonder how robust that friction locking really is? (My familiarity with them is more like: seen 'em, seems handy enough to use, but don't know anything about their practical / ongoing reliability in the field.) I can imagine they might wobble loose under combination of cable stress (loose wires and/or vibration), high current or ambient temperature, environmental conditions (high humidity and ambient temperature, corrosive fumes, salt spray) and so on.The same is true of any connector family, of course: the more the joint is allowed to wobble, the more prone to fretting corrosion, chemical corrosion, and generally falling apart and burning up.So, anything that involves multiple contacts, isn't so much an instant suspect, but more to say: every contact is subject to its own risk, and having more contacts is simply more risk.Same thing that makes press-fit connectors such a pain. Besides needing unusually precise dimensional control from the PCB fab, they can just happen to not work. One engineer's quip went something like this: connector FAE meeting. Salesperson: boasts "99.7% connectivity". Engineer: "Okay, so out of this 1000 pin connector, can you tell us which three pins will have failed?" Meeting ended soon after. Of course, real connectors, and real statistics, don't work like that, but even if it's 99.7% for a potential failure at any time during the product lifetime, that's something to consider, whether that consideration means preferring soldered connections, or coming up with creative ways to deal with connectivity failures. (Like, such a connector would certainly be for computer backplane use, and maybe you can tolerate one out of dozens of PCIe lanes dropping, given suitable robustness added to the drivers, or something. Or, if a failure happens on one of myriad power/gnd pins -- they're so redundant, you simply don't care.)Screw terminals, are good when you need a reliable contact, especially at higher currents, and either can deal with the annoyances of screws grinding on wires (the wire ends are not very reusable, have to make sure you get all the strands into the terminal, etc..), or use ferrules (a ferrule kit + crimper is a good idea to have on hand; though I don't have one myself). "Grinding" is also avoidable by choosing rising-cage / clamp style terminals.Terminal blocks and barrier strips are great when you need a simple, low profile connection, the wire needs prepwork anyway (such as crimping), and some time spent doing up the connections is acceptable. They're the preferred method for permanent installation at high currents, say from 10A to 400+. Basically, as long as you're using appropriate sized wires and terminals, you can do whatever you need. They're hard to move and re-do, is the thing -- especially circular terminals where you have to completely back out the screw, but fork terminals are a bit handier, and available up to modest currents.Quick-connect / blade terminals are in a similar class, up to 30 or 50A, depending on size of the blade and such. Crimp onto wire, easy to mate, compatible with a number of components; mostly mains-related stuff: fuses, rectifiers, switches, relays, thyristors...And there are various (semi-?)standard and specialty connectors for high currents, like Anderson powerpole for batteries, and bullet and circular connectors, made with myriad contact fingers lining the hole to ensure good contact and high ampacity.Quote from: tooki on July 15, 2023, 12:20:07 pmI wouldn’t solder ferrules into the board. There are special “board-in” terminals specifically for this.Specifically, this kind of thing:https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/3-770060-1/1125641I've seen them used on PSUs before, for direct solder-in wire-to-board. The wings/blades hold them in place, greatly facilitating a wave solder production process. You probably wouldn't bother with them outside of production. Even smaller quantity production I think I've seen wires just inserted (carefully; again, mind the strands!) and either kept in place by jig for wave soldering, or hand soldered entirely. Perhaps in the 1000s/yr you start to look for more automated and reliable methods like these?For proto, and limited production purposes, you can also SMT a wire. Just blop it onto an adequately sized pad and go. You see this often for piddly stuff like battery or LED or switch or connector leads on cheap commercial stuff, toys, etc., usually with a quite generous blob at that. The solder joint is easily peeled apart, so it's not good for thick wire, power connections, especially when taking up flex and strain. The cheap cases usually have quite fine wire going in, which inevitably fatigues at the joint (a hazard with any soldered wire), since the solder blob is much bigger than the wire. But, given those limitations -- it's not like it'll spontaneously fall apart, it's perfectly adequate for such applications.There's also permanent solder-in crimp styles where the wire crimps onto a pin, often as part of a connector. Ribbon cable IDC connectors often use this on one end, to make a permanent flexible connection from one board, to a connector on another. See also: flex cables and connectors.Oh, and to come full circle -- there are pierce/crimping pins for use with flex cables, that mate with standard e.g. Molex KK series connectors, among others. My TDS460 scope makes broad use of these, for example. (Oh, come to think of it, they're probably not Molex KK... but maybe the nearest AMP equivalent?)Tim

author: tooki
author_rank: Super Contributor
timestamp: July 15, 2023, 03:30:05 pm
content: Quote from: T3sl4co1l on July 15, 2023, 03:04:10 pmBy ”pierce/crimp” you probably mean “insulation displacement” (IDC). (No crimping is actually involved.)Yeah, you’re thinking of the MTA-100 from TE. I’ve used them, too. What’s nice for the hobbyist is that the plastic tool for low-volume production is inexpensive. Molex used to make IDC versions of KK, but discontinued them at some point, so it is theoretically possible that your scope uses KK.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 15, 2023, 05:35:55 pm
content: Nah, I mean like this:https://www.nicomatic.com/family/107(not going to search for brand names, this is just the first thing that popped up with keywords, and looks about right, give or take number of prongs and stuff)It's kind of both, because obviously it displaces the insulation, but it's also clinched or crimped around it. At least, that was my impression last time I looked at the stuff.I'd have mentioned MTA-100 earlier, with the KK/SL stuff; yeah, common enough, haven't really used it myself but have designed in a few parts on client request. Does have some issues from the IDC loosening. I suppose IDC would be worse for individual wires than for bonded arrays thereof, but also you don't tend to use ribbon cable for power whereas MTA is intended for regular currents (couple amperes) so you can get temp rise that exacerbates things. Again, the principle of multiple connections applies; more connections simply means more chances for failure. Granted, there are two different mechanisms / failure patterns in this case. from the two different kinds of connections (pin-leaf, IDC), but taken together, yeah.Tim

author: tooki
author_rank: Super Contributor
timestamp: July 16, 2023, 03:06:16 pm
content: Quote from: T3sl4co1l on July 15, 2023, 05:35:55 pmOhhh, I see. By “flex” you meant “flat flex”. (Note that in much of the world, “flex” alone simply means “stranded cable”, not flat flex, so I thought you were thinking of stranded wire.)I actually just used a part with Crimpflex pins last week! (An eTape water level sensor strip.)

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 17, 2023, 04:36:12 pm
content: Quote from: tooki on July 15, 2023, 12:20:07 pmWhat problems could arise from using ferrules, or alternatively what benefits do the terminals provide that ferrules don't?

author: tooki
author_rank: Super Contributor
timestamp: July 19, 2023, 10:53:11 am
content: My concerns would be the solderability of the ferrule material, plus the fact that ferrules aren’t necessarily crimped down all that hard — their primary purpose is to keep strands together, but the screw terminal is what really squeezes down on them hard. “Board-in” terminals use proper airtight crimps.

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 21, 2023, 01:51:57 pm
content: Quote from: tooki on July 19, 2023, 10:53:11 amI'll use a screw terminal with ferrule ended wires then, I reckon.

author: tooki
author_rank: Super Contributor
timestamp: July 22, 2023, 12:49:16 pm
content: You can also get spring-loaded terminals (e.g. from Wago or Phoenix Contact) that solder onto the board and accept stranded wire directly, without even needing a ferrule. (Highly recommended if your application is high-vibration). You can also get pluggable terminal blocks using spring terminals.