SlideShare una empresa de Scribd logo
1 de 14
By Deligence Technologies
www.deligence.com
Attendance system using MYSQL with Raspberry pi and
RFID-RC522
Project Description
Software Used
Hardware Used
Raspberry Pi 3 Pin Block Diagram
Brief Description of Raspberry Pi
Node MCU V3 and Its Circuit
Diagram
Node MCU Code
Database Python Script Code
Video Presentation
Attendance system using MYSQL with Raspberry pi and RFID-
RC522:
In this project we are
taking data from RFID
reader which is connected
to Node MCU V3 and
saving it to PHPMYADMIN
database running on
Raspberry pi.
Raspbian OS
Arduino IDE
My SQL Database
Raspberry pi
Node MCU V3
RFID Reader with Tag
Jumper Wire
This is the latest version of raspberry pi. In this we have inbuilt Bluetooth and wi-fi,
unlike previously we have to use Wi-Fi dongle in one of its usb port. There are total
40 pins in RPI3. Of the 40 pins, 26 are GPIO pins and the others are power or
ground pins (plus two ID EEPROM pins.)
There are 4 USB Port and 1 Ethernet slot, one HDMI port, 1 audio output port and 1
micro usb port and also many other things you can see the diagram on right side.
And also we have one micro sd card slot wherein we have to installed the
recommended Operating system on micro sd card.
There are two ways to interact with your raspberry pi. Either you can interact
directly through HDMI port by connecting HDMI to VGA cable, and keyboard and
mouse or else you can interact from any system through SSH(Secure Shell). (For
example in windows you can interact from putty ssh.)
NodeMCU is an open source IOT platform. It includes firmware which runs on the
ESP8266 Wi- Fi SoC from hardware which is based on the ESP-12 module. The term
"NodeMCU" by default refers to the firmware rather than the dev kits.
Circuit Diagram
#include <RFID.h>
Include the standard Arduino SPI library */
#include <SPI.h>
/* Include the RFID library */
#include <RFID.h>
/* Define the DIO used for the SDA (SS) and RST (reset) pins. */
#define SDA_DIO 10
#define RESET_DIO 9
/* Create an instance of the RFID library */
RFID RC522(SDA_DIO, RESET_DIO);
void setup()
{
Serial.begin(9600);
/* Enable the SPI interface */
SPI.begin();
/* Initialise the RFID reader */
RC522.init();
}
Continue---
void loop()
{
/* Has a card been detected? */
if (RC522.isCard())
{
/* If so then get its serial number */
RC522.readCardSerial();
Serial.print("Card detected:");
Serial.print(" ");
for(int i=0;i<5;i++)
{
Serial.print(RC522.serNum[i],DEC);
//Serial.print(RC522.serNum[i],HEX); //to print card detail in Hexa Decimal format
}
Serial.print(" ");
Serial.print("RFID NAME SERIES: ");
Serial.print(" ");
Serial.print(522);
Serial.println(" ");
}
delay(2000);
}
#!/usr/bin/python
import serial
import time
import MySQLdb
#establish connection to MYSQL.
dbConn=MySQLdb.connect("localhost","root","DB_Password","DB_Name") or
die ("could not connect to database")
#open a cursor to the database
device="""/dev/ttyACM0"""
try:
print "Trying...",device
arduino=serial.Serial(device,9600)
except:
print"Failed to connect on",device
while True:
time.sleep(1)
Continue -----
try:
data=arduino.readline() #read data from arduino
print data
pieces=data.split(" ") #split data by tab
try:
cursor=dbConn.cursor()
cursor.execute("""INSERT INTO DB_Table_Name
VALUES(NULL,%s,%s)""",(pieces[1],pieces[3]))
dbConn.commit()
#commit the insert
cursor.close() #close the cursor
except MYSQLdb.IntegrityError:
print"failed to insert data"
finally:
cursor.close() # close in case it failed
except:
print"Processing!"
www.deligence.com/contact-us
Email : info@deligence.com
Phone : +91 9910130340
Attendance system using MYSQL with Raspberry pi and RFID-RC522

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Thunderbolt seminar report
Thunderbolt seminar reportThunderbolt seminar report
Thunderbolt seminar report
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
Rfid
RfidRfid
Rfid
 
rs-232
rs-232rs-232
rs-232
 
Rdl esp32 development board trainer kit
Rdl esp32 development board trainer kitRdl esp32 development board trainer kit
Rdl esp32 development board trainer kit
 
Raspberry pi complete setup
Raspberry pi complete setupRaspberry pi complete setup
Raspberry pi complete setup
 
Rfid nfc
Rfid nfcRfid nfc
Rfid nfc
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
 
Linux Internals - Part III
Linux Internals - Part IIILinux Internals - Part III
Linux Internals - Part III
 
Arduino dc motor
Arduino dc motor Arduino dc motor
Arduino dc motor
 
Presentazione Arduino
Presentazione ArduinoPresentazione Arduino
Presentazione Arduino
 
RFID Technology
RFID TechnologyRFID Technology
RFID Technology
 
icu patient smart monitoring system using iot
icu patient smart monitoring system using ioticu patient smart monitoring system using iot
icu patient smart monitoring system using iot
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
The Value of FIDO Certification
The Value of FIDO CertificationThe Value of FIDO Certification
The Value of FIDO Certification
 
Zephyr-Overview-20230124.pdf
Zephyr-Overview-20230124.pdfZephyr-Overview-20230124.pdf
Zephyr-Overview-20230124.pdf
 
Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]
 
Arduino & NodeMcu
Arduino & NodeMcuArduino & NodeMcu
Arduino & NodeMcu
 
FIDO기반 생체인식 인증기술_SK플래닛@tech세미나판교
FIDO기반 생체인식 인증기술_SK플래닛@tech세미나판교FIDO기반 생체인식 인증기술_SK플래닛@tech세미나판교
FIDO기반 생체인식 인증기술_SK플래닛@tech세미나판교
 
Unit 3 instruction of tms320 c5x (3 files merged)
Unit 3  instruction of tms320 c5x (3 files merged)Unit 3  instruction of tms320 c5x (3 files merged)
Unit 3 instruction of tms320 c5x (3 files merged)
 

Similar a Attendance system using MYSQL with Raspberry pi and RFID-RC522

Internet of things aktu lab file
Internet of things  aktu lab fileInternet of things  aktu lab file
Internet of things aktu lab file
Nitesh Dubey
 

Similar a Attendance system using MYSQL with Raspberry pi and RFID-RC522 (20)

Arduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access DetailsArduino Interface with MySQL for Storing RFID Access Details
Arduino Interface with MySQL for Storing RFID Access Details
 
Attendance System using ESP8266(Wi-Fi) with MySQL
Attendance System using ESP8266(Wi-Fi) with MySQLAttendance System using ESP8266(Wi-Fi) with MySQL
Attendance System using ESP8266(Wi-Fi) with MySQL
 
Raspberry pi technical documentation
Raspberry pi technical documentationRaspberry pi technical documentation
Raspberry pi technical documentation
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFID
 
XBee and RFID
XBee and RFIDXBee and RFID
XBee and RFID
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Raspberry Pi
Raspberry Pi Raspberry Pi
Raspberry Pi
 
Internet of things aktu lab file
Internet of things  aktu lab fileInternet of things  aktu lab file
Internet of things aktu lab file
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Raspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application DevelopmentRaspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application Development
 
Начало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev KitНачало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev Kit
 
Unit 3 Complete.pptx
Unit 3 Complete.pptxUnit 3 Complete.pptx
Unit 3 Complete.pptx
 
Using arduino and raspberry pi for internet of things
Using arduino and raspberry pi for internet of thingsUsing arduino and raspberry pi for internet of things
Using arduino and raspberry pi for internet of things
 
Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip
Raspberry pi-spectrum-analyzer-display-on-rgb-led-stripRaspberry pi-spectrum-analyzer-display-on-rgb-led-strip
Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip
 
Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101Connected hardware for Software Engineers 101
Connected hardware for Software Engineers 101
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Practical Introduction to Internet of Things (IoT)
Practical Introduction to Internet of Things (IoT)Practical Introduction to Internet of Things (IoT)
Practical Introduction to Internet of Things (IoT)
 

Más de Sanjay Kumar

Más de Sanjay Kumar (17)

Mobile app development
Mobile app developmentMobile app development
Mobile app development
 
Accelerated Mobile Pages (AMP)
Accelerated Mobile Pages (AMP)Accelerated Mobile Pages (AMP)
Accelerated Mobile Pages (AMP)
 
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP ProtocolSerial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
Serial Data from Arduino to Raspberry Pi to MySQL using CoAP Protocol
 
Arduino to Control Bulbs using Web App
Arduino to Control Bulbs using Web AppArduino to Control Bulbs using Web App
Arduino to Control Bulbs using Web App
 
Bulb Control using Web App with Raspberry Pi
Bulb Control using Web App with Raspberry Pi Bulb Control using Web App with Raspberry Pi
Bulb Control using Web App with Raspberry Pi
 
Obstacle detection Robot using Ultrasonic Sensor and Arduino UNO
Obstacle detection Robot using Ultrasonic Sensor and Arduino UNOObstacle detection Robot using Ultrasonic Sensor and Arduino UNO
Obstacle detection Robot using Ultrasonic Sensor and Arduino UNO
 
Arduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UARTArduino Interface LM35 MQTT Using UART
Arduino Interface LM35 MQTT Using UART
 
Rain Drop Sensor using Arduino!
Rain Drop Sensor using Arduino!Rain Drop Sensor using Arduino!
Rain Drop Sensor using Arduino!
 
Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software Development
 
Embedded Software Development
Embedded Software DevelopmentEmbedded Software Development
Embedded Software Development
 
Ionic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application FrameworkIonic - Hybrid Mobile Application Framework
Ionic - Hybrid Mobile Application Framework
 
Internet of Things - IOT
Internet of Things - IOTInternet of Things - IOT
Internet of Things - IOT
 
Meteor Mobile App Development
Meteor Mobile App DevelopmentMeteor Mobile App Development
Meteor Mobile App Development
 
Digital Marketing Strategy
Digital Marketing StrategyDigital Marketing Strategy
Digital Marketing Strategy
 
Web Application Development
Web Application DevelopmentWeb Application Development
Web Application Development
 
Joomla Website Development Company
Joomla Website Development CompanyJoomla Website Development Company
Joomla Website Development Company
 
Meteor js App Development
Meteor js App DevelopmentMeteor js App Development
Meteor js App Development
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Attendance system using MYSQL with Raspberry pi and RFID-RC522

  • 1. By Deligence Technologies www.deligence.com Attendance system using MYSQL with Raspberry pi and RFID-RC522
  • 2. Project Description Software Used Hardware Used Raspberry Pi 3 Pin Block Diagram Brief Description of Raspberry Pi Node MCU V3 and Its Circuit Diagram Node MCU Code Database Python Script Code Video Presentation
  • 3. Attendance system using MYSQL with Raspberry pi and RFID- RC522: In this project we are taking data from RFID reader which is connected to Node MCU V3 and saving it to PHPMYADMIN database running on Raspberry pi.
  • 5. Raspberry pi Node MCU V3 RFID Reader with Tag Jumper Wire
  • 6.
  • 7. This is the latest version of raspberry pi. In this we have inbuilt Bluetooth and wi-fi, unlike previously we have to use Wi-Fi dongle in one of its usb port. There are total 40 pins in RPI3. Of the 40 pins, 26 are GPIO pins and the others are power or ground pins (plus two ID EEPROM pins.) There are 4 USB Port and 1 Ethernet slot, one HDMI port, 1 audio output port and 1 micro usb port and also many other things you can see the diagram on right side. And also we have one micro sd card slot wherein we have to installed the recommended Operating system on micro sd card. There are two ways to interact with your raspberry pi. Either you can interact directly through HDMI port by connecting HDMI to VGA cable, and keyboard and mouse or else you can interact from any system through SSH(Secure Shell). (For example in windows you can interact from putty ssh.)
  • 8. NodeMCU is an open source IOT platform. It includes firmware which runs on the ESP8266 Wi- Fi SoC from hardware which is based on the ESP-12 module. The term "NodeMCU" by default refers to the firmware rather than the dev kits. Circuit Diagram
  • 9. #include <RFID.h> Include the standard Arduino SPI library */ #include <SPI.h> /* Include the RFID library */ #include <RFID.h> /* Define the DIO used for the SDA (SS) and RST (reset) pins. */ #define SDA_DIO 10 #define RESET_DIO 9 /* Create an instance of the RFID library */ RFID RC522(SDA_DIO, RESET_DIO); void setup() { Serial.begin(9600); /* Enable the SPI interface */ SPI.begin(); /* Initialise the RFID reader */ RC522.init(); } Continue---
  • 10. void loop() { /* Has a card been detected? */ if (RC522.isCard()) { /* If so then get its serial number */ RC522.readCardSerial(); Serial.print("Card detected:"); Serial.print(" "); for(int i=0;i<5;i++) { Serial.print(RC522.serNum[i],DEC); //Serial.print(RC522.serNum[i],HEX); //to print card detail in Hexa Decimal format } Serial.print(" "); Serial.print("RFID NAME SERIES: "); Serial.print(" "); Serial.print(522); Serial.println(" "); } delay(2000); }
  • 11. #!/usr/bin/python import serial import time import MySQLdb #establish connection to MYSQL. dbConn=MySQLdb.connect("localhost","root","DB_Password","DB_Name") or die ("could not connect to database") #open a cursor to the database device="""/dev/ttyACM0""" try: print "Trying...",device arduino=serial.Serial(device,9600) except: print"Failed to connect on",device while True: time.sleep(1) Continue -----
  • 12. try: data=arduino.readline() #read data from arduino print data pieces=data.split(" ") #split data by tab try: cursor=dbConn.cursor() cursor.execute("""INSERT INTO DB_Table_Name VALUES(NULL,%s,%s)""",(pieces[1],pieces[3])) dbConn.commit() #commit the insert cursor.close() #close the cursor except MYSQLdb.IntegrityError: print"failed to insert data" finally: cursor.close() # close in case it failed except: print"Processing!"