Multiple HATs

My Project uses Pi4s with CanBus HATs (using Canbetty V2.1 right now - CAN BUS Dual V2.1 Shield for Raspberry - SG Electronic Systems) to provide NMEA 2000 connectivity between the Pi4 boxes.

This means that every Pi already has a HAT.

But sometimes I want to add other things.

Is there any way or standard specification for how to add multiple HATs to a Pi?

I will look at the Perma-Proto Hat but that may create other issues…

Cheers

Peter

If you follow the official Hat standard there can be only one. That being said, there are a lot of “Hats” that aren’t really a Hat as they don’t have an ID eprom. That can be a good thing as the Pi can only read one eprom, two hooked up at any one time causes a fail to read the ID(s). You can still use a Hat without an eprom ID so in reality its not a big deal. You just have to set it up manually, and install the software manually.

Long story made short, its doable. I do it all the time. How you do it depends, and it depends on the Hat’s being used. Pin conflicts is the big deal breaker. I use this site a lot. Raspberry Pi GPIO Pinout
i2c can be shared as long as no two devices attached to the bus use the same i2c address. SPI can also have multiple devices on the bus, they just have to each use a different chip select pin.
I’ve used Perma Proto hats with stacking headers to get it done, Proto Zero’s too. It’s an easy way to add i2c breakouts to a project.
I’ve also used pHat Stacks and the Black Hat Hack3r boards.

Ah… thank you.

I did not know about the Eprom. I don’t think the CanBus HAT I’m using necessarily has an Eprom - at any rate I have to install it manually (edit Config.txt and a number of other system files plus download and run CanUtils( to get it to work.

Based on what you said I realize I asked my original question incorrectly. None of the other things I’m likely to want to add are HATs - at least in the sense that they don’t have an Eprom. e.g. two GPIO pins (plus power) to ther power controller which monitors the 12 volt external input and tells the Pi to shut itself down when this is switched off, 4 more to external control buttms that select scrren pages and intensity, another 4 to a speed sensor interface board, 9-axis motion sensor, etc. etc.

So I suppose what I should have said is:

Is there any approved/standard way in which tyhet GPIO pins that a HAT does not use can be connected up to serve other functions?

Cheers

Peter

The Pi Foundation Hats, like the Sense Hat, Build Hat, etc have the ID eproms. Near as I can tell, very few other retailers add them.
There is a version of the Perma Proto Hat with an eprom on it, that you can program yourself. I use the “No EEPROM” version.
There is a Pi A+ under the first one, and the second one is stacked on top of the first one.

The wires got to other sensors and a button.

Thank You… I will try that

Ordering a couple now.

Cheers

Peter

These standoffs come in handy if your going to stack hats.

And these 11mm headers.

Thanks… I already have things like that but stuff that is purpose built the the job is always better. I will order them too.

Cheers

Peter