Never-Lose-It Locker

by Locker385 in Circuits > Arduino

118 Views, 0 Favorites, 0 Comments

Never-Lose-It Locker

Front Door1.jpg
Opened Door.jpg
Closed Door.jpg
Partially Opened door.jpg
dooor-open-no-keys-jpeg.jpg
ARC 385 A2

In this assignment, you will build an automated system that uses environmental light sensing to control mechanical motion. The project combines elements of electronic sensing, servo motor control, and Arduino programming to create a responsive mechanism that activates when ambient light levels change.

Irretrievable Design: The mechanical design ensures that once an item slides off the tilting platform, it falls into a secure area that cannot be accessed without dismantling the device. Our device is intended to store small objects, like keys, without being able to get the object back.

Supplies

Materials

  1. Arduino UNO or compatible microcontroller
  2. Breadboard and jumper wires
  3. Photoresistor (light-dependent resistor)
  4. 10kΩ resistor (for voltage divider circuit)
  5. Two servo motors USB cable for Arduino programming
  6. 3D printed sticks that attach onto the two servo motors
  7. Plywood for building the locker

How It Works

RIGHT.jpg
PLAN.jpg
PHOTO SENSOR.jpg
ARC 385 Working Video
  1. Place the item on the flat platform
  2. Cover the light sensor (or turn off the lights)
  3. The servos tilt the platform
  4. The item slides off into the secure compartment (behind the back wall)
  5. The platform returns to its original position, ready for another deposit


Design

Artboard 1.png
Artboard 2.png

Process Prototyping

482239804_1687106928847599_2783656695413793453_n.jpg
482138762_664618406130887_539424149353296951_n.jpg
481862733_1607974389835529_338803231496325579_n.jpg
473CD1F1-DBE3-40E1-A88F-8D0498214630.JPG
ARC 385 Prototype

We first created a cardboard prototype to test how the object would be able to slide down the platform, confirming measurements.

Process Tinkercad & Coding

ARC385 Locker w_ Ultrasonic Sensor.png

Initially, we wanted to control the motor using the ultrasonic sensor by measuring the distance from the locker door to the back wall, and when the Ultrasonic Sensor measures a certain range of distance, it will trigger the motor. However, we were challenged to measure the exact distance as the locker door is being opened and closed. Therefore, we decided to use the photoresistor to measure the lighting in order to trigger the motors. This method was more efficient and accurate, as the sensor will only measure if its bright or dark.


https://www.tinkercad.com/things/feqiQ4rdhcZ-arc385-locker-w-ultrasonic-sensor/editel?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard%2Fdesigns%2Fcircuits&sharecode=fq3MQECckgD8BZa-zCy-NCHhdzePf6qzoKtHu8K_y4o

Resolved Tinkercad & Coding

ARC385 A2 Locker Code (1).png

After making the adjustment to switch to a photoresistor, we created an Arduino code, tested in Tinkercad, that controls two servo motors based on ambient light levels detected by a photoresistor. During setup, the system calibrates for 10 seconds to determine the minimum and maximum light levels, then sets a darkness threshold at 40% between these values. In the main loop, the photoresistor continuously reads light levels. If the light level drops below the threshold (indicating darkness), and the system has not already cycled, the servos activate—tilting a platform by moving one servo to 60° and the other to 120° (from their starting positions of 0° and 180° respectively). After a brief delay (allowing the object to slide off), the servos return to their original positions. The system resets when the lights are turned back on, allowing the process to repeat.


https://www.tinkercad.com/things/3wSYxW4Vofs-arc385-a2-locker-code/editel?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard&sharecode=LlFzOzFYTycLtR0DQWiNZMkifxUkuEVM_9fwV_oxu2M


Variation in Code: A variation in this code introduces a door close counter, which tracks how many times the light level drops below the threshold (indicating the door has closed). Instead of activating the servos immediately when darkness is detected, the system waits until the door has closed three times before tilting the platform. Once the third closure is detected, a 5-second delay is added, ensuring that if the door is opened again right after closing, the item is still present, before activating the servos, tilting the platform, and resetting the counter. This guarantees the tilt mechanism only triggers after repeated use, adding a conditional activation feature. This variation gives the false impression to the user that their items will be safe before losing it all.


https://www.tinkercad.com/things/1lfD1f7Z8PK-arc385-locker-variation-code/editel?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard&sharecode=aX8ktD6PcsIwt9ho3EZsv8LB2GZKxRIz_-tmB7TLnt8