← Back

Lock System

Quick discalimer: Max did the vast majority of the work for the door.

We decided to automate the door as well as our lighting, so we set up a Raspberry Pi and servo on the door to control that too. The basic idea was to be able to unlock the door without needing a key while also not leaving it unlocked when we were away.

The lock for our room is a deadbolt directly above the door knob, and rotates 90 degrees to lock. It looks a bit like a capital T.

The servo is mounted to the inside of the door with a 3D printed mount, screwed in using the screws to mount the door handle plate, which points it directly at the lock mechanism.

For the servo horn, it was vital that if the program crashes we don't need to fight the servo to get our room back. This means that the servo needed to move so that the door could be unlocked with a key. To do this, we designed the servo horn in a U shape so that when needed it could move the lock, then revert to its original position so that the lock could move back if needed.

Servo Picture
Wiring Picture

Servo Horn Picture
Wiring Picture

The Raspberry Pi has four ways of getting information about when it should lock or unlock:
1. An electrical circuit is completed when the door is closed, so it knows whether the door is open or closed
2. There is a button on the inside of the door, so we can press that
3. There is a light sensor in the keyhole. The lights in the dorm hall are always on, so if it's dark we're pressing our thumb against the keyhole
4. We have an app on our phones that use AWS to tell it to lock or unlock

To Unlock:
When we're in the room, we press the button and it unlocks
When we're out of the room, we use the app on our phones
If we forgot our phones and are out of the room, we can press on the keyhole for 60s and it will unlock

To lock, the door always locks when it is closed

Raspberry Pi Picture

The Raspberry Pi is held up by a 3D printed mount which hooks over the top of the door

The wire which crosses the gap touches the golden color plate when the door is closed

The wires exiting to the left go to power from the power supply

The wires exiting to the right and bottom go to the light sensor, button, and servo

Wiring Picture

Door Picture

A little messy looking but it works

Wiring Picture
← Back