Connecting multiple HATs

Hi

I am working on a project which will probably end up using more than one pan-tilt HAT like (https://core-electronics.com.au/pimoroni-picade-pan-tilt-hat-full-kit.html).

I also have an Arduino board as shown in the attached image.

Was hoping for some help on the following:

  1. Is there a good way to connect multiple HATs together (even with an external power supply to handle the load)? Otherwise, seems to me that I have to have 1 Pi per HAT
  2. Is there a way to connect HATs to the Arduino board shown in the picture? I’d previously got a recommendation for this (Nordic Semiconductor nRF52840 USB Dongle | Core Electronics Australia) but was wondering if there was a wired alternative?

Thanks in advance

1 Like

Hi VX
What Arduino board is that. Can’t seem to find it by looking at pictures and doesn’t indicate on the pic you posted.
Cheers Bob

Thanks for this @Robert93820

It’s this one: LSS-ADA Board (USB Mini)

1 Like

Hi Bob
It turned out to be a LSS-ADA Board (USB Mini).
Cool little thing.

@Vx2124 when combining multiple hats the key thing to be thoughtful of is which pins each hat uses.
For instance.
If Hat A uses pins {3,4,6,8,12} and Hat B uses {1,5,14,15}. They can share a micro-controller.

I remember that you wanted to use many motors, so pins were a premium. The Xbee motor controller you have will probably require almost all the pins no matter how you ration them.
You’re smart, so if you wanted to do this double hat trick, I bet you might eventually find a way… but I personally don’t think it’s the best use of your time. :stuck_out_tongue:

Still keen? Awesome! This is what you need.

1 Like

Thanks @Pixmusix (for the compliment too :slight_smile:

As you said, it’s a lot more efficient keeping them separate as a single threaded controller can fire off command.

I guess I could get the cheaper Pis for this and stack them up. I suspect I’ll need the GPIO extender cable (Raspberry Pi GPIO 40-Pin Ribbon Cable | Core Electronics Australia) for this though - all the wiring will be fun.

This is a new area which I am really enjoying learning and I also learn a lot from your experience. It’s really good of you to take the time to answer my questions.

Thanks a lot again :slight_smile:

2 Likes

Mate my pleasure.
There are heaps of people here with waaaay more experience than me.

Unless size is a premium I rekon compartmentalizing the task is better. I personally find two micro-controllers doing two simple tasks is way easier than one micro controller doing 2 tasks simultaneously. One of the tasks goes wrong, you know exactly which device to blame and the code for that device will be focused and easy to debug.
We had a look at different options for cross-device IO in a previous thread if you need synchronization. :slight_smile:

1 Like

Yes, I did read your previous reply on inter-controller communication and am testing them out :slight_smile:

Am writing the simulation code now and setting limits and so on.

Thanks again :slight_smile:

1 Like