Arduino UNO-Based Smart Distance Sensor with RFID and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller interfacing with various components including an ultrasonic sensor, a micro servo, multiple LEDs, a piezo buzzer, an I2C LCD, and an RFID module. The circuit is designed to demonstrate basic sensor integration, actuator control, and visual feedback using LEDs and an LCD display.
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
HC-SR04 Ultrasonic Sensor
- Description: A sensor used for measuring distance.
- Pins: VCC, TRIG, ECHO, GND
Micro servo 9G
- Description: A small servo motor used for precise control of angular position.
- Pins: GND, +5V, PWM
LED: Two Pin (red)
- Description: A red LED for visual indication.
- Pins: cathode, anode
LED: Two Pin (green)
- Description: A green LED for visual indication.
- Pins: cathode, anode
LED: Two Pin (yellow)
- Description: A yellow LED for visual indication.
- Pins: cathode, anode
Resistor (220 Ohms)
- Description: A resistor used to limit current.
- Pins: pin1, pin2
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
Piezo Buzzer
- Description: A buzzer used for sound output.
- Pins: pin 1, pin 2
RFID-RC522
- Description: An RFID module used for reading RFID tags.
- Pins: VCC (3.3V), RST, GND, IRQ, MISO, MOSI, SCK, SDA
Wiring Details
Arduino UNO
GND is connected to:
- GND of Piezo Buzzer
- GND of 16x2 I2C LCD
- GND of HC-SR04 Ultrasonic Sensor
- GND of Micro servo 9G
- GND of RFID-RC522
5V is connected to:
- VCC of 16x2 I2C LCD
- +5V of Micro servo 9G
- VCC of HC-SR04 Ultrasonic Sensor
3.3V is connected to:
- VCC (3.3V) of RFID-RC522
D8 is connected to:
- pin 2 of Piezo Buzzer
D4 is connected to:
- anode of LED (green)
D2 is connected to:
- anode of LED (yellow)
D5 is connected to:
- anode of LED (red)
A4 is connected to:
- SDA of 16x2 I2C LCD
A5 is connected to:
- SCL of 16x2 I2C LCD
D13 is connected to:
- SCK of RFID-RC522
D12 is connected to:
- MISO of RFID-RC522
D11 is connected to:
- MOSI of RFID-RC522
D10 is connected to:
- SDA of RFID-RC522
D9 is connected to:
- RST of RFID-RC522
D7 is connected to:
- TRIG of HC-SR04 Ultrasonic Sensor
D6 is connected to:
- ECHO of HC-SR04 Ultrasonic Sensor
D3 is connected to:
- PWM of Micro servo 9G
HC-SR04 Ultrasonic Sensor
GND is connected to:
- GND of Arduino UNO
VCC is connected to:
- 5V of Arduino UNO
TRIG is connected to:
- D7 of Arduino UNO
ECHO is connected to:
- D6 of Arduino UNO
Micro servo 9G
GND is connected to:
- GND of Arduino UNO
+5V is connected to:
- 5V of Arduino UNO
PWM is connected to:
- D3 of Arduino UNO
LED: Two Pin (red)
cathode is connected to:
- pin1 of Resistor (220 Ohms)
anode is connected to:
- D5 of Arduino UNO
LED: Two Pin (green)
cathode is connected to:
- pin1 of Resistor (220 Ohms)
anode is connected to:
- D4 of Arduino UNO
LED: Two Pin (yellow)
cathode is connected to:
- pin1 of Resistor (220 Ohms)
anode is connected to:
- D2 of Arduino UNO
Resistor (220 Ohms)
pin1 is connected to:
- cathode of LED (red)
- cathode of LED (green)
- cathode of LED (yellow)
pin2 is connected to:
- pin 1 of Piezo Buzzer
- GND of Arduino UNO
16x2 I2C LCD
GND is connected to:
- GND of Arduino UNO
VCC is connected to:
- 5V of Arduino UNO
SDA is connected to:
- A4 of Arduino UNO
SCL is connected to:
- A5 of Arduino UNO
Piezo Buzzer
pin 1 is connected to:
- pin2 of Resistor (220 Ohms)
pin 2 is connected to:
- D8 of Arduino UNO
RFID-RC522
VCC (3.3V) is connected to:
- 3.3V of Arduino UNO
GND is connected to:
- GND of Arduino UNO
SCK is connected to:
- D13 of Arduino UNO
MISO is connected to:
- D12 of Arduino UNO
MOSI is connected to:
- D11 of Arduino UNO
SDA is connected to:
- D10 of Arduino UNO
RST is connected to:
- D9 of Arduino UNO
Code Documentation
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 where you initialize your components and set up your initial conditions. The loop() function is where you place the main logic of your program that runs repeatedly.