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: 1141
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1063 times
Been thanked: 281 times
Contact:

Re: Mifare RC522 RFID

Postby jgu1 » Sun Apr 17, 2016 6:55 pm

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 385 times
These users thanked the author jgu1 for the post:
electron67 (Wed Jun 08, 2016 3:16 am)
Rating: 5%
 

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Thu Jun 02, 2016 4:55 pm

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: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Sat Jun 04, 2016 4:25 pm

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 338 times

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Mon Jun 06, 2016 6:17 pm

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: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Tue Jun 07, 2016 12:16 am

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
Been thanked: 4 times
Contact:

Re: Mifare RC522 RFID

Postby vovikas » Tue Jun 14, 2016 9:52 am

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
These users thanked the author vovikas for the post:
STibor (Mon Jun 20, 2016 6:04 pm)
Rating: 5%
 

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Tue Jun 14, 2016 4:07 pm

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
Been thanked: 4 times
Contact:

Re: Mifare RC522 RFID

Postby vovikas » Wed Jun 15, 2016 8:22 am

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.44 KiB) Viewed 13417 times

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Wed Jun 15, 2016 10:49 pm

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 310 times

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Sat Jun 18, 2016 9:01 pm

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: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Wed Jun 22, 2016 3:30 pm

Hello

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

User avatar
Benj
Matrix Staff
Posts: 14676
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4660 times
Been thanked: 4286 times
Contact:

Re: Mifare RC522 RFID

Postby Benj » Wed Jun 22, 2016 5:13 pm

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 319 times


Let me know how you get on.
These users thanked the author Benj for the post:
electron67 (Thu Jun 23, 2016 12:23 am)
Rating: 5%
 

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 115 times
Been thanked: 112 times
Contact:

Re: Mifare RC522 RFID

Postby STibor » Wed Jun 22, 2016 7:55 pm

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.
These users thanked the author STibor for the post:
electron67 (Thu Jun 23, 2016 12:23 am)
Rating: 5%
 

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Thu Jun 23, 2016 12:27 am

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
Been thanked: 4 times
Contact:

Re: Mifare RC522 RFID

Postby vovikas » Mon Jul 04, 2016 12:40 pm

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
Been thanked: 4 times
Contact:

Re: Mifare RC522 RFID

Postby vovikas » Mon Jul 04, 2016 1:27 pm

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 12763 times
These users thanked the author vovikas for the post (total 3):
STibor (Mon Jul 04, 2016 5:04 pm) • EtsDriver (Mon Jul 04, 2016 5:39 pm) • dazz (Fri Jul 08, 2016 8:08 pm)
Rating: 15%
 

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Tue Jul 05, 2016 12:17 am

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: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Tue Jul 05, 2016 3:10 am

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: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 115 times
Been thanked: 112 times
Contact:

Re: Mifare RC522 RFID

Postby STibor » Fri Jul 08, 2016 4:56 pm

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.
These users thanked the author STibor for the post:
electron67 (Fri Jul 08, 2016 8:17 pm)
Rating: 5%
 

electron67
Posts: 289
Joined: Sat Jan 12, 2008 2:08 am
Has thanked: 103 times
Been thanked: 45 times
Contact:

Re: Mifare RC522 RFID

Postby electron67 » Fri Jul 08, 2016 8:21 pm

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
Been thanked: 1 time
Contact:

Re: Mifare RC522 RFID

Postby Reinier » Thu Aug 04, 2016 12:35 pm

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
These users thanked the author Reinier for the post:
Benj (Wed Aug 17, 2016 3:32 pm)
Rating: 5%
 

User avatar
Benj
Matrix Staff
Posts: 14676
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4660 times
Been thanked: 4286 times
Contact:

Re: Mifare RC522 RFID

Postby Benj » Wed Aug 17, 2016 3:32 pm

Thanks I'll look into this.

User avatar
Benj
Matrix Staff
Posts: 14676
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4660 times
Been thanked: 4286 times
Contact:

Re: Mifare RC522 RFID

Postby Benj » Wed Aug 24, 2016 10:57 am

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.