For this project, I selected the theme of security + interaction, designing a smart locker system that responds to multiple inputs.
The idea came from noticing how single-sensor systems can cause false openings, so I customized my design by combining an ultrasonic sensor with a motion sensor, linked to an LCD screen for feedback and a servo motor for locking.
This ensures the device is both reliable and interactive, inspired by how modern smart doors use layered checks for security.
IDEA
I am designing a Smart Locker System that uses a combination of an ultrasonic sensor, an infrared (IR) motion sensor, an LCD screen, and a servo motor to provide secure and interactive access.
The system checks two conditions before unlocking:
Ultrasonic Sensor detects if an object (e.g., a hand) is close to the device.
IR Sensor verifies if there is actual motion in front of the system.
Using a nested if condition, both inputs must be satisfied for the servo motor to rotate and unlock the system. The LCD screen provides real-time feedback:
"Motion + Object" → Both conditions met → Servo unlocks.
"Object only" → An object is near but no motion → Servo stays locked.
"No object" → Nothing detected → System stays locked.
This combination ensures that the locker responds intelligently, preventing false triggers and enhancing security.
I planned to integrate the following electronic components:
Arduino Uno Board – to process sensor inputs and control outputs
Ultrasonic Sensor (HC-SR04) – to detect nearby objects and measure distance
IR Motion Sensor – to sense movement in front of the system
Servo Motor (SG90) – to act as a locking/unlocking mechanism
LCD Screen (16x2 with I2C Module) – to display system status messages
Jumper Wires – to connect components to Arduino
Breadboard – for prototyping the circuit
My inspiration came from the limitations of traditional locking systems, which usually rely on a single mechanism and can be unreliable.
To solve this, I designed a smarter system that integrates multiple sensors, making the locker more secure, interactive, and dependable.
Circuit Building Software
TINKERCAD
Arduino IDE
Electric Components
RCWL-0516 Microwave Radar
Motion Sensor
ENCLOSURE TOOLS
Colored Highlighters
The project is a Smart Locker System.
When someone approaches the device:
The Ultrasonic sensor measures the distance and detects if an object is near (e.g., less than 20 cm).
Inside this condition, the system checks the IR sensor to see if there is motion.
If Object + Motion → The servo motor rotates (locker opens) and the LCD displays "Motion + Object".
If Object only → The servo stays locked and the LCD displays "Object only".
If No object → The servo stays locked and the LCD displays "No object".
Inputs:
Ultrasonic Sensor (HC-SR04) → Detects nearby objects and measures distance.
IR Motion Sensor → Detects movement in front of the system.
Servo Motor (SG90) → Acts as the locking/unlocking mechanism.
LCD Screen (16x2 with I2C) → Displays real-time system status messages.
Connections Explained
Ultrasonic Sensor (HC-SR04)
VCC → 5V
GND → GND
Trig → Digital Pin 3
Echo → Digital Pin 4
IR Sensor
VCC → 5V
GND → GND
OUT → Digital Pin 2
Servo Motor
VCC (Red wire) → 5V
GND (Brown/Black wire) → GND
Signal (Orange/Yellow wire) → Digital Pin 9
LCD (16x2 with I2C module)
VCC → 5V
GND → GND
SDA → A4
SCL → A5
WIRED CIRCUIT
The idea was to combine two sensors together (ultrasonic sensor + IR sensor) so the locker doesn’t just open by one input, but needs both.
The code is based on a nested if structure.
I first check with the ultrasonic sensor if something is close enough.
If yes, then inside that condition I check the IR sensor for motion.
If both are true → the servo rotates to open and the LCD writes “Motion + Object.”
If only the object is detected without motion → the servo stays locked and the LCD shows “Object only.”
If no object at all → it stays locked and the LCD shows “No object.”
Part 1: Setup
Included Servo.h and LiquidCrystal_I2C.h libraries
Defined pins:
IR sensor (2)
Ultrasonic Trig (3)
Echo (4)
Servo (9)
Created dynamic variables: irState and distance
In setup():
Set pins as INPUT/OUTPUT
Attached servo
Initialized LCD with a welcome message
Started Serial Monitor for debugging
Part 2: Reading Distance
Created readDistance() function for the Ultrasonic sensor
Sends a pulse from trig → waits for echo → calculates distance in cm
Returns -1 if no echo detected
This helps the device know if there is an object and how far it is
Part 3: Loop & Nested If
The loop() runs continuously and reads both sensors: IR and Ultrasonic.
Nested if logic checks conditions in order:
If the distance is between 10–90 cm → the servo opens (90°).
Inside this, if IR detects motion → LCD shows Object + Motion.
Else (no motion) → LCD shows Object Only.
If no object detected → servo closes (0°) and LCD shows No Object.
This lets the device respond differently depending on two inputs and control two outputs automatically.
Video of the Simulation of the Circuit Only
Enclosure
Enclosure
Video of the Simulation of the Circuit with CARDBOARD
After the Instructor's Edits
Here, I replaced the IR sensor with a Microwave Motion sensor because the IR was constantly triggered, as my instructor pointed out.
I also built a new cardboard model with a functional gate that opens and closes based on the scenario and sensor readings.
The system is designed to open when it detects a person or movement.
I added a door handle and a locking barrier that moves along with the servo to simulate a real opening and closing mechanism.
Watching teams presenting their ideas in the session!
One of the main challenges I faced during this assignment was with the ultrasonic sensor readings.
At first, the sensor kept returning -1 or showing “No Object” even when an object was placed in front of it.
This made the system seem stuck and not responding as expected. The issue was mainly due to wiring and pin configuration, once I rewired everything carefully and double-checked the connections, the readings started to work properly.
When I got stuck, I first tried serial debugging to check the raw values of the sensor. Then I turned to online resources (Arduino forums and documentation) to understand why the ultrasonic sensor might return no echo. This helped me realize the importance of correct trig/echo wiring and using a proper timeout in the code.
If someone else is doing this project, I would advise them to:
Double-check all wiring before assuming the code is wrong.
Use Serial Monitor to verify sensor readings instead of only relying on the LCD.
Test components individually (servo, IR sensor, ultrasonic, LCD) before integrating them together.
This experience showed me that hardware projects are not only about coding but also about careful wiring and systematic troubleshooting.
Title of Media
Title of Media
Title of Media