Method to solder wires onto "Through Hole" pin

Thread Starter


Joined Mar 13, 2015
Hello Everyone,

I have an encoder that has a "Through Hole" mounting style. I tried looking through mouser's website to find encoders that has a threaded pin, so it will be easier to solder wires onto it. Whenever I solder wires onto the pin of the encoder I have right now, it keep falling off. It is not very stable. I already bought the knobs for the encoders, I wish to find the encoder that will fit into the knob. At the moment, I am losing hope on buying the encoders that has the dimension to fit the knobs I have now.

Are there external hardware I can solder/mount onto the encoder to make the attaching/soldering wires onto the pin easier?

This is the encoder I have now:



Joined Nov 24, 2012
I would layout small circuit boards to mount the encoder to with holes to solder your wires into.
Express PCB is who I use because it's easy and fast, could have the boards is about 3 days.


Joined Mar 30, 2015
I suspect a problem with your soldering preparation or technique. Post a picture of your soldering and describe your prep steps. A treaded surface would likely exacerbate your attach issue.

In general, a joint that has some mechanical support before solder is applied will be more reliable.

Roderick Young

Joined Feb 22, 2015
If the wires are going to wiggle, it's going to be hard to keep them connected by solder alone. I'd use a small piece of heat shrink tubing to keep the joint in place. The other thing that will help is to anchor the wires to the chassis somewhere near the encoder, so that they won't wiggle so much. Even a little piece of duct tape or dab of silicone cement will be better than nothing. Personally, I'd be too cheap to make a little PC board just for a part like that, but if you do (and don't etch the board yourself), could be the least expensive solution for a tiny board.
Let's assume for the time being that this is a "one of" and that you may not be that experienced with soldering.

As suggested, a small PCB with a would not be unusual in a manufacturing environment.

What solder are you using?

If you can use 60/40 lead solder,it's one of the easies solders to work with and it has a reasonably low solidus and liquidus point. Solder does come with a flux core.

The big deal is you have to heat the more massive piece first. Tough in this case.
So, let's pretend and even practice by soldering a stranded wire to a resistor the "wrong way".

Resistors, sometimes don;t solder well if they are old, so clean the leads up. Your encoder should be fine. Twist the stranded wire together about the length of what you have on your encoder. Clip the lead on the resistor so it's about the size of the encoder lead.

"Tin" both things. So apply heat to one side and solder to the other. That's already a problem, right? These "third hands" are very useful.

Once you have both "tinned", position them touching using the "third hand" Heat the larger object and "hopefully" you'll have a decent joint.

When your done, you would want to place a piece of heatshrink tubing on the joint. Most heat shrink tubing is 2:1, but 4:1 can be had. You don't want high temperature stuff. A match does a good job shrinking the heatshrink.

Once you've created your harness, if you want to call it that. Say it's a connection to a plug of some sort. More issues now, like crimping.

But, you really need to "strain relief" those wires. It might be a tiewrap or it could be a small L-bracket and a tywrap holder. It could be to your panel. Whatever it is, you can;t yank directly on the pins on the encoder.

One of my favorites is this:
It's designed for cables, but you can always use one end any tie a small bundle to them.
You can sometimes put the nut or the screw in the recess. The screw works better.

The small PCB accomplishes the soldering and strain releifing at the same time. The wires you solder to the encoder, should be about the same size as the pin.

Ignore a bit of what I said because the part does have a solder lug. This means a pin with a small hole in it. The wire you use has to fit through the hole. It really should be stranded. So, strip, twist, insert; and twist so it's mechanically sound. Now solder.

In general heat the larger mass first and apply solder to the part opposite the tip of the soldering iron.

Teaching someone to solder is pretty easy if you can observe them. I can braze or silver solder, I've worked with quartz and pyrex and I can do copper pipe soldering and I can even tig mig and stick weld, so I don't have any issues. I've used all sorts of alloys from pure Indium to pure silver.

A friend asked for my help to install a water heater. I basically let him watch me and then he practiced and then he graduated: he then did all of the joints that would not be a pain to re-do while I watched. Later, he did a project on his own with no leaks.