When soldering headers, usually single and double pins, I flip the board over so the pin rests on the surface and then solder them. They never come out straight. It would be great if someone has figured out how to do this correctly?
Solder ONE PIN. Reheat the solder while pushing down to make sure the element is flat. When convinced, solder the rest of the pins. As a last step, reheat the original joint just to make sure it wasn't moving as it cooled, which is a bad thing for a solder joint. This technique works equally well for through holes and SMT.
I've used a PCB cradle with a foam cushioned arm that works pretty well. You can hold down elements and then rotate the board.
If these are boards that you are designing, then is there something you can do to make it easier to solder header on straight. If you stagger the holes like this:
...then the header will essentially lock into place when you insert it. Doing it this way, you probably won't even need any special soldering techniques.
If you're using Eagle, SparkFun's library has many pin header footprints that "lock" like shown.
If I'm soldering parallel rows of headers, I'll often put the headers into a solderless breadboard and put the board on top, and then solder the pins. The breadboard keeps the headers nice and straight during soldering.
I have a few techniques that I use from time to time:
- Solder one pin while holding the opposite end. Reheat the solder and straighten.
- Use painters or masking tape to hold the pins in place, especially when the pins aren't on the board edge. Again, solder one pin, then straighten as needed.
- If you have the PCB in a vise or "helping hands", use another helping hands to hold the pins in place. Depending on your setup, you can solder the pins in straight with no further adjustment (check before you solder additional pins).
- If you're soldering a lot of something to a board, and making multiple boards, it may be worth your time to make a jig. I do this for LED's as well as various connectors/headers. The jig can be wood or plastic (beware of ESD, though). I use a drill press to make holes of the correct depth. Populate the board with the headers, place the jig over it to hold the pins/LEDs and then turn the whole thing over. The jig will hold the PCB in place as well as keep components straight. This depends quite a bit on your board design, so your mileage may vary.
I fix components (one at a time) with school putty (the white putty that leaves no marks) before soldering. WOrks very well.