Your cart is currently empty!
Servo ON and OFF through RFID-RC522 circuit in proteus
Servo ON and OFF through RFID-RC522 circuit in proteus
In this article we will learn how to make Servo ON and OFF circuit trough RFID-RC522 in proteus.
In the last post we will learn how to make Motor Shield V2 motor party circuit in proteus. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.
Components:
- Arduino UNO
- LCD display
- IC (PCF8574)
- Servo motor
- Jumper wires
Hardware Image…
Construction…
- Connect pin 3 of Arduino with signal pin of Servo motor
- Connect one terminal of servo motor with +ve
- Connect 2nd terminal of servo motor with –ve
- Connect A0, A1, A2 pins of IC with GND
- Connect SCL pin of IC with A5 pin of Arduino UNO
- Connect SDA pin of IC with A4 pin of Arduino UNO
- Connect VSS & VEE pins of LCD display with GND
- Connect VDD pin of LCD display with +ve
- Connect RS pin of LCD display with pin 4 of IC
- Connect RW pin of LCD display with pin 5 of IC
- Connect E pin of LCD display with pin 6 of IC
- Connect pin 9 of IC with D4 pin of LCD display
- Connect pin 10 of IC with D5 pin of LCD display
- Connect pin 11 of IC with D6 pin of LCD display
- Connect pin 12 of IC with D7 pin of LCD display
Working…
Controlling a servo motor using an RFID-RC522 module and an Arduino is a common project. In this setup, you’ll use an RFID card or tag to trigger the servo motor to move between ON and OFF positions
Applications…
- Access Control System
- Cabinet or Locker Lock
- Attendance System
- Vending Machine
- Home Automation
Advantages…
- Security
- Contactless Operation
- Convenience
- Automation
- Cost-Effective
Program Images..
Program code…
[dt_code]
/*Door lock system code
#include <Servo.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
String UID = “D9 02 C1 B2”;
byte lock = 0;
Servo servo;
LiquidCrystal_I2C lcd(0x27, 16, 2);
MFRC522 rfid(SS_PIN, RST_PIN);
void setup() {
Serial.begin(9600);
servo.write(180);
lcd.init();
lcd.backlight();
servo.attach(6);
SPI.begin();
rfid.PCD_Init();
}
void loop() {
lcd.setCursor(4, 0);
lcd.print(“Welcome!”);
lcd.setCursor(1, 1);
lcd.print(“Put your card”);
if ( ! rfid.PICC_IsNewCardPresent())
return;
if ( ! rfid.PICC_ReadCardSerial())
return;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Scanning”);
Serial.print(“NUID tag is :”);
String ID = “”;
for (byte i = 0; i < rfid.uid.size; i++) {
lcd.print(“.”);
ID.concat(String(rfid.uid.uidByte[i] < 0x10 ? ” 0″ : ” “));
ID.concat(String(rfid.uid.uidByte[i], HEX));
delay(300);
}
ID.toUpperCase();
if (ID.substring(1) == UID && lock == 0 ) {
servo.write(180);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Door is locked”);
Serial.print(“Door is locked”);
delay(1500);
lcd.clear();
lock = 1;
} else if (ID.substring(1) == UID && lock == 1 ) {
servo.write(180);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Door is open”);
delay(1500);
lcd.clear();
lock = 0;
} else {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Wrong card!”);
delay(1500);
lcd.clear();
}
}
[/dt_code]