- Kind
- ESP32 smart lock
- Year
- 2025
- Area
- Machines
- Built with
- ESP32
- Arduino C++
- Blynk
- Python
- Edge Impulse
- React
The question
Can a lock recognise a person by how they knock, with no key and no keypad?
LockAI listens to which pads are touched and how long the gaps are between knocks, and opens when the pattern matches.
Why it exists
A low-cost lock for lockers, drawers and lab equipment that opens with a pattern of touches on three pads. The repository also holds the data collection and machine learning pipeline that the pattern rules came from.
How it works
From a knock pattern to an open latch
- 1
Knocks
Three knocks on the pads. Each is a combination of touched pads and a gap since the last knock.
- 2
Match
The firmware compares the knocks with two accepted patterns, with a timing window for each gap.
- 3
Latch
On a match the servo moves from 90 to 180 degrees and the green light shows. On a mismatch the red light flashes and the app is notified.
- 4
Auto-lock
After six seconds the latch closes again, unless auto-lock was switched off in the app.
Decisions
Timing is part of the password
The rules check the pad combination and also require each gap to fall inside a window, for example 450 to 750 ms, so the rhythm matters as well as the touches.
The rules came from recorded data
The gap windows were set from recorded knock sequences, which stands in for training a model that did not fit the board.
A phone app for the remote side
Blynk gives the lock a remote switch, an auto-lock switch and a status line, and the lock resyncs its state when it reconnects.
Not built yet
- A trained model running on the board; the shipped logic is rule-based
Built with
Languages
- Arduino C++
- Python
Frameworks and libraries
- React
AI and models
- Edge Impulse
Systems and hardware
- ESP32
- Blynk