Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based Smart Water Pump System with RFID and LCD Display

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Smart Water Pump System with RFID and LCD Display

Circuit Documentation

Summary

This circuit is designed to control a water pump using an RFID card for authorization. It features an LCD display for user interaction, a membrane keypad for input, a buzzer for audio feedback, and a relay to control the water pump. The circuit is powered by a 9V battery and is controlled by an Arduino UNO microcontroller.

Component List

  1. LCD 16x2 (Wokwi Compatible)

    • Description: A 16x2 character LCD display.
    • Pins: VSS, VDD, V0, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, A, K
  2. Water Pump

    • Description: A small water pump.
    • Pins: VCC, GND
  3. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  4. RFID-RC522

    • Description: An RFID reader module.
    • Pins: VCC (3.3V), RST, GND, IRQ, MISO, MOSI, SCK, SDA
  5. 9V Battery

    • Description: A 9V battery for powering the circuit.
    • Pins: +, -
  6. Membrane Matrix Keypad

    • Description: A 4x3 membrane keypad.
    • Pins: Row 1, Row 2, Row 3, Row 4, Column 1, Column 2, Column 3
  7. 1-Channel Relay (5V 10A)

    • Description: A relay module for switching the water pump.
    • Pins: NC, signal, C, power, NO, ground
  8. Buzzer

    • Description: A small piezoelectric buzzer.
    • Pins: PIN, GND
  9. Resistor

    • Description: A 220 Ohm resistor.
    • Pins: pin1, pin2
    • Properties: Resistance: 220 Ohms

Wiring Details

LCD 16x2 (Wokwi Compatible)

Water Pump

Arduino UNO

RFID-RC522

9V Battery

Membrane Matrix Keypad

1-Channel Relay (5V 10A)

Buzzer

Resistor

Code Documentation

#include <SPI.h>
#include <MFRC522.h>
#include <LiquidCrystal.h>

// RFID pins
#define RST_PIN 9
#define SS_PIN 10

MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance.

// LCD pins
const int rs = 12, en = 11, d4 = 5, d5 = 6, d6 = 7, d7 = 8;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

// Buzzer pin
const int buzzerPin = 13;

// Relay pin
const int relayPin = A0;

// Variables for password and amount
String password = "";
String amount = "";

void setup() {
  Serial.begin(9600);   // Initialize serial communications with the PC
  SPI.begin();          // Init SPI bus
  mfrc522.PCD_Init();   // Init MFRC522 card
  Serial.println("Approximate your card to the reader...");
  Serial.println();

  // Initialize LCD
  lcd.begin(16, 2);
  lcd.print("Enter Password:");

  // Initialize pins
  pinMode(relayPin, OUTPUT);
  pinMode(buzzerPin, OUTPUT);
}

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();

  // Check if the card is authorized
  if (content.substring(1) == "6A A1 2B 83") { // Change to your card's UID
    Serial.println("Authorized access");
    Serial.println();
    lcd.clear();
    lcd.print("Enter Amount:");
    //