diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2025-12-07 18:29:02 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2025-12-07 18:29:02 +0800 |
| commit | 52a2f45e8d6566e398adb7e3a7d0adde71401c3e (patch) | |
| tree | 042d3838cfb7026658ec503d3352494fcf63bd2c /_projects | |
| parent | 1c40e054254cda1a0685d811cb76d490b5d3a358 (diff) | |
| download | www-52a2f45e8d6566e398adb7e3a7d0adde71401c3e.tar.gz | |
Polish FPM post.
Diffstat (limited to '_projects')
| -rw-r--r-- | _projects/fpm-door-lock.md | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/_projects/fpm-door-lock.md b/_projects/fpm-door-lock.md index 43b0387..41a2aec 100644 --- a/_projects/fpm-door-lock.md +++ b/_projects/fpm-door-lock.md @@ -22,12 +22,12 @@ attached to the interior door knob. The MCU must be installed at the back of the door to prevent unauthorized users from tampering with it. When no one is interacting with the lock, the MCU is in deep sleep. The sensor -and the servo each draw 13.8 mA and 4.6 mA of quiescent currents. To prevent -this idle current draw, the MCU employs MOSFETs to cut off power to them before +and the servo each draw 13.8mA and 4.6mA of quiescent currents. To prevent this +idle current draw, the MCU employs MOSFETs to cut off power to them before entering deep sleep. Doing so is crucial for conserving the battery. Without power, the sensor remains in a low-power state, drawing approximately -2.9 μA through a separate power rail. When a finger comes into contact with the +2.9μA through a separate power rail. When a finger comes into contact with the sensor, the sensor triggers a pin change interrupt, waking up the MCU. The MCU activates a MOSFET, which in turn activates the sensor. Over UART, the MCU unlocks the sensor and issues commands to scan and match the fingerprint. @@ -57,7 +57,7 @@ page. ## The PCB For this project, I designed a custom PCB and had it fabricated by JLCPCB. Like -the software, the circuit is chiefly concerned with optimizing power +the software, the circuit is primarily concerned with optimizing power consumption and extending battery life. <table style="border: none; width: 100%"> @@ -76,33 +76,32 @@ consumption and extending battery life. </tr> </table> -To that end, the principal components of the circuit are the 2N7000 and +Consequently, the principal components of the circuit are the 2N7000 and NDP6020P field-effect transistors. They switch power electronically to the servo and the fingerprint sensor, the two most power-hungry parts of the circuit. The two MP1584EN buck converters play an axial role in efficiently regulating power to the MCU and the sensor. -The ATmega328P typically operates at 5 V with a 16 MHz crystal oscillator. To +The ATmega328P typically operates at 5V with a 16MHz crystal oscillator. To further reduce power consumption, I modified the ATmega328P's fuses to run at -3.3 V with an 8 MHz crystal oscillator. +3.3V with an 8MHz crystal oscillator. The bottom right area of the PCB isolates the power supply of the servo from the rest of the circuit. This shields components such as the MCU from the -servo's high current draw, which can exceed 1 A. The IN4007 diode in slot U2 +servo's high current draw, which can exceed 1A. The IN4007 diode in slot U2 serves as a flyback diode, protecting the MOSFET from reverse currents generated by the servo. -Lastly, the 56 kΩ and 10 kΩ resistors in slots R10 and R11 form a voltage -divider circuit. Its output is fed to the ADC of the MCU, which measures the -supply voltage by comparing it to the internal bandgap reference voltage. +Lastly, the 56kΩ and 10kΩ resistors in slots R10 and R11 form a voltage divider +circuit. Its output is fed to the ADC of the MCU, which measures the supply +voltage by comparing it to the internal bandgap reference voltage. ## Epilogue This project began nearly a year ago when I attempted to unlock our door wirelessly by writing to the UART ports of two MCUs connected to inexpensive -433 MHz RF transceivers, as if there were an invisible wire between them. -Although I failed, it led me down a rabbit hole of RF communications, MOSFETs, -PCB design, and low-power circuits. +433MHz RF transceivers. Although I failed, it led me down a rabbit hole of RF +communications, MOSFETs, PCB design, and low-power circuits. During the project, I reinvented the wheel many times. I implemented a low-level network stack using only RF modules and an 8-bit microcontroller, |
