Can i use double Shield(CAN & SD) on MKR WiFi 1010?

I would like to ask whether it is possible to use the Arduino MKR CAN Shield and the MKR SD Proto Shield together on an MKR WiFi 1010.

I assume it might not be possible because both shields utilize the SPI interface, and there could be conflicts in communication.

Here are the product links for reference:

Thank you for your assistance.

Best regards,
Soonho Kwon

Unfortunately, I don't think so. Whilst it's ok that the 3 SPI signals (MOSI,MISO,SCK) are shared, pin 3 is used by both boards as a Chip Select. It doesn't appear that you can change this unless you are prepared to cut a track and route one CS to a different spare pin.

Yes, you can use both shields with the MKR WiFi 1010, as long as they use different CS (chip select) pins for SPI communication. You'll need to check the default CS pins for each shield and modify the code or hardware setup if there’s a conflict.

They don't use different CS pins. They both use pin 3.

1 Like

Sometimes a person can cheat. Cut a pin, jump a pin.
Cut pin 3 on the upper device so it doesn't connect to the lower device, and jump pin 3 to pin 4 on the upper device.
Just a thought.

1 Like

I think pin 4 is used on the proto shield as the CS for the SD card. Pin 5 looks to be free.

Wait, that was the point. According to other posts, the CAN shield and SD shared the same CS (pin 3). If the proto shield uses pin 4, is there something with the CAN shield that uses pin4?

The CAN shield uses pin 7 for INT and pin 3 for CS (as well as MOSI, MISO & SCK).

The Protoshield uses pin 3 for the CS of the SPI FLASH device and pin 4 for the CS of the SD card.

In order to use both boards together without any CS conflicts, one of the CS signals on pin 3 needs to be routed elsewhere. That's why I suggested pin 5 so that you would have 3 separate CS pins on pins 3 (CAN), 4 (SD) & 5 (FLASH).

I'd probably modify the SD Protoshield as it's cheaper to replace if you have to.

I would mod the proto shield.
I missed the FLASH.
Then yes, move pin 3 to pin 5.

@SurferTim @suemoran @markd833
Thank you to everyone who provided answers.

As I understand it, the basic idea is that since the CS pin is shared, connecting the CS pin to a separate, unused pin should allow everything to work without issues. Is my understanding correct?

Additionally, since SPI communication is shared on a single bus, it seems like CAN communication might slow down due to the SD card storing data. Is this also correct?

Thank you.

Hi @snow07ho05. If you want to use this solution, but in a less permanent manner, you can bend the pin on the shield outward from the board a bit, so that it doesn't insert into the female header on the board below when you plug it in.

You should note that bending the pins, especially if it is done in a manner that results in a sharp bend, weakens the metal. If the pin is bent repeatedly it will eventually break. But if you are gentle with it and only bend it as little as possible, you will have the option of bending the pin back to its original position in case you later decide you want to use the shield normally for another project.

It just occured to me that you could buy some stacking headers - 14 pin ones I think - and insert these between the 2 shields. You can then chop off the pin on the stacking header to break the connection so the only mod is a wire link which could easily be removed.

Yes, that is possible. Any time you have to share a resource - in this case the SPI bus - there can be issues if one device on the bus takes too long to respond or carry out its task.

I'm not familiar with CAN bus operation so can't comment on the effects on the actual CAN bus. Perhaps the messages on the CAN bus just carry on and the node looses messages whilst it's SPI bus is in use for other tasks.

EDIT: Another thought - You can solder the wire link between the 2 pins on the stacking header and just the chop the pin short on the header. That way you don't have to change anything on the MKR shield.

1 Like

@markd833 @ptillisch
Thank you so much everyone!
Thanks to you, I think I'll be making progress on my project!!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.