
Oct 28, 2023
Project: Doorman
Background
This project was sparked by a new security policy at my high school. As school shootings became more widespread and and serious, all classrooms inside the school were required to be locked at all times. This means that for someone to enter any classroom, they either need a key or a person from the inside to open the door.
Why?
This project was installed on my former high school's engineering lab. Not many people use the engineering lab regularly, so most of the times when I want to enter the lab, I would have to ask my engineering teacher for the keys (because it's not a classroom and nobody would be inside). At some point, I felt guilty that I was bothering him with this every day. I shared my concerns with him and with his approval, this project was born.
User Interface
We all thought about "secret knocks" growing up. This project was a perfect chance to make it happen, as this had to be installed and not draw much attention from the outside. This device is not visible from outside at all.
I thought about using wireless communication—Bluetooth, WiFi, RF or NFC even. But the cost of distributing the key, and the possible suspicion it may gain made them all unpractical. Simulating a human was the way to go.
Anything I design, should be backwards-compatible (so the door can still act as a normal door), and should not interfere with any of the important features.
This design simulates a human by listening to knocks and pulling down on the door knob like any human would do.
Development Journey
I initially started out with piezoelectric vibration sensors. Piezo crystals are commonly used in portable lighters and torch to start the "spark". They generate electricity when vibration is applied. Piezoelectric sensors output tiny fluctuations of voltage signal when vibrations are detected. However, it turned out to be quite noisy and didn't provide any useful readings. Instead, I switched to accelerometers.
Accelerometers
When we knock on the door, we apply normal force on the door. Newton's second law states that net force and net acceleration are directly proportional. Therefore, we accelerate the door, at a very small level. Thankfully, the development board I was using, Micro:bit had accelerometers built-in, and provided better and more accurate results.
When the device powers up, it calibrates the accelerometer readings. It takes a baseline measurement for 5 seconds, and ignores any fluctuations within 1030 milli-g ( 1/1000 of acceleration due to gravity on Earth) from the baseline. If there is a spike over set threshold, it considers that as a knock.
User Experience
I highly value user experience. I think I've done a pretty good job making the device communicate with the user.
Micro:bit also comes with a 5x5 dot LED matrix. During calibration, it shows a no-touch sign. When it detects a knock, it makes a shocked face. When it recognizes a complete pattern, it smiles!

From the outside: one may know that the pattern was recognized when it hears the motors struggle.
Final Thoughts
I had plenty of fun building and coding this, as well as testing my knowledge and pushing my limits. I've built prototypes, had many revisions, and I think it turned out pretty well. I was a high school junior when I created this. I think this project represents me and my abilities really well, and I was able to learn so many things. I really like that I kept my design philosophy perfectly in this project. Anything I design, should be backwards-compatible (so the door can still act as a normal door), and should not interfere with any of the primary features. Doorman achieved these by still letting anyone to open the door normally (because it uses strings), and by being simple and straightforward to use. I wish I can design and create something more refined and advanced (visually appealing as well) later.