How can i permanently attach cables to male headers - Page 1
Forum section: electronics / beginners

author: manuel42
author_rank: Contributor
timestamp: May 03, 2021, 08:42:20 am
content: I've completed my first simple project based on an esp32 board.It only uses 3 pins (3v/gnd/data) and i'd like to attach cables to those pins permanently.I tried soldering cable directly to the pins but failed miserably (Most likely lack of skill).Is there an easier way to permanently attach wires to male header pins?

author: Ian.M
author_rank: Super Contributor
timestamp: May 03, 2021, 09:06:00 am
content: If you don't mind using solid core wirewrap wire, thenwirewrappingworks for any square pin with sharp corners. You *need* the correct wirewrap tool for the pin size and wire gauge (usually 0.64mm square, and 30 AWG silver plated solid core Kynar insulated wire - tools for other pin and wire sizes are very difficult to obtain). However it isn't suitable if the wires will frequently be moved, or, at 30AWG, for high current connections.What problems did you run into soldering wires to the pins?

author: Gyro
author_rank: Super Contributor
timestamp: May 03, 2021, 09:09:50 am
content: Only a general comment as I can't see it...If you already have solder on the pins then it won't be possible to use a matching connector. Soldering is fine as long as you don't heat for too long and let the solder wick up under the wire insulation. What you are missing is some heat-shrink sleeving to reinforce the connection and mechanically protect the end of the wire.

author: Ian.M
author_rank: Super Contributor
timestamp: May 03, 2021, 10:06:04 am
content: Possibly, however I've seen enough horribly soldered wires on pins, so doubt that simply adding heatshrink will be sufficient to fix the O.P's problems.Generally, a joint should be reasonably mechanically secure *before* you add solder to it. i.e. wire end in a cup terminal, tightly wrapped round a pin, or threaded through a tag and hooked back on itself. One can ignore that rule of thumb, and simply tin the wire and sweat it onto the side of a pre-tinned pin, then sleeve it with heatshrink, but that's relying on the solder for mechanical stability, so wont stand up to any significant stress on the wire.Good catch that the pins must be clean and free from solder for a purely mechanical connection to be successful and reliable. If they hadn't been soldered, and the board came with pre-fitted headers, personally I'd have probably used female DuPont terminals in an appropriate multi-way shell, and glued the shell in place e.g. with neutral cure electrical grade silicone sealant, or with impact adhesive or similar. If the headers weren't pre-fitted I'd have soldered the wires direct to the board, through the header pad holes, and depending on the level of movement and vibration expected, strain relieved them with glue.@Manual42: A closeup photo of the offending pins and wires would help us give you better advice.

author: manuel42
author_rank: Contributor
timestamp: May 03, 2021, 10:49:55 am
content: I was able to remove the solder from the pins already and i do use just regular connectors at the moment.The pins of my esp32 board are similar to an arduino nano (With pins) and the board came with the pins already in place.I didn't really know wirewrapping but i'll have a look at it.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 03, 2021, 03:07:05 pm
content: Images of arduino nano:https://duckduckgo.com/?q=arduino+nano&t=hd&va=u&iax=images&ia=imagesProper wire wrapping needs special pis with sharp corners, and these are hard to get by and may be very expensive these days. You'll have to replace the pins too, which would make it a silly exercise.ESP32 boards can be had, starting from around EUR6, which can either be peanuts not worth bothering about to buy a handful of spares, or two weeks of pocket money.But it's probably down to experience. A very big part of the equation is the sort of wire you use. Thin solid core wire is by far the easiest to work with. I usually use 0.2mm "enameled" wire. You don't even have to strip it, you can solder right through the isolation. 0.2mm wire is pretty thin, but it's still good upto a few hunded mA. Good enough for some LED's. or anything on an I/O pin. For power I usually use thicker enameled wire. Partially so it stands out from the thin signal wires, but also for increased current handling.Multi-stranded wire is *&^%$#@! for use on PCB's You can strip it, poke it through a hole and then solder it in a hole. There are very big differences in the temperature resistance of wiring insulation. If your insulation melts for 2cm next to the solder joint, then just do not use that wiring for soldering purposes. There is lots of wiring that have minimum melting even when close to a solder joint, and if you have silicone or teflon insulation, then it does not melt at all at soldering temperatures.Another important point is stress relief.Always make sure that wires do not bend repeatedly right at the solder junction. They break easily after repeated bending at those locations. You can do this by making a bundle of all your cables and then use a tie-wrap to fixate the wires to your PCB a few cm from the solder junctions.Another method is to use a bit of hot-melt glue to also glue the wire to the PCB.Also:Once you've soldered to your pins, then do not put those pins into connectors anymore. That may very well result in unreliable connections, and those are very annoying to deal with.But the best way is very likely to not do this at all.Instead, solder some headers to a matrix PCB into which your ESP32 fits, and also solder some connectors to the PCB to which you can attach wires. Connecting all those wires is quite a bit of work, and especially for beginners or with experiments it's quite easy to damage an ESP32 PCB. If it's in a socket, then it's easy to replace. This can also help with fault diagnosis. If you're unsure whether a fault is caused by firmware (I/O configruatrion) or an faulty I/O pin, you can just swap the ESP32 with another and see what happens.

author: manuel42
author_rank: Contributor
timestamp: May 03, 2021, 07:16:53 pm
content: I do have some of those pcb matrix boards.You mean to solder the esp32 to the matrix board and then solder wires to it?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: May 03, 2021, 07:46:45 pm
content: Nope.I'd say: solder some sockets into the PCB into which you can put your ESP32.Then on the matrix board, you can solder whatever you want to those headers that is convenient for your current application.The main reason is that those 3V3 chips are relatively fragile. Placing them in a socket makes it easy replaceable if needed.

author: manuel42
author_rank: Contributor
timestamp: May 03, 2021, 08:49:59 pm
content: I guess i now understand.Thanks

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 04, 2021, 12:15:14 am
content: Yeah, solder is okay. It's tricky to get a good wrap around the post while clearing neighboring pins -- go carefully, and insulate if you can (cover with heat shrink or spaghetti tube?). Lap joints are... okay, but not recommended for professional use. (If this is a breadboard hack job, absolutely, just slap some wires and solder on there and tape it up or whatever. What's a wire gonna do, fall off? Just solder it back on, right?...)Connectors have modest grip strength, but without anything to key into, they don't hold against tension and vibration. You can provide this yourself, say if you add clips somehow -- this might require something custom shaped to fit around the board, I don't know. (This is not often used, but available, with most ribbon cable headers -- some have notches in the side, that a spring clip can fit into. Bare unshrouded headers though, not so lucky.)Tim