Embedded · Arduino · IoT
IoT Door Lock Sensor
A $51 sensor that shows from my phone, and from an LED, whether my apartment door is locked.

Arduino MKR1010, HC-SR04, Arduino Cloud · Jan–Mar 2025
Problem
I kept walking back from my car to check whether I had locked my apartment door. Commercial smart locks cost $90–$200, and my lease ruled out changing the lock or drilling the door or wall.
What I built
An ultrasonic sensor reads the distance to the thumb-turn. The Arduino sends that to an Arduino Cloud dashboard on my phone, which shows locked or unlocked.



Problems I solved
- Voltage mismatch. The 5 V sensor could damage the 3.3 V board, so I used a voltage divider instead of buying a new sensor.
- Battery life. A 1,100 mAh LiPo lasted only about 1.5 days, and the board would not reconnect to Arduino Cloud after sleeping. I stepped back and powered it from a wall USB outlet instead.
- Noisy readings. An extension attached to the thumb-turn was a point of failure, so I removed it and read the thumb-turn directly.
- User feedback. I added a red LED after realizing I sometimes forgot to lock the door while inside. It became the most useful feature.
Result
The project solved the initial problem and the LED added feature solved another problem successfully. The total cost spent was $51.42.