Академический Документы
Профессиональный Документы
Культура Документы
III. PENDAMPING
HUSNI ANSHARI, S. Pd
NIP. 197008162008011006
Using RFID Reader Module with
Simple Arduino
By the shopkeeper
What is RFID?
RFID (Radio frequency identification) is a technology that uses radio frequency (RFID ) to
store information. For identification purposes, for example, put together with items to identify
items. Use student ID to identify student information. Shared device is
RFID reader / writer is a machine to read data. Or write the data to the RFID card, which read
/ write machine is divided into the frequency range. Includes include read only support. Or write
support
RFID tags or RFID tags (RFID tags) - The interior is composed of two parts: the data
store. And Saturdays weather This tag can be stored without power. When the radio is sent to the
tag. The tag is sent as a data signal back to the RFID tag. It is divided into the same supported
frequency range as the reader / writer and is also classified according to the capacity of the data.
Components of RFID Tag ( barcodesinc.com )
RFID cards have been widely used today, such as used in student identification cards to identify
students. Use as a prepaid card in the food court. Or use as a parking ticket. Also used to prevent
theft in department stores as well.
In this article, we will try to use RFID reader module version of frequency
13.56MHz MFRC522inside the set will have a photo card. And the key lock came with it. This
makes it easy to experiment with.
RFID reader module, model MFRC522 can be used with Arduino board easily have written
libraries to use it. You can download
it. Https://github.com/miguelbalboa/rfid Once downloaded, click the Download ZIP button on
the right.
Once the download is complete. Extract all the files to. Documents \ Arduino \ libraries
Open the Arduino program and then go to File> Examples. Scroll to MFRC522.
Back to the circuit before. When the luggage is removed, the MFRC-522 module is not soldered
to the fishbone. Need to solder the fishbone to make it easier to use before. (To insert into the
board recommended to use straight legs. If you want to attach to the box or to the extension cord,
*** Be careful about connecting the 3.3 V input voltage if connected to 5V may damage the
module ***.
The case is not as good as the picture. Can be listed in the table below.
MFRC522 Arduino
3.3V 3.3V
RES D9
GND GND
MISO D12
MOSI D11
SCK D13
SDA (SS) D10
Back to Arduino program to code the code below. Then upload the code into the Arduino board
(save the file first).
#include "SPI.h"
#include "MFRC522.h"
#define SS_PIN 10
#define RST_PIN 9
#define SP_PIN 8
Void setup () {
Serial.begin (9600);
SPI.begin ();
Rfid.PCD_Init ();
}
Void loop () {
if (! Rfid.PICC_IsNewCardPresent () ||! Rfid.PICC_ReadCardSerial ())
return ;
// At this point, the variable strID will store the UID of the tag
// can be used, for example, to enter IF to the tube
// LED is on or off.
Serial.print ( "Tap card key " );
Serial.println (strID);
Rfid.PICC_HaltA ();
Rfid.PCD_StopCrypto1 ();
}
Once uploaded, open Serial Moniter up to 9600 baud rate. Try both tags to touch to give
different UID value.
This UID value (or key) is stored in the strID variable, which will be used after line 41. The code
below is an RFID tag that controls the LED off.
#include "SPI.h"
#include "MFRC522.h"
#define SS_PIN 10
#define RST_PIN 9
#define LED_PIN A0
Void setup () {
Serial.begin (9600);
SPI.begin ();
Rfid.PCD_Init ();
PinMode (LED_PIN, OUTPUT);
}
Void loop () {
if (! Rfid.PICC_IsNewCardPresent () ||! Rfid.PICC_ReadCardSerial ())
return ;
// Serial.print (F ("PICC type:"));
MFRC522 :: PICC_Type piccType = rfid.PICC_GetType (rfid.uid.sak);
// Serial.println (rfid.PICC_GetTypeName (piccType));
// LED control code by taking the value from the strID variable
if (strID.indexOf ( "E4: 0A: BA: EB" )> = 0) {
DigitalWrite (LED_PIN, HIGH);Else { else
}
DigitalWrite (LED_PIN, LOW);
}
Rfid.PICC_HaltA ();
Rfid.PCD_StopCrypto1 ();
}
To end
RFID is useful and applicable to a wide variety of applications. But what should take into
account is good user interaction, such as reading tag data. There should be a signal. Include the
user should be advised that the tag used. Is it validated (for example, if the tag is approved? It
should also be noted that the holding tag is not used.) It should be flexible to use. Adding tag
numbers should be easy. Without uploading a program to revise (using EEPROM to store and
manage tag data)
-------------------------------------------------- -----------------------------------------