Mifare RC522 RFID

Please add any feature requests for Flowcode version 6 here

Moderator: Benj

Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
jgu1
Posts: 1191
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: Mifare RC522 RFID

Post by jgu1 »

Hi Again! :D

After managed to get my (Ben´s) RFID reader working I have played with it. I try to add more tag´s/card. I did it my way and I like to share if anybody can use it. I am sure there is a more EASY or CORRECT way to do it, and if, I am very interested to see how to do.
If you want to use it, you can easy see how I have done in the program. I have already 2 card in the att. program.

I have used an I2C display. To read your tag, activate D2 hold the card/tag to the reader and reset the Arduino, and after init you will read the numbers as you can add in the program. After typing the ID in the program, compile and let D2 be low, and you should now e able to use/acces with your card.

Best regard

Jorgen
Attachments
MFRC Example-MultibleUno.fcfx
(21.08 KiB) Downloaded 405 times

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hello, everyone,

I have Flowcode PIC, you can use the flow chart in a pic16F1939 and use the same component RFid MFRC522 :?:

Thanks
Enrique

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hello

I have a RC-522 RFid dispose of a card and a keychain, but I not know your ID, arme this example and adapt to a PIC16F887 is initialized but not read the ID card, could someone help me, is not know connect wrong RFid or I do something missing in the programming, connect the RFID and the PIC to 3.3v, the Display connect to 5v, the connection between the PIC and the RFID is direct, I appreciate if someone could help.

Thank you
Enrique
Attachments
MFRC Example887.fcfx
Flowchart
(9.7 KiB) Downloaded 356 times

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hello

I spent the weekend doing tests with the component; use a PIC16F887 and PIC16F1939, but I can not the card is read, if anyone has tested RFID component with PIC's MFRC522 appreciate any help, I interested in this RFid because it is very economical 5 dlls and easy to find

Thank you
Enrique

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hi Benj and STibor,

thanks; if someone serves MFCR522 component works perfectly with PIC, it was bad soldier RFID component, I'll play with this RFID, thanks to Benj and Stibor by this component.

Thanks
Enrique

User avatar
vovikas
Posts: 4
Joined: Tue Jun 14, 2016 8:58 am
Contact:

Re: Mifare RC522 RFID

Post by vovikas »

Hello,
I try to read serial, but rc522 component give me incorrect number. Card number 236780691, hex may be 93 FC 1C 0E 7D, logic analyzer gives me same number, but component show 1C FC 1C 0E 7D. First number repears third. And this is on all cards.
Attachments
analyzer.JPG
(118.2 KiB) Downloaded 4661 times

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hi Vovikas,

I have only three cards and each delivery different code me and always the same in each, I made a little switch using RFid.
You used the same PIC or any change in the flow chart? The electronic circuit is properly configured? Originally I was trying to work, and I always gave different codes on all cards, sometimes also were repeated 3 or 4 times and then took another code. The flaw I found is that touch the solder on the PCB and the fault was corrected.

Enrique

User avatar
vovikas
Posts: 4
Joined: Tue Jun 14, 2016 8:58 am
Contact:

Re: Mifare RC522 RFID

Post by vovikas »

I tried several cards of 1K, 4K, RW types. All of them gives me similar codes on 1-st and 3-rd positions
Attachments
uart270.JPG
uart270.JPG (36.43 KiB) Viewed 14433 times

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hi
I send an example that reads the code of the RFID tag using a PIC16F887
Attachments
MFRC_READ.fcfx
flowchart
(8.93 KiB) Downloaded 333 times

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hello

I am installing the RFID in a box, but the card can not be read, you can put an antenna outside (PCB or wire) of the box and connect it to the RFID, to that the signal is stronger and can be read.
Someone tried to do this :?:

Thank you
Enrique

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hello

I did several tests, but fails to work, adapts the RFID outside the box.

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Mifare RC522 RFID

Post by Benj »

Hello,

I have been doing some mods for the v7 components and found an extra command to turn up the gain on the receiver. Hopefully this new component should allow you to use the module inside a box.
RFID_MFRC522.fcpx
(12.07 KiB) Downloaded 333 times
Let me know how you get on.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Contact:

Re: Mifare RC522 RFID

Post by STibor »

Hi Ben!

Upload source components?
If you look at the components of my work I read faster initialization than what you have uploaded. (I do not know how much the standard timing, a hardware I tested the fastest operation)
Unfortunately I did not manage to implement SPI dynamic configuration settings.
Therefore, if you need to be changed in the settings for each SPI export (export component) for the macro components.

Thanks for the answer.

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hi Benj and Stibor

thanks, I'll try to see if it works

Enrique

User avatar
vovikas
Posts: 4
Joined: Tue Jun 14, 2016 8:58 am
Contact:

Re: Mifare RC522 RFID

Post by vovikas »

Hi, Benj,
I tried new component - now it really work in soft channel connection, but as I later write first ant third numbers are same. May be an error in component module?

User avatar
vovikas
Posts: 4
Joined: Tue Jun 14, 2016 8:58 am
Contact:

Re: Mifare RC522 RFID

Post by vovikas »

Hi, electron67
I make an experiment with external PCB antenna - adding about 13cm simple wires - it works beautifu!
Attachments
20160704_151231.jpg
20160704_151231.jpg (267.38 KiB) Viewed 13779 times

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hello Vovikas

I made two RFID readers and work very well, they are accurate in reading, I'll try with these antennas;
the reception is widespread?
The distance reception that worked 3 to 4 cm

Thanks
Enrique

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

HI

Buy 30 cards had the same readings RFidy the first and third equal, I think it is a normal reading, but all different, and every time I read them, have the same values individually

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Contact:

Re: Mifare RC522 RFID

Post by STibor »

electron67 wrote:HI

Buy 30 cards had the same readings RFidy the first and third equal, I think it is a normal reading, but all different, and every time I read them, have the same values individually
Hi,

That's not good.
It is very rare that the first 5 bytes identifying the two values are equal.
Try this component.
Unofficial components for myself I made 26 pieces RFID reader works. RS485 Modbus protocol.
Unfortunately, the SPI parameter setting is not ready yet. (no answer my question)
Basically the same as the previously uploaded source.
Still missing from the RF power setting i want to do because of the nearby RFID devices interfere with each other.

Open source the project started, the Flowcode v7 finally killed him.
I am very sorry that this way end.
Last edited by STibor on Tue Nov 01, 2016 11:19 am, edited 1 time in total.

electron67
Posts: 294
Joined: Sat Jan 12, 2008 2:08 am
Contact:

Re: Mifare RC522 RFID

Post by electron67 »

Hi

I think that the first and third reading was the same; I'll try to update the component

Thanks
Enrique

Reinier
Posts: 4
Joined: Sat Jul 25, 2015 12:52 pm
Contact:

Re: Mifare RC522 RFID

Post by Reinier »

Hi,

I find also wrong data:

I tried your macro RFID_MFRC522.ftpx (several releases) using an Arduno RFiD board RFID-RC522 ,
I connected this Arduno board with a EB006 multi programmer EB006 on port C . Of course, I use a level shifter to separate the 3.3 and the 5.0 voltage circuits.

I have communication, but I get wrong data (except byte 1 to 4 are right !)

I Compare these data on several Mifare 1k cards and tags with the conventional EB052 RFiD board

I used the same (pre scribed) sequence to read the cards/tages :
1st : Card reading check 2nd: BlockRead and finally read data from buffer.

I cannot understand why only the bytes 1 up to 4 of the UID block (page 0) are right. All other bytes are wrong I check also the BCC byte : this is a XOR checksum of the UID bytes. And this is wrong using the Arduno board and OK with the EB052 board !!

block 0 (page 0) of the Mifare 1k card
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
UID BCC SAK ATQA MFD

It is remarkable that I can read only bytes 1 to 4 on the card if I use the RFID-RC522 with macro RFID_MFRC522.ftpx.
I connected the SPI lines to PIC 16F1937 (using level shifter MAX 3002) as follow:

CS => PC0
RST => PC1
SCK => PC3
MISO => PC4
MOSI => PC5

What can be wrong

Reinier

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Mifare RC522 RFID

Post by Benj »

Thanks I'll look into this.

User avatar
Benj
Matrix Staff
Posts: 14865
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Mifare RC522 RFID

Post by Benj »

Hello,

Right I have put an EB052 and a MFRC522 RFID reader head to head to do some tests reading the first 10 bytes from memory block 0.

I have collected the data returned from the EB052 reader and compared it with the data from the MFRC522.

EB052: 20, 97, 29, 129, 233, 136, 4, 0, 71, 193
RC522: 20, 97, 29, 129, 233, 0, 0, 0, 0, 0

so for me the MFRC522 for me at least seems to be working well for the UID bytes but the data is not coming through correctly.

I'll comb through the component again and see if I can find the cause of the problem.

Post Reply