NFC Card Reader Data to PhpMyAdmin

14,983

63

23

Introduction: NFC Card Reader Data to PhpMyAdmin

About: Master in Electronics Engineering

This project demonstrate how we can send the NFC card id to our mysql database using arduino. This project further can be implemented for various application such as student attendance syste, worker attendance system or in time or out time of the person by scanning card into the MFRC 522 nfc rfid reader module.

In this project I'm showing you how we can send the Id of nfc card to the server and save it to the mysql database using php. I used arduino uno with gsm sim800 module to connect with the internet service. This project is useful where wifi network is not available.

Hope you will like this simple and easy project..

Step 1: What You Will Need?

1. MFRC522 rfid reader module

2. Arduino uno

3. Gsm sim800 or sim900

4. Rfid tags

5. Breadboard

6. Wires

7. Power Supply

Step 2: Circuit Diagram:

Connect the components as shown in circuit diagram.

Pin2 of arduino to Tx of Gsm.

Pin3 of Arduino to Rx. of Gsm.

Step 3: Server Side:

Take any of free php hosting with phpmysql database.

Inside phpmyadmin > click on sqlQuery, Run query " create database nfcreader " and click on Go

> click on sqlQuery, Run query inside nfcreader database " create table nfc(id varchar(30)) " and click on Go

> you can test database by inserting values, Run query " insert into nfc values('AXT67JM') " and click Go

> you can see data from table, Run Query " select * from nfc " and click on Go

Extract PHPfiles.rar

Create php for connection with database.

Php files are in attachments.

Upload these files in file manager of hosting service.

Make Change inside Conf.php

=> $con=mysqli_connect("localhost","root","--","nfcreader");

replace localhost with your database ip address

replace root with your database userid

replace -- with database password

Step 4: Uploading Code ToArduino:

Replace " APN " in the code with your sim card APN

Repalce " yourURLhere.com " with your URL into the code attached.

Step 5: You'r Done!

Done with this simple project. For queries comment down below, I would like to hepl you..!

Be the First to Share

    Recommendations

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    23 Discussions

    0
    Ghloo
    Ghloo

    10 days ago

    That is very interesting indeed! But you are sensing the NFC data thru ... SMS (or mis it GPRS data?)? Why not over wifi? It would seem cheaper and simpler ... and I would be able to try it out with my localhost immediately. ;o)

    0
    MuhammadS545
    MuhammadS545

    Question 2 years ago

    hello may i know about apn

    0
    RishabhL
    RishabhL

    Answer 2 years ago

    APN are different for all internet service providers. It depends on which sim card you are using. Google the apn name for your sim card to connect to the internet on gsm.

    0
    jenelynb19
    jenelynb19

    Reply 10 months ago

    Why i get this error sir??

    IMG_20191201_222739.jpg
    0
    RishabhL
    RishabhL

    Reply 10 months ago

    Check your internet connection. data pack must be active on your sim.

    2
    amiraa23
    amiraa23

    Question 1 year ago

    Hi. Can i ask you on how to connect the RFID card reader to database without the GSM? I've downloaded the codes and the one on the .ino file included GSM.

    0
    RishabhL
    RishabhL

    Answer 1 year ago

    You need to use esp8266-12e or nodemcu for that. Connect rfid directly to nodemcu or arduino with esp8266-01 to upload on database... you can also use ethernet sheild

    0
    amiraa23
    amiraa23

    Reply 1 year ago

    hi. now i'm using gsm sim900a. is the circuit diagram is same with gsm sim800? and what is APN? Iis it the same with PUK on sim card?

    0
    RishabhL
    RishabhL

    Reply 1 year ago

    Circuit is same for 800 and 900...apn is access point name you can search your apn for your sim card on google. It is not related to puk

    0
    jenelynb19
    jenelynb19

    Reply 10 months ago

    Hellow sir... How can I know the ip address of database.... ? Where can find it?

    0
    FranciscoL41
    FranciscoL41

    1 year ago

    It's possible use a wifi module instead GSM? Thanks!

    0
    RishabhL
    RishabhL

    Reply 1 year ago

    Yes you can use esp8266-12e

    0
    chironaks
    chironaks

    Question 1 year ago

    Hi! May I ask, can I use this to connect to my website and use it as a login?

    0
    BenjieS5
    BenjieS5

    Question 1 year ago on Step 5

    hi may i ask you what is the use of the breadboard on this project? based on the diagram you've shown there is no breadboard connected on it?
    thank you in advance.!

    0
    RishabhL
    RishabhL

    Answer 1 year ago

    You can use breadboard for making solderless connections or you can directly use jumper wires.. It's on you which you want to use...

    0
    RishabhL
    RishabhL

    Reply 1 year ago

    Nice Tutorial ... good job

    1
    premkumar96
    premkumar96

    Question 1 year ago on Step 5

    hi sir, may i know which server to use to upload my php files?

    0
    RishabhL
    RishabhL

    Answer 1 year ago

    You can use any free hosting or paid..