summaryrefslogtreecommitdiffstats
path: root/_log/fpm-door-lock-rf.md
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-06-05 21:00:02 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-06-12 19:49:59 +0800
commita8d7508006db8309550755a72719de83bde3cdd9 (patch)
treef641b17405c674d3799ebca1f135538bfc930b7d /_log/fpm-door-lock-rf.md
parent293923a31d434c37cae454a4f1d9977772d11f02 (diff)
downloadwww-a8d7508006db8309550755a72719de83bde3cdd9.tar.gz
Improve writing.minimalist
Diffstat (limited to '_log/fpm-door-lock-rf.md')
-rw-r--r--_log/fpm-door-lock-rf.md46
1 files changed, 23 insertions, 23 deletions
diff --git a/_log/fpm-door-lock-rf.md b/_log/fpm-door-lock-rf.md
index 417368f..fb4ec29 100644
--- a/_log/fpm-door-lock-rf.md
+++ b/_log/fpm-door-lock-rf.md
@@ -8,23 +8,23 @@ thumbnail: thumb_sm.jpeg
Wanted to unlock the door with fingerprint, wirelessly to avoid drilling.
-2024-11: Started with basic 433MHz RF modules and two Arduinos. Connected data
-lines of the transceivers to UART RXD/TXDs of the MCUs. Unreliable—constant
-packet loss.
+2024-11: Started with basic 433MHz RF modules and two Arduinos. Connected the
+data lines of the transceivers to the UART RXD/TXDs of the MCUs.
+Unreliable—constant packet loss.
-2025-01: Switched to RFM69 modules. Ball-ache to program. Followed the
-datasheet as well as I could, audited the code multiple times, cross-checked
-with RadioHead and RFM69 drivers. No luck.
+2025-01: Switched to RFM69 modules. Implemented the driver from scratch.
+Checked the datasheet, audited code, cross-checked with RadioHead and RFM69
+drivers. Driver non-functional.
-The ATmega328P runs at 5V and the RFM69 at 3.3V. Suspect logic-level converter
-(LLC) issues. Not enough swing?
+ATmega328P chips run at 5V, while RFM69s run at 3.3V. Suspect logic-level
+converter (LLC) issues. Not enough swing?
-2025-04: Ditched the RFM69s. Switched to NRF24L01+ modules. Data pins 5V
-tolerant, no LLC required. Spent six weekends writing a clean-room driver.
-Finally some success.
+2025-04: Ditched the RFM69s with NRF24L01+ modules—data pins are 5V tolerant,
+no LLC required. Implemented the driver over six weekends. Wireless modules are
+now operational.
-Implemented a simple XOR cipher for the RF channel—good enough for my threat
-model. The Key is cycled to resist replay attacks:
+Encrypted the RF channel with XOR cipher—sufficient for the threat model; key
+recycled to resist replay attacks:
```
static inline void keygen(char *buf, uint8_t n)
@@ -44,15 +44,15 @@ static inline void keygen(char *buf, uint8_t n)
}
```
-Protocol: FPM sends SYN. Servo responds with a session key. Both xor-ed with a
-static key. Session key is used thereafter. Command set is kept private—serves
-as an authentication layer for the endpoints.
+Protocol: FPM sends SYN. Servo responds with session key. Both XOR-ed with a
+static key. Session key is used thereafter. Private command set serves as an
+authentication layer for the endpoints.
-2025-05: Wrote drivers for R503 and FPM10A sensors. UART RX sequence was
-tricky—adopted the Adafruit C++ implementation to C. Chose the R503 for the
-lock due to its built-in LEDs and better form factor.
+2025-05: Ported the Adafruit C++ drivers for R503 and FPM10A fingerprint
+sensors to C. Chose R503 for the lock due to its built-in LEDs and better form
+factor.
-2025-06: Two PCBs for FPM (front) and servo (back) controllers.
+2025-06: Designed two PCBs for FPM (front) and servo (back) controllers:
<table style="border: none; width: 100%">
<tr style="border: none;">
@@ -79,13 +79,13 @@ lock due to its built-in LEDs and better form factor.
PCB specs: 2-layer, 1oz copper, 0.3mm traces (0.5mm for power). Ground plane.
-2025-06: NRF24L01+ stopped working after mounting on PCB. Too close to the PWM
-line. Soldering a large 47uF (16V) electrolytic capacitor between VCC and
+2025-06: NRF24L01+ stopped working after mounting on the PCB. Too close to the
+PWM line. Soldering a large 47uF (16V) electrolytic capacitor between VCC and
ground fixed it.
Power problems became clear. Linear regulators dissipated too much heat. The
sensor and the servo drew 13.8mA and 4.6mA quiescent currents—unacceptable for
-a battery-powered device. Servo inrush current exceeds 1A. 0.3mm tracks cuts it
+a battery-powered device. Servo inrush current exceeds 1A. 0.3mm tracks cut it
too close.
Verdict: Functional but not practical. Battery died in under 24 hours. Led to