Stacking MKR Arduino boards on top

Hi All, I think I know the answer but can someone please confirm if its possible to stack 2 Arduino boards on top of each other. In this case it is the MKR Wifi 1010 and MKR GSM 1400 ?

Currently they are placed side by side and I have connected them via the I2C pins(SCL,SDA). Apart from those pins I am using the D2-D7 pins on the MKR Wifi 1010 board. No other pins in use from the MKR GSM 1400.

I want to make a PCB so trying to understand if I can reduce the footprint by stacking them on top of each other.

Thanks
Maaz

Please dont stack them.
Only SHIELDS are designed to be stacked.

You could damage both board by stacking !

Thanks for the confirmation :slight_smile:

In the mkr family of boards, we have three types of mkr i.e mkr boards, shields and carrier boards.

The mkr board is the sandwich between mkr shield (on the top of the mkr board) and the mkr carrier board(stacked at the bottom)

//Rachit

I don’t see why this should be a problem. As long as you configure pins only as output on one board at the same time. If you would configure the same pin as output on both boards and write a HIGH on one board and a LOW on the other board I guess that port may break. They can sink 10 mA and the one that is written a HIGH to will source 7 mA.

Also when using SPI or Serial on one board, make sure the output pins are configured as INPUT (not INPUT_PULLUP or INPUT_PULLDOWN) on the other board.

If you use a 5V power supply you could also consider cutting the 3.3V pin so the power management chips won’t pull on each other generating their own 3.3V. Or you could cut the jumper on one of the boards so the 3.3V of one board also supplies for the other.

So I just did a test using this script on the top board of an existing installation that toggles optocouplers, relays and communicating over serial using the RS485 shield and Relay Proto carrier. Everything keeps working normally, no smoke. Without altering the board. It showed the status LED on the top board is in sync with the bottom board because it’s mutually connected to pin 6.

void setup() {
  for (int i=0;i<=14;i++)
    pinMode(i, INPUT);
}

void loop() {
  delay(500);
}

Hot-plugging the top board also works, no problem. Not a guarantee it will keep working of course. I’ll keep you posted if it stops.

Which other way could it damage or interfere?

@engeen

The pins on almost all boards have an initial state that changes during boot.
That would allow the scenario you describe to happen.

There are also the problems that some pins may be in use by some of the shields / carriers which may also give rise to issues.

Better to actually read up on the tech specs before trying to just stack things to ensure you are not going to duplicate a pin of have i/o conflicts.

Of course, you should know what you are doing. But the original question is: can it be done?

To further support that: The datasheet of the SAMD21 on page 408 under section 23.5.2 states:

During Reset, all PORT lines are configured as inputs...

Which agrees with Arduino's own documentation:

Arduino (Atmega) pins default to inputs

Although the SAMD is not an Atmega.