Do HATs need a particular 5v?

Hi all

New here, and my first post is a pretty dumb question, I think. I’m trying to get two HATs (Unicorn HD and Pan Tilt) working at once, using a spare female header (to sit on the Pi) and a bunch of wires with male header pins attached. If it works, I’ll blob on some (not too) hot glue to keep the wires a little more secure. says both HATs need 5V from pin 2. So the dumb question is: will either HAT notice if its power comes from pin 4 (but is still supplied to pin 2) instead?

I could easily solder a couple of wires together to branch off pin 2 if needed, but I think that won’t look as neat as using a separate pin for each HATs power, and there’s a bigger chance of stress on either wire dislodging both of them. Both pins simply supply 5V, right? And the HAT won’t know the difference, as long as it’s coming in via pin 2, right? Is there anything else I should be considering here?

It doesn’t matter where the 5v comes from. As long as you have a nice clean 5V and a good ground it should work Ok. Be advised though, that you may have to hook up several of the ground pins to get a Hat or pHat to work. They are all a common ground on the Pi, but may not all be common (wired together) on the Hat or pHat. They count on them all being plugged into the Pi.
As an example, I have the LED Shim and I only wired up the pins used. On the pinout pin 6 and pin 20 are shown as used. If I don’t connect pin 6 and pin 20 to ground it doesn’t work.
Check the pinouts to see if more than one ground is shown as in use.

EDIT: Pin 2 and pin 4 are the same 5v. The two pins are a common connection. You can use either one on the Pi end, just be sure to use the one listed in the pinout at the pHat end.

Also, if your just putting the male jumper pins into the holes on the pHat (where a header should soldered on), expect issues. Its likely not going to be a reliable hookup. Don’t be surprised it you get io errors etc when you run your scripts.

Thanks, alphanumeric. No pHATs are involved here - just two HATs, with their standard pre-soldered female headers, hence the recklessly hacky male pins (I’d use a full header, but for some reason I only have one spare, so figured I’d save it for another project and use the single pins).

All working perfectly right now, and fortunately I’ve had no weird issues* with ground (just connected both HATs’ pin 6 to my Pi’s pin 6). I just went ahead and used a couple of wires soldered together running off pin 2, but good to know for future reference that 2 and 4 are the same 5V source, just in different places.

Thanks again for the help!

(*That sounds like a really odd design choice with the LED Shim - I wonder why that is?)

I did some printed circuit board layouts years ago. It gets tricky routing your tracks where you want, especially if the board is small and only double sided. Multi layer boards make it easier but are way more expensive to design and build. The LED Shim is very small (narrow) and would normally have all 40 pins plugged into the Pi. sometimes you have no choice but to make compromises. It works as intended.
Mine is mounted separately off to the side. I used only what connections I had to and ran only 4 wires to it. I just soldered a jumper on linking the two ground pins together. Plus the pinout shows you that both are needed / used. Full build pictures are here if you want a look see.!AjOYwiwlwDtpgsVkNRFKrcQ8HARM0Q