Intro

Do you ever get annoyed trying to unlock your 4 combination bike lock? Or constantly worry that your bike would get stolen?

Each year, about 2 million bikes are stolen in the US, with a total value of around $350,000,000! Bike locks with 4 digit combinations can be easily unlocked because of default passwords like 0000. A good lock costs money, and replacing a bike costs much more.

Introducing UniLock: a state of the art bike lock that will protect your bike with just a tap of your Penncard.

Hardware

Using Unilock is very simple. Once you register your university card through the RFID sensor, you can just tap your card to lock or unlock. When it is unlocked, green LED is turned on. When it is locked, red LED is turned on.

When someone taps the wrong card, the ultrasonic sensor detects the tampering and alerts the user with a blue LED light.

The LCD screen displays the lock status. When it’s unlocked, when it’s locked, and when it’s tampered with a wrong card.

The servo motor opens and closes the bicycle lock, which consists of 6 laser cut acrylic sticks to enable flexibility. The servo motor rotates 90 degrees when unlocked.

Software

In the main loop, the program first clears the LCD screen. If the correct penncard is detected, the program prints the UID to the serial monitor and checks if it matches the UID of Kyulee’s penncard. If it matches, the servo is rotated 90 degrees, the LCD displays "Unlocked", and the green LED lights up. If not, the distance from the ultrasonic sensor is checked. If an object is detected within 5 cm, the servo moves to 0 degrees, the red LED lights up, and the LCD shows "Locked". If no object is detected, the blue LED turns on, and a "Try again!" is displayed. The system uses a 2 second delay for security and smooth transitions.

Built With

Share this project:

Updates