
Building an encrypted BLE and NFC smart lock with closed-loop position sensing
Challenge
A smart-lock hardware team needed a battery-powered deadbolt that could be unlocked over an encrypted Bluetooth connection or an NFC tap, that actually verified the bolt had reached its locked or unlocked position rather than assuming so after a fixed motor run time, that could detect physical tampering, and that was built on real, fabricated hardware rather than a dev-kit proof of concept.
Solution
We built the firmware on Nordic's nRF Connect SDK (Zephyr RTOS), securing BLE communication end to end with AES-128 CTR-mode encryption - every command encrypted, decrypted, and authenticated on-device - alongside an NFC path for tap-to-unlock access. Rather than driving the deadbolt motor for a fixed duration and hoping it reached the right position, we wired in two independent VL6180X time-of-flight sensors - one reading the deadbolt's throw distance, one reading the lock arm - so the firmware knows, to the millimeter, whether the bolt is fully extended, fully retracted, or jammed partway, with retry and timeout logic as a safety net if a reading is ever ambiguous. An ADXL345 accelerometer with tuned axis filtering watches for tampering, an RTC handles scheduling and event logging to wear-leveled flash storage, and we profiled and documented power consumption across every operating state - BLE and NFC active, sensors asleep, sensors active - to keep the device living on battery power for the long haul. The design went all the way to fabricated PCBs, not just a dev-kit prototype.
Results
The result is a smart lock that verifies its own physical state instead of trusting a timer, with two independently read sensors confirming every lock and unlock cycle before the firmware reports success. Encrypted BLE and NFC give users two independent ways in, tamper detection adds a layer of physical security many low-cost smart locks skip entirely, and the documented power profiling gives the product a battery-life story backed by real measurement rather than a marketing estimate.
Kick-start your project
Get in touch with our team to discuss your business needs and see how we can help with a project like this one.