People seem very reticent about soldering headers to their Pis. Nobody else seems to be blogging or vlogging about it.* D’you know what? I think it was a really magnificent oversight that the original Raspberry Pis shipped with the 26 pin GPIO header on. In case you didn’t know, the original plan was to leave them off, but they didn’t get deleted from the design before the factory quoted for manufacturing – and they’ve stayed on ever since.
Without that happy accident, I don’t think I would have ‘gotten’ so heavily into interfacing. You see, I think I might have been a bit scared to solder a bunch of pins onto my Pi. I think a lot of people are reluctant to do that too, which may be why not much has been written about use of the P5 header on the Rev 2 boards.
Rev 2 Raspberry Pis (including model A) have holes for a P5 header
When I got my first Rev 2 Pi, I was quite keen to try out the P6 reset header since nobody else had blogged about it apart from Eben’s original announcement.
Now I find myself in exactly the same position again regarding the P5 header. I haven’t read a single blog or forum post about anybody using a P5 header. I’ve been thinking about it on and off for weeks. There are some practical issues around it, which is why it’s taken me such a long time to figure out the best way (for me) of overcoming the issues.
So what are the issues?
P5 is right up against the main GPIO header (P1).
It was designed to be soldered in from underneath so as not to “foul” the P1 header pins.
OK, but that causes issues, namely…
- makes it hard to use the Pi with a case
- increases the height of the Pi
- is generally awkward
- means you potentially have connections on 4 sides AND two faces of the Pi
- not very aesthetic
…so I’ve been pondering for ages (“for the longest time” as they say in the US) how to overcome this problem. Last night I hit on a possible solution, which is rather “outside the box”. More on that in a minute.
Possible “conventional” solutions are…
- female header on top
- male header on top
- male header underneath
- female header underneath
- right-angled male header underneath
- right-angled female header underneath
I even considered soldering wires directly to the through-holes. But that just seemed silly.
None of those ‘did it’ for me
None of the above list quite ‘did it’ for me. The closest would be a right-angled female header underneath. If you snipped off the ends of the 8 protruding pins from P1, you could get this as a ‘flush fit’ and it would be OK – as long as you weren’t using a case. I was going to go with this option until I started fooling around with an angled male header, reversed from underneath. The pins only stuck out the top about 2/3 of normal pin height. And then my hand slipped and the pins angled away from P1. Inspiration struck. :)
“I wonder if I could solder them at a slanted angle pointing away from P1?”
OK, it looks a bit “wrong”, I’ll give you that, but consider the upside…
- It doesn’t need wires connecting to underneath
- It doesn’t increase the height of the board
- It should work with any case that works with wires attached to P1 (more or less)
- It doesn’t stop you attaching a Gertboard or ribbon cable
- It should still allow fitting of most “above the Pi” add-on boards (except PiCrust)
You won’t be able to use the pins with most add-on boards attached, but at least it shouldn’t prevent their attachment.
I think we have a winner. ;) Hence the “leaning header of Pi5a” was born. It’s on a Raspberry Pi, header P5 on a model A, hence – Pi5a. Kind of appropriate for a slanted header, don’t you think?
(I think Helen over at the Raspberry Pi Foundation might like that one.)
Tricky soldering the inner pins
It was quite difficult to solder the two inner pins next to P1. In the end there was no choice but to do the six I could reach, then prise the plastic base off the other side and do two from underneath, using a female header (from the top) to get the pin alignment right. Next time I’ll take a female header, push eight bare pins into it, hold from the top and solder from underneath. This will be much easier and should completely avoid getting solder on the pin uppers.
Despite that “learning opportunity”, it worked out really well. All the pins do exactly what they’re supposed to do and all four new ports work fine as outputs. I have yet to test them as inputs, but if they work as outputs, they’ll probably be fine. :)
See for yourself in the video.
* After I finished this article I found just one reference where someone had documented soldering on a P5 header. And guess what? They chose a very similar approach, but with longer pins