Arduino UNO-Based Smart Access Control System with RFID and Ultrasonic Sensor
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates an Arduino UNO microcontroller with various sensors, actuators, and display components. The circuit includes an RFID reader, an ultrasonic sensor, a micro servo motor, multiple LEDs, a piezo buzzer, resistors, and a 16x2 I2C LCD display. The Arduino UNO serves as the central controller, interfacing with all other components to perform various functions.
Component List
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
RFID-RC522
- Description: An RFID reader module.
- Pins: VCC (3.3V), RST, GND, IRQ, MISO, MOSI, SCK, SDA
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND
Micro Servo 9G
- Description: A small servo motor.
- Pins: GND, +5V, PWM
LED: Two Pin (red)
- Description: A red LED.
- Pins: cathode, anode
LED: Two Pin (green)
- Description: A green LED.
- Pins: cathode, anode
LED: Two Pin (yellow)
- Description: A yellow LED.
- Pins: cathode, anode
Piezo Buzzer
- Description: A piezoelectric buzzer.
- Pins: pin 1, pin 2
Resistor (220 Ohms)
- Description: A resistor with a resistance of 220 Ohms.
- Pins: pin1, pin2
16x2 I2C LCD
- Description: A 16x2 character LCD with I2C interface.
- Pins: GND, VCC, SDA, SCL
Wiring Details
Arduino UNO
- GND: Connected to GND of Piezo Buzzer, 16x2 I2C LCD, HC-SR04 Ultrasonic Sensor, RFID-RC522, and Micro Servo 9G.
- 5V: Connected to VCC of 16x2 I2C LCD, Micro Servo 9G, and HC-SR04 Ultrasonic Sensor.
- 3.3V: Connected to VCC (3.3V) of RFID-RC522.
- D8: Connected to pin 2 of Piezo Buzzer.
- D4: Connected to anode of green LED.
- D2: Connected to anode of yellow LED.
- D5: Connected to anode of red LED.
- A4: Connected to SDA of 16x2 I2C LCD.
- A5: Connected to SCL of 16x2 I2C LCD.
- D13: Connected to SCK of RFID-RC522.
- D12: Connected to MISO of RFID-RC522.
- D11: Connected to MOSI of RFID-RC522.
- D10: Connected to SDA of RFID-RC522.
- D9: Connected to RST of RFID-RC522.
- D7: Connected to TRIG of HC-SR04 Ultrasonic Sensor.
- D6: Connected to ECHO of HC-SR04 Ultrasonic Sensor.
- D3: Connected to PWM of Micro Servo 9G.
RFID-RC522
- VCC (3.3V): Connected to 3.3V of Arduino UNO.
- RST: Connected to D9 of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- SCK: Connected to D13 of Arduino UNO.
- MISO: Connected to D12 of Arduino UNO.
- MOSI: Connected to D11 of Arduino UNO.
- SDA: Connected to D10 of Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 5V of Arduino UNO.
- TRIG: Connected to D7 of Arduino UNO.
- ECHO: Connected to D6 of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
Micro Servo 9G
- GND: Connected to GND of Arduino UNO.
- +5V: Connected to 5V of Arduino UNO.
- PWM: Connected to D3 of Arduino UNO.
LED: Two Pin (red)
- cathode: Connected to pin1 of a 220 Ohm resistor.
- anode: Connected to D5 of Arduino UNO.
LED: Two Pin (green)
- cathode: Connected to pin1 of a 220 Ohm resistor.
- anode: Connected to D4 of Arduino UNO.
LED: Two Pin (yellow)
- cathode: Connected to pin1 of a 220 Ohm resistor.
- anode: Connected to D2 of Arduino UNO.
Piezo Buzzer
- pin 1: Connected to GND of Arduino UNO.
- pin 2: Connected to D8 of Arduino UNO.
Resistor (220 Ohms)
- pin1: Connected to cathode of respective LEDs.
- pin2: Connected to GND of Arduino UNO.
16x2 I2C LCD
- GND: Connected to GND of Arduino UNO.
- VCC: Connected to 5V of Arduino UNO.
- SDA: Connected to A4 of Arduino UNO.
- SCL: Connected to A5 of Arduino UNO.
Documented Code
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup() function is used to initialize any settings or configurations, and the loop() function contains the main code that runs repeatedly.