Connecting Multiple Modules to one Arduino

Hey so I’m a complete beginner on my first project. I want to connect an Rfid-rc522 module to my arduino nano but at the same time a micro sd card module. Everything works fine when i run my code using just my Rfid-rc522 module along with the battery but as soon as I connect the “data pins”(Mosi, Miso, etc…)
of the Sd card module to the nano i get an error that the nano can’t connect to the rfid module anymore. I know this is probably a stupid beginner mistake but how do I fix this? Don’t laugh but I just soldered 2 wires into 1 so that it would have 3 female heads and connect everything. I’ll upload the plans I made before starting the project. let me know what i’m doing wrong and how i can fix this please.

Hi, @baptistibro
Welcome to the forum.

Can you please post your code?

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Have you written your code in stages.
Code just for the SD card.
Code just for the RFID reader.

Got both of those bits working before combining them.

What are you using as a power source?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

I suspect that you're using a cheap SD card reader. The cheap ones don't tristate the MISO line so it will interfere with the MISO line of the RFID reader.

What micro sd card module should I get then? I’ll send a picture of the one I have as soon as I get home.

Describe the actual power supply you're using.

It’s a 9v battery but i’m not connecting it right now it’s being powered via the usb c

And in future, when you power it from the 9V battery, how long must it operate for? I'm hoping the answer is "just a few minutes", because even that's optimistic.

Some options; note that they might look the same as yours but they ain't.

If you can solder, you might want to try "fixing" the SD module, if your module looks exactly like this:

1 Like

I honestly thought it would go for longer… i’ll find something when the time comes but for now the thing doesn’t even work when plugged in…

Ok thank you i’ll look into it

I don’t know if it’s faulty though, would this fix the “data pins” from interfering with each other?

The problem is the data pin coming back from the SD card, or from the RFID module, to the Arduino. That's the MISO line, and it's shared by all devices connected to SPI. When one device needs to use the line, the others have to disconnect from it so they won't interfere. The device with its CS line active is the only one allowed to use MISO.

But this module design has MISO active all the time. It still works fine when it's the only SPI device being used, but it doesn't play well with others. So if your module looks like the one in the picture, and it didn't come from Adafruit or Pololu, it's almost certainly defective.

But I would just say that if your alternative is to order one from Adaftuit anyway, you aren't risking anything by trying to fix the one you have.

ok so requiring the faulty microSD module will fix my issue? What about the other ones like MOSI or SCK? Will those be a problem?

I can't guarantee it will solve your problem, but if each device works fine when the other isn't in the circuit, but the other device doesn't work when the SD module is connected, then that's likely to be the problem.

The other three lines are all outputs from the Arduino. They fan out to each device. So they aren't a problem.

Ok ok I get it now, I’ll do the fix and update you asap.

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