You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add initial documentation for Smart Lockbox project
* Add architecture diagram for Smart Lockbox project
* Refactor protoboard setup in project documentation: updated wiring descriptions, clarified component assembly on two 7x9 protoboards, and revised bill of materials for accuracy.
* Added images and update documentation
* Fixed image format to be webp instead of jpg
* Renamed images with lowercase
Copy file name to clipboardExpand all lines: website/versioned_docs/version-fils_en/project/2026/sergiu.lefter/index.md
+55-51Lines changed: 55 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,63 +15,48 @@ A Rust-based electronic lockbox with keypad PIN access, servo lock control, loca
15
15
This project is a smart lockbox controlled by an STM32 Nucleo board.
16
16
The user enters a PIN on a 3x4 keypad. If the PIN is correct, an SG90 servo unlocks the box. If it is wrong, access is denied and a passive buzzer gives warning feedback.
17
17
18
-
I also use a mechanical endstop to detect when the lid is closed, so the lock can return automatically to the locked position.
19
-
For the extended version, I added an ESP32 for network logging and a possible admin reset flow for the PIN.
18
+
For the extended version, I added an ESP32 for network logging, remote commands, and a local admin panel for PIN management.
20
19
21
20
## Motivation
22
21
23
22
I chose this project because it is practical and also a good embedded Rust challenge.
24
-
It combines hardware and software in one system: keypad input, control logic, servo actuation, sensor feedback, and communication.
23
+
It combines hardware and software in one system: keypad input, control logic, servo actuation, user feedback, and communication.
25
24
I also wanted to build something physical that I can test and improve step by step.
The software is organized around a small access-control state machine:
45
+
-`PIN_SETUP`: active when no valid PIN is stored yet. The box stays accessible and the user must define a new PIN.
46
+
-`LOCKED`: normal idle state after a PIN exists. The system waits for keypad input and compares it with the saved code.
47
+
-`UNLOCKED`: entered after a valid PIN or an admin override. In this state the servo opens the mechanism and the UI shows that access is granted.
48
+
49
+
The implementation is split into two software parts:
50
+
- STM32 firmware written in Rust with Embassy. This side handles keypad scanning, servo control, LCD updates, buzzer patterns, UART communication, and flash-backed PIN persistence.
51
+
- ESP32 admin-panel firmware written as an Arduino sketch. This side creates a local Wi-Fi access point, serves the web panel, forwards commands over UART, and keeps temporary logs in RAM.
52
+
53
+
For hardware bring-up and debugging, the STM32 firmware also includes multiple `FirmwareMode` test modes:
Researched smart lockbox implementations and decided on the final project direction. Chose the main architecture around STM32 + keypad + servo and started the documentation page.
82
67
83
68
### Week 6-7
84
-
Updated the hardware plan and replaced several components: breadboard with protoboard, 4x4 keypad with 3x4 keypad, reed switch with mechanical endstop, and active buzzer with passive buzzer. Ordered all required parts and checked compatibility.
69
+
Updated the hardware plan and replaced several components: breadboard with protoboard, 4x4 keypad with 3x4 keypad, and active buzzer with passive buzzer. Ordered all required parts and checked compatibility.
85
70
86
71
### Week 8
87
-
Defined the interface-board approach to avoid soldering on the rental STM32 board (female header bridge through a dedicated 7x9 protoboard). Added ESP32 networking scope for event logging and possible admin PIN reset flow.
72
+
Defined the interface-board approach to avoid soldering on the rental STM32 board (female header bridge through a dedicated 7x9 protoboard). Added ESP32 networking scope for event logging and a local admin control flow.
73
+
74
+
### Week 9-10
75
+
Started putting together the hardware and moving from planning to real assembly. A big part of this stage was debugging early hardware issues, especially the LCD, which initially powered on but did not show text correctly.
76
+
77
+

78
+
79
+
### Week 11-12
80
+
Continued debugging all hardware components until they became reliable. I discovered that I had badly soldered the I2C backpack onto the LCD, so I had to buy a new one and solder it again correctly on the second attempt. After that, I got almost all major components working on a breadboard, with the ESP being the first one I brought up successfully.
81
+
82
+

83
+

84
+

85
+
86
+
### Week 13-14
87
+
Implemented software testing modes through `FirmwareMode` and also built the ESP32 web admin panel. During final hardware assembly I badly soldered one keypad pin and burned the keypad, so I had to rethink the keypad concept and adapt the layout creatively using symbols instead of the original numeric-only interaction.
88
+
89
+

90
+

91
+

92
+

93
+

88
94
89
95
## Hardware
90
96
@@ -111,7 +117,6 @@ The rest of the circuit is assembled using two 7x9 protoboard/PCB prototyping bo
111
117
|[Header de Pini Mama 6p 2.54 mm](https://www.optimusdigital.ro/ro/componente-electronice-headere-de-pini/4156-header-de-pini-mama-6p-254-mm.html?search_query=0104210000035032&results=1)| Female headers for detachable wiring/interfaces | 0,49 RON |
0 commit comments