Arduino W5500 + RFID not working

Hi Forum,

i am struggling with my setup.
I want to connect my RFID module (Sunfounder RFID-RC522) to my Arduino (DFRobot W5500) Leonardo compatible.
I connected it the following way:

ARDUINO RC522
3.3V VCC
PIN 9 NSS
ICSP1 (MISO) MISO
ICSP2 (VCC) (not connected)
ICSP3(SCK) SCK
ICSP4(MOSI) MOSI
ICSP5(RST) RST
ICSP6(GND) GND

I tried this Sketch:

#include <SPI.h>
#include <MFRC522.h>

#define RST_PIN		9		// 
#define SS_PIN		10		//

MFRC522 mfrc522(SS_PIN, RST_PIN);	// Create MFRC522 instance

void setup() {
	Serial.begin(9600);		// Initialize serial communications with the PC
	while (!Serial);		// Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
	SPI.begin();			// Init SPI bus
	mfrc522.PCD_Init();		// Init MFRC522
	ShowReaderDetails();	// Show details of PCD - MFRC522 Card Reader details
	Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
}

void loop() {
	// Look for new cards
	if ( ! mfrc522.PICC_IsNewCardPresent()) {
		return;
	}

	// Select one of the cards
	if ( ! mfrc522.PICC_ReadCardSerial()) {
		return;
	}

	// Dump debug info about the card; PICC_HaltA() is automatically called
	mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}

void ShowReaderDetails() {
	// Get the MFRC522 software version
	byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);
	Serial.print(F("MFRC522 Software Version: 0x"));
	Serial.print(v, HEX);
	if (v == 0x91)
		Serial.print(F(" = v1.0"));
	else if (v == 0x92)
		Serial.print(F(" = v2.0"));
	else
		Serial.print(F(" (unknown)"));
	Serial.println("");
	// When 0x00 or 0xFF is returned, communication probably failed
	if ((v == 0x00) || (v == 0xFF)) {
		Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?"));
	}
}

But i only got this error:
MFRC522 Software Version: 0x0 (unknown)
WARNING: Communication failure, is the MFRC522 properly connected?
Scan PICC to see UID, type, and data blocks…

Anybody who can help me?

regards
Daniel

Dannyboy2209:
PIN 9 NSS

#define RST_PIN		9		// 
#define SS_PIN		10		//

MFRC522 mfrc522(SS_PIN, RST_PIN);	// Create MFRC522 instance

Dannyboy2209:
is the MFRC522 properly connected?

Answer: No.

Question: Is the MFRC522 5v tolerant on the SPI lines?

Hi, thanks for your answer.
Can you please help me connecting the reader correctly?
And what do you mean by: Is the MFRC522 5v tolerant on the SPI lines?

Regards
Daniel

And what do you mean by: Is the MFRC522 5v tolerant on the SPI lines?

It means that the MFRC522 is a 3V3 system and yet the Arduino sends out 5V data signals. Will this damage the MFRC522?
The answer is yes it will.

So buy a new one.
Solution use logic level shifters between all Arduino outputs and MFRC522 inputs, a 510R and 1K potential divider will do it.

Just to amplify @Grumpy_Mike's post, have a search for "SPI Level Shifter" or "SPI Level Translator". When you fully understand that, then digital pins 8 and 9 for RST and SS look OK to me. Have a browse and do a little research then come back to the forum with the bits you don't understand.

+1 karma for clear question.

To be clear on what you need:-
ARDUINO RC522
3.3V VCC
PIN 9 Level shift needed NSS
ICSP1 (MISO) MISO
ICSP2 (VCC) (not connected)
ICSP3(SCK) Level shift needed SCK
ICSP4(MOSI) Level shift needed MOSI
ICSP5(RST) Level shift needed RST
ICSP6(GND) GND

Hello
Thanks a lot for your answer.
What i do Not understand is why do i Need a Level-shifter?
The RFID is connected To The 3.3V Output.
So why will The Module be Damaged?
How do i have to connect The Level shifter to The arduino and The MFRC522?

Greetings
Daniel

The RFID is connected To The 3.3V Output.
So why will The Module be Damaged?

Because the Arduino is sending 5V signals. As a general rule you should not exceed more than 0.6V above the supply voltage for a chip. A look at the data sheet for that chip confirms that rule applies in this case.

How do i have to connect The Level shifter to The arduino and The MFRC522?

See replies #5 & #3.