summaryrefslogtreecommitdiffstats
path: root/_log/fpm-door-lock-lp.md
blob: 1be2b76efc570f8066ca7719b6050419b19a6bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: Fingerprint door lock (LP)
date: 2025-08-18
layout: post
project: true
thumbnail: thumb_sm.jpg
---

Second iteration of the [RF door lock](../fpm-door-lock-rf). Old version worked
but drew too much quiescent current. Sensor and servo pulled 13.8mA and 4.6mA
idle. Linear regulators were a disaster. Battery didn't last 24 hours.

<video style="max-width:100%;" controls="" poster="pcb.jpg">
  <source src="video.mp4" type="video/mp4">
</video>

Redesigned the PCB completely. Tossed the RF modules and the second MCU.
Connected R503 sensor directly to the ATmega328P. Sensor now mounts on door
exterior, servo attaches to interior knob, MCU stays on the back to prevent
tampering.

<table style="border: none; width: 100%">
  <tr style="border: none;">
    <td style="border: none; width: 49.9%; background-color: transparent; text-align: center;">
      <img src="breadboard.jpg" alt="PCB" style="width: 100%">
    </td>
    <td style="border: none; background-color: transparent; text-align: center;">
      <img src="pcb1.jpg" alt="Design" style="width: 100%">
    </td>
  </tr>
  <tr style="border: none;">
    <td colspan="2" style="border: none; background-color: transparent; text-align: center;">
      <img src="footprint.png" alt="PCB footprint" style="width: 100%">
    </td>
  </tr>
</table>

PCB specs: 2-layer, 1oz copper, 0.3mm traces (1mm for power and servo). Ground
plane on bottom layer.

Solved idle power draw with MOSFETs. 2N7000 and NDP6020P cut power to sensor
and servo before deep sleep. Through-hole MOSFETs that switch at 3.3V are
getting harder to find. NDP6020P already obsolete. 

Replaced linear regulators with MP1584EN DC-DC buck converters. No RF, noise
isn't a big concern. Buck's pin breakout not great--wouldn't fit most
commercial dev boards.

Squeezed more power savings from the MCU by running it at 3.3V/8MHz. Combined
with buck converters: 56% total power savings.

Wake sequence: MCU activates sensor MOSFET, unlocks sensor over UART, scans and
matches fingerprint. Match triggers blue LED, servo MOSFET, PWM signal to
unlock. No match triggers red LED. MOSFETs off, back to sleep.

Total power savings: 99.9% (30.6mA → 2.9μA). Verdict: Fixed. 

Commit:
[7529094](https://git.asciimx.com/fpm-door-lock/commit/?id=75290945b2fd84b3bc108fd46419ee478eaac3ca)
| Gerber: [gerber.zip](gerber.zip)