'2) Sensor/RFID_NFC'에 해당되는 글 3건

  1. 2016.09.17 NFC TAG Sticker ISO14443A (Ntag213) [S208]
  2. 2016.09.17 PN532 NFC RFID module V3 (PN532) [S192]
  3. 2016.09.17 RFID-RC522 (MFRC-522) [S012]

NFC TAG Sticker ISO14443A (Ntag213) [S208]




* Specs

Chip: Ntag213

Physical capacity: 180 bytes

Usable capacity: 144 bytes

Protocol: ISO14443A

Working frequency: 13.56 MHZ

Reading and writing distance: 1 to 5 cm

Reading and writing time: 1 to 2 ms

Working temperature: -20 to 55 degree, humidity of 90%

Erase times : > 100000 times

Data storage: > 10 years

Reading time: 100000 times

Diameter: 27mm

Packaging materials: PE self-adhesive +  coated paper


Compatiability:

1) Support 13.56mhz RFID and NFC IC reader/writer, For example:Acr122u reader/writer

2) Support Smart mobile phones with NFC function.

Brand Smart phone: Sony, HTC, Samsung, Nokia, LG include blackberry,Nokia Lumia, Nexus4/10,Galaxy S4,and other mobile phone could support NFC function.

Andriod system Phone could download the NFC software, such as the Google play NFC Task Launcher, NFC ReTag Pro Security Software.

 

Application:

Check in, mobile payment, product information query, mobile identification, mobile marketing, social networking, business card sharing, access control, membership management, posters, healthcare,book borrowing etc.

'2) Sensor > RFID_NFC' 카테고리의 다른 글

NFC TAG Sticker ISO14443A (Ntag213) [S208]  (0) 2016.09.17
PN532 NFC RFID module V3 (PN532) [S192]  (0) 2016.09.17
RFID-RC522 (MFRC-522) [S012]  (0) 2016.09.17
Posted by RD IoT RDIoT

댓글을 달아 주세요

PN532 NFC RFID module V3 (PN532) [S192]




https://www.youtube.com/watch?v=_kW7hPiGi2o


*GitHubhttps://github.com/rdiot/rdiot-s192.git



* Specs

PN532 is high-quality and reliable module that enables RFID and NFC communication with external devices: 

cards, smart phones etc. NFC itself supports two-way communication and data exchange, so possibilities are numerous. It connects with Croduino/Arduino through IIC or SPI communication.

 

IC: NXP PN532

Voltage: 5V

Communication: SPI or I2C

Max. device distance from reader: up to 7cm

It works with all most popular standards for RFID



* Contents

- Library : https://github.com/elechouse/PN532


- Connect

GND ----- GND

VCC ----- 5V

SDA ----- SDA

SCL ----- SCL


- Key Code

#include <Wire.h>

#include <PN532_I2C.h>

#include <PN532.h>

#include <NfcAdapter.h>

  

PN532_I2C pn532i2c(Wire);

PN532 nfc(pn532i2c);

 

void setup(void) {

  Serial.begin(115200);

  Serial.println("Hello!");


  nfc.begin();


  uint32_t versiondata = nfc.getFirmwareVersion();

  if (! versiondata) {

    Serial.print("Didn't find PN53x board");

    while (1); // halt

  }

  

  // Got ok data, print it out!

  Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 

  Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 

  Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);

  

  // Set the max number of retry attempts to read from a card

  // This prevents us from waiting forever for a card, which is

  // the default behaviour of the PN532.

  nfc.setPassiveActivationRetries(0xFF);

  

  // configure board to read RFID tags

  nfc.SAMConfig();

    

  Serial.println("Waiting for an ISO14443A card");

}


void loop(void) {

  boolean success;

  uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID

  uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)

  

  // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found

  // 'uid' will be populated with the UID, and uidLength will indicate

  // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)

  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);

  

  if (success) {

    Serial.println("Found a card!");

    Serial.print("UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");

    Serial.print("UID Value: ");

    String hex_value = "";

    for (uint8_t i=0; i < uidLength; i++) 

    {

      Serial.print(" 0x");Serial.print(uid[i], HEX);       

      //Serial.print(" ");Serial.print(uid[i], HEX);       

      hex_value += (String)uid[i];

    }


    Serial.println(", value="+hex_value);


    if(hex_value == "16517722582") {

      Serial.println("This is Key Tag. ");

    }

    else if(hex_value == "230522426") {

      Serial.println("This is Card Tag. ");

    }

    else if(hex_value == "63156295") {

      Serial.println("This is Phone Tag. ");

    }

    else

      Serial.println("I don't know.");



    Serial.println("");

    // Wait 1 second before continuing

    delay(1000);

  }

  else

  {

    // PN532 probably timed out waiting for a card

    Serial.println("Waiting for a card...");

  }

}

'2) Sensor > RFID_NFC' 카테고리의 다른 글

NFC TAG Sticker ISO14443A (Ntag213) [S208]  (0) 2016.09.17
PN532 NFC RFID module V3 (PN532) [S192]  (0) 2016.09.17
RFID-RC522 (MFRC-522) [S012]  (0) 2016.09.17
Posted by RD IoT RDIoT

댓글을 달아 주세요

RFID-RC522 (MFRC-522) [S012]



RFID-RC522 (MFRC-522) Check UID [S012] 

https://www.youtube.com/watch?v=XxsINKkGcmQ


RFID-RC522 (MFRC-522) Check Hex Editor [S012] 

https://www.youtube.com/watch?v=XpHI3dOjctg


*GitHubhttps://github.com/rdiot/rdiot-s012.git


* Specs

The MFRC522 is a highly integrated reader/writer IC for contactless communication at 13.56 MHz. The MFRC522 reader supports ISO/IEC 14443 A/MIFARE and NTAG. 

The MFRC522’s internal transmitter is able to drive a reader/writer antenna designed to communicate with ISO/IEC 14443 A/MIFARE cards and transponders without additional active circuitry. The receiver module provides a robust and efficient implementation for demodulating and decoding signals from ISO/IEC 14443 A/MIFARE compatible cards and transponders. The digital module manages the complete ISO/IEC 14443 A framing and error detection (parity and CRC) functionality.

The MFRC522 supports MF1xxS20, MF1xxS70 and MF1xxS50 products. The MFRC522

supports contactless communication and uses MIFARE higher transfer speeds up to 848 kBd in both directions.


Highly integrated analog circuitry to demodulate and decode responses

 Buffered output drivers for connecting an antenna with the minimum number of

external components

 Supports ISO/IEC 14443 A/MIFARE and NTAG

 Typical operating distance in Read/Write mode up to 50 mm depending on the

antenna size and tuning

 Supports MF1xxS20, MF1xxS70 and MF1xxS50 encryption in Read/Write mode

 Supports ISO/IEC 14443 A higher transfer speed communication up to 848 kBd

 Supports MFIN/MFOUT

 Additional internal power supply to the smart card IC connected via MFIN/MFOUT

 Supported host interfaces

 SPI up to 10 Mbit/s

2C-bus interface up to 400 kBd in Fast mode, up to 3400 kBd in High-speed mode

 RS232 Serial UART up to 1228.8 kBd, with voltage levels dependant on pin

voltage supply

 FIFO buffer handles 64 byte send and receive

 Flexible interrupt modes

 Hard reset with low power function

 Power-down by software mode

 Programmable timer

 Internal oscillator for connection to 27.12 MHz quartz crystal

 2.5 V to 3.3 V power supply

 CRC coprocessor

 Programmable I/O pins

 Internal self-test



* Contents

- DataSheet : http://www.nxp.com/documents/data_sheet/MFRC522.pdf


- Connect : PinMap https://github.com/miguelbalboa/rfid#pin-layout

3.3V - 3.3V

RST - D9

GND - GND

IRQ - X

MISO - D12

MOSI - D11

SCK - D13

SDA - D10


- Library : https://github.com/miguelbalboa/rfid 

 : Key Reset : rfid_default_keys

 : Save Data : rfid_write_personal_data

 : Dump : DumpInfo


- Key Code

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);


#include <SPI.h>

#include <MFRC522.h>


#define RST_PIN  9  // 

#define SS_PIN  10  //


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

String rfidUid = "";



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() {


  // picture loop

  u8g.firstPage();  

  do {

    draw();

  } while( u8g.nextPage() );

  

  // rebuild the picture after some delay

  //delay(500);

  

 // Look for new cards

 if ( ! mfrc522.PICC_IsNewCardPresent()) {

  return;

 }


 // Select one of the cards

 if ( ! mfrc522.PICC_ReadCardSerial()) {

  return;

 }

  mfrc522.PICC_DumpToSerial(&(mfrc522.uid));

rfidUid = "";

for (byte i = 0; i < mfrc522.uid.size; i++) {

  rfidUid += String(mfrc522.uid.uidByte[i] < 0x10 ? "0" : "");

  rfidUid += String(mfrc522.uid.uidByte[i], HEX);

}


 // Dump debug info about the card; PICC_HaltA() is automatically called


}


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?"));

 }

}


void draw(void) {

  u8g.setFont(u8g_font_9x15B);

  u8g.setPrintPos(0, 12); 

  u8g.println("MFRC522");


  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,40);


  u8g.print("UID="+rfidUid);


  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,60);


  if(rfidUid == "3f0f3e5f")

  u8g.print("OPEN=YES");

  else if(rfidUid == "")

  u8g.print("NONE");

  else

  u8g.print("OPEN=NO");

  

}


- Result

ector Block   0  1  2  3   4  5  6  7   8  9 10 11  12 13 14 15  AccessBits

  15     63   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         62   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         61   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         60   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  14     59   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         58   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         57   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         56   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  13     55   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         54   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         53   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         52   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  12     51   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         50   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         49   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         48   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  11     47   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         46   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         45   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         44   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  10     43   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         42   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         41   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         40   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   9     39   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         38   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         37   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         36   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   8     35   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         34   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         33   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         32   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   7     31   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         30   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         29   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         28   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   6     27   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         26   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         25   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         24   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   5     23   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         22   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         21   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         20   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   4     19   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         18   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         17   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         16   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   3     15   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         14   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         13   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         12   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   2     11   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         10   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

          9   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

          8   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   1      7   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

          6   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

          5   20 20 20 20  20 20 20 20  20 20 20 20  20 20 45 01  [ 0 0 0 ] 

          4   67 65 75 6E  79 6F 6E 67  20 20 20 20  20 20 20 20  [ 0 0 0 ] 

   0      3   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

          2   20 20 20 20  20 20 20 20  20 20 20 20  20 20 45 01  [ 0 0 0 ] 

          1   6B 69 6D 20  20 20 20 20  20 20 20 20  20 20 20 20  [ 0 0 0 ] 

          0   83 A2 5C 02  7F 88 04 00  85 00 B4 2E  F0 BB 6A A8  [ 0 0 0 ] 


'2) Sensor > RFID_NFC' 카테고리의 다른 글

NFC TAG Sticker ISO14443A (Ntag213) [S208]  (0) 2016.09.17
PN532 NFC RFID module V3 (PN532) [S192]  (0) 2016.09.17
RFID-RC522 (MFRC-522) [S012]  (0) 2016.09.17
Posted by RD IoT RDIoT

댓글을 달아 주세요