INTERFACING RFID WITH ARDUINO

NOTE: If you don’t know about RFID system (TAG, Module/ Reader) or working mechanism,  you can go through the links before reading this article about Interfacing RFID with Arduino.

RFID tags have similar applications to barcodes in that (barcodes) data from a tag are captured by a device that stores the data in a database. RFID, though, has more than a few advantages over barcode asset tracking software.

The most importantly data of RFID tag can be read outside the LOS (line-of-sight), whereas Bar-codes sticker must be make straight against an optical scanner to decode/read.

EM18 RFID Pins Configuration

EM-18 is a nine pin device. Among nine pins, 2 pins are not connected, so we basically have to consider seven terminals.

Pin Number

Description

VCC

Connect to positive of power source.

GND

Connected to ground.

BUZZ

Connect to BUZZER if used

NC

No Connection

NC

No Connection

SEL

SEL=1 then o/p =RS232

SEL=0 then o/p=WEIGAND

TX

DATA send through TX using RS232 communication

DATA1

WEIGAND interface DATA HIGH pin

DATA0

WEIGAND interface DATA  LOW pin

CIRCUIT DIAGRAM INTERFACING RFID READER WITH ARDUINO

rfid Arduino Interface

RFID ARDUINO CODE

#Program: Read RFID tag ID and print it on Serial Monitor

String id;
void setup() {
  Serial.begin(9600);
}

void loop() {
  if (Serial.available() > 0) {
    id = Serial.readString();
    Serial.println(id);
    delay(1000);
  }
}

This is the same code we used for Bluetooth device but here we will receive 12 character string of RFID tag information.

Serial.readString() will give us serial data present and it stored in “String id” and a delay 10 millisecond is used because in the datasheet of reader module it said EM18 module needs 10 ms of time to read the tag information.

Then print it on Serial Monitor and note it somewhere for later use.

Read Next: ELECTRONIC APPLIANCE CONTROL BY RFID CARD

Total Visits: 1710
0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Translate »
0
Would love your thoughts, please comment.x
()
x