F.L.O.D. or First Line of Defense is an electronic door lock with Haptic Feedback I made for my workshop at home. Convinced that someone was sneaking into my lab and stealing my precious tools and components, I decided to do something. Standard key-lock could be used but I did not want to limit myself when I would spontaneously have an idea and want to prototype it but would not be able to because I misplaced my key.
Commercial products which have similar functionality do exist but they were too expensive and over-kill for my application. Hence I made this simple one using parts I had laying around: an old latch lock, a servo, matrix keypad and an arduino nano.
One unique thing about my design is that it has Haptic Feedback. The keypad I used was capacitive rather than tactile, which made it difficult for a user to know if the keys had been pressed or not. I used a motor with an unbalanced weight attached to its shaft inside the housing of the lock, which would 'pulse' whenever a key was pressed. This made it very easy to know if a key had been pressed and increased the ergonomics greatly.
![](https://pro2-bar-s3-cdn-cf1.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/9abd73f8-2ae6-4471-8567-e023351a825e_rw_3840.jpg?h=286564e69cc53953d0f100a6f5899fd5)
Attaching the mechanical latch lock on the inside. This would take all the weight when the door was forced to be open, keeping the servo from breaking.
![](https://pro2-bar-s3-cdn-cf.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/b28d0929-a2cd-430e-b0ad-605912860f78_rw_3840.jpg?h=f9cff39f80badda7c5e63ad3da162ad9)
Once the lock was attached to the door and made sure it was locking, I modified the knob to pass a steel wire through. This would act as a mechanical connection between the servo and the lock.
![](https://pro2-bar-s3-cdn-cf6.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/7fd1c3ce-84e3-4cb3-b417-c5282dcfd218_rw_3840.jpg?h=5569273bf4359ee9ff6b9b6388e7ab7d)
I attached the servo to the mechanical lock. Servo was tested independently to make sure it was locking and unlocking the door at 0 and 90 degrees or vice-versa.
![](https://pro2-bar-s3-cdn-cf4.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/50b5eb8b-922d-42c7-ab3e-83ce600e1b44_rw_3840.jpg?h=61747f46cbd211dc6bfdcc109be6db76)
Once I made sure that the locking hardware was functioning, I moved on to making an enclosure to house the micro-controller and all the extra electronics.
![](https://pro2-bar-s3-cdn-cf4.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/f1f61530-3d14-4bf2-ac00-b4f5d238114e_rw_3840.jpg?h=fcf05c9d482f635c86706b8af9782b11)
Once I finalized the enclosure, drilled all the required holes and made any slots to pass the cables, I cleaned the whole case with some acetone and spray painted it.
The front panel was matte black while the body was military green.
![](https://pro2-bar-s3-cdn-cf4.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/52f7edf6-600f-4540-91e4-713fc01adbec_rw_1920.jpg?h=c279e9cb9c9232d8a9dcb0fb4c6410f7)
To power the electronics, I used a AC-DC adapter. The housing of the adapter was broken so I utilized only the circuit, making sure to solder wires properly and insulating all high-voltage connections with heat-resistant kapton tape.
![](https://pro2-bar-s3-cdn-cf6.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/71992861-a75e-4218-911a-40d6afa7f7a5_rw_3840.jpg?h=44cf63396bfe723df5fd94f1745b0055)
The 'brains' of the operation, an Arduino Nano micro-controller.
![](https://pro2-bar-s3-cdn-cf6.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/78d90a2d-81f4-4286-87ed-170839e1c679_rw_3840.jpg?h=dc5461755e8854e5524d6d276c46e855)
The Arduino was mounted inside the housing with a slot cut-out for the USB port in case I wanted to change the security code at a later time. This also serves as an 'external' power port to run the lock in case the power goes out.
![](https://pro2-bar-s3-cdn-cf4.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/f558893e-c4fd-4a55-b8db-8f99ffe24ee1_rw_3840.jpg?h=e41b11b18203e00b4af6a6e06ceda6ba)
I added a relay that would switch the power source to a secondary 9V battery (pictured below) in case the power went out and I wanted to open the lock.
![](https://pro2-bar-s3-cdn-cf6.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/7866ffda-5327-488b-875a-99dc03c21111_rw_1920.jpg?h=ead6c98cde2c96ad260b965c817a918e)
LED's in the front of the panel indicate the current lock status. Blue is for Power, Green is for Unlocked and Red is for Locked.
![](https://pro2-bar-s3-cdn-cf.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/86c35955-bb94-4f4a-9e8b-a12e244a1df5_rw_1920.jpg?h=0b98134c4d4e3d54cf1147fde08c9892)
I added a switch to turn on the secondary power source when the power went out. This ensured that if and when the power went out and I was not using the space, the secondary battery would not get drained out. Also, there was a lot of wiring.
![](https://pro2-bar-s3-cdn-cf2.myportfolio.com/38c07abdbc33a5f69ed3a721ae88a41c/d06056fb-0e7c-4c2e-bce6-78f608853c3c_rw_1920.jpg?h=bc8639a2bf5ea6b74664ffa92cfd2436)