Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
RFID Based Automatic Toll Collection
Just Do Electronics
February 01, 2020
RFID Based Automatic Toll Collection System
CirCuit Diagram :-
Code -
//Prateek singh //(Toll colection system) #include
#include
#define SS_PIN 10 #define RST_PIN 9 #define LED_G 5 //define green LED pin #define LED_R 4 //define red LED #define RELAY 3 //relay pin #define BUZZER 2 //buzzer pin #define ACCESS_DELAY 6000 #define DENIED_DELAY 4000 MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance. void setup() { Serial.begin(9600); // Initiate a serial communication SPI.begin(); // Initiate SPI bus mfrc522.PCD_Init(); // Initiate MFRC522 pinMode(LED_G, OUTPUT); pinMode(LED_R, OUTPUT); pinMode(RELAY, OUTPUT); pinMode(BUZZER, OUTPUT); noTone(BUZZER); digitalWrite(RELAY, LOW); Serial.println("Put your card to the reader..."); Serial.println(); } void loop() { // Look for new cards if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) { return; } //Show UID on serial monitor Serial.print("UID tag :"); //String content= ""; byte letter; for (byte i = 0; i < mfrc522.uid.size; i++) { Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); Serial.print(mfrc522.uid.uidByte[i], HEX); content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); content.concat(String(mfrc522.uid.uidByte[i], HEX)); } Serial.println(); Serial.print("Message : "); content.toUpperCase(); if (content.substring(1) == "A2 19 55 2D") //change here the UID of the card/cards that you want to give access { Serial.println("Authorized access"); Serial.println(); delay(500); digitalWrite(RELAY, HIGH); digitalWrite(LED_G, HIGH); delay(ACCESS_DELAY); digitalWrite(RELAY, LOW); digitalWrite(LED_G, LOW); } else { Serial.println(" Access denied"); digitalWrite(LED_R, HIGH); tone(BUZZER, 300); delay(DENIED_DELAY); digitalWrite(LED_R, LOW); noTone(BUZZER); } }
0 Comments
Newer
Older
Build Your Own Gps Tracking System using Arduino
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
ESP32 Interfacing With LDR Sensor
How To Make RFID & Keypad Based Door Lock
GPS Tracker Using Nodemcu
ESP32 Interfacing Potentiometer
Smart Street Light Using Arduino
Esp32 Cam Based Face Unlock
IoT Weight Scale using Load Cell HX711 & ESP8266
Arduino ebook
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments