From d0d7a540b009433e4278f20def54b87edf3c712f Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sat, 27 Dec 2025 11:15:17 +0800 Subject: RF lock. --- _log/fpm-door-lock-rf.md | 69 +++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 33 deletions(-) (limited to '_log') diff --git a/_log/fpm-door-lock-rf.md b/_log/fpm-door-lock-rf.md index b677591..2643c2d 100644 --- a/_log/fpm-door-lock-rf.md +++ b/_log/fpm-door-lock-rf.md @@ -1,18 +1,30 @@ --- title: Fingerprint door lock (RF) -date: 2025-04-26 +date: 2025-06-05 layout: post --- -In 2023, I started tinkering with DIY electronics as a hobby. Until now, I've -been using development boards like the Arduino Uno and ESP-32-WROOM so that I -can focus on the software. Recently, I decided to step outside of my comfort -zone and design a PCB from scratch for a door lock I'm working on. +Wanted to unlock door with fingerprint, wirelessly to avoid drilling. -The lock comprises two subsystems: a fingerprint sensor in front of the door -and a servo connected to the physical lock behind the door. The fingerprint -sensor authenticates the person and signals the servo behind the door to unlock -the door over an encrypted RF channel. +2024-11: Started with basic 433MHz RF modules and two Arduinos. Connected data +lines of the transceivers to UART RXD/TXD of an ATmega328P. +Unreliable--constant packet loss. + +2025-01: Switched to RFM69 modules. A complete ball-ache. Followed the +datasheet to the letter, audited code more than 30 times, cross-checked with +RadioHead and RFM69 OSS drivers. No luck. ATmega328P runs at 5V, RFM69 3.3V. I +suspect the problem is with the logic-level converter (LLC). Not enough swing. + +2025-04: Ditched RFM69s. Switched to NRF24L01+ modules--5V tolerant, no LLC +required. Spent six weekends writing driver from scratch--clean-room, using +datasheet. Works perfectly. + +2025-05: Wrote FPM sensor drivers for R503 and FPM10A. UART RX sequence was +tricky--took multiple attempts to get handshake working. R503 has built-in LEDs +and better form factor--will use it for the lock. + +2025-06: First PCB design. Two boards: fingerprint sensor (front), servo +controller (back). Encrypted RF link between them. @@ -37,27 +49,18 @@ the door over an encrypted RF channel.
-The PCBs have two layers. A copper region serves as the ground plane. The 0.3mm -wide 1oz/ft2 copper traces can carry up to 500mA (the tracks -connecting the power source and the linear regulators have a width of 0.5mm). -Both subsystems were functional. I was able to control the servo reliably using -the fingerprint sensor. - -The designs aren't without flaws, however. The main shortcoming of the circuits -is that they draw significant amounts of quiescent currents despite employing -sleep modes. The linear regulators were a poor choice as they dissipate too -much heat. The fingerprint sensor and the servo draw 13.8mA (3.3V) and 4.6mA -(5V) respectively, as long as they are connected to the power supply. - -Although the circuit didn't draw more than 200mA without a load, the servo -under load could draw up to 600mA. I'm sailing too close to the wind with 0.3mm -copper traces. Instead, 0.4mm wide 2oz/ft2 traces would have been -safer. - -I'm working on improving the design to reduce idle current consumption and -extend the battery life. Despite its deficiencies, this was my first PCB -design, and I'm glad that it worked as well as it did. Custom PCB design marks -an important milestone in my DIY electronics journey. - -Files: [gerber_back.zip](gerber_back.zip), [gerber_front.zip](gerber_front.zip), - [source.tar.gz](source.tar.gz) +PCB specs: 2-layer, 1oz copper, 0.3mm traces (0.5mm for power). Ground plane. +Both subsystems worked—could control servo from sensor over RF. + +Power problems became clear. Linear regulators dissipated too much heat. Sensor +and servo drew 13.8mA and 4.6mA quiescent—unacceptable for battery. Servo +inrush current can exceed 1A. Trace width (0.3mm), especially for servo and +power, cutting it close. + +Verdict: Functional but not practical. Battery dead in under 24 hours. Led to +[complete redesign](../fpm-door-lock-lp/) with proper power management. + +Commit: +[f4b0b73](https://git.asciimx.com/smart-home/commit/?id=f4b0b734a595919cf451ab9448b06274c8e609a4) +| Gerber: [gerber_back.zip](gerber_back.zip), +[gerber_front.zip](gerber_front.zip) -- cgit v1.2.3