This shows you the differences between two versions of the page.
|
pm:prj2026:theodor_ioan.buliga:bianca.buga [2026/05/04 02:10] bianca.buga |
pm:prj2026:theodor_ioan.buliga:bianca.buga [2026/05/26 00:03] (current) bianca.buga |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| <note tip> | <note tip> | ||
| - | This project implements a password-protected alarm system using the ATmega328P microcontroller board. | + | This project implements a password-protected alarm system using the Arduino Nano ATmega328P board. |
| - | * **What it does:** The system activates a passive buzzer alarm that can only be silenced by entering the correct password via push buttons. A green LED confirms a correct entry, while a red LED and an intensified alarm sound signal an incorrect attempt. A reset button and an LCD display are also integrated. | + | * **What it does:** When triggered (via a start button or a PIR motion sensor), a 30-second countdown begins and the passive buzzer starts beeping. The alarm can only be silenced by entering the correct 4-digit password via 4 push buttons. A green LED and a success jingle confirm correct entry, while a red LED and a continuous alarm signal a wrong attempt. The system also controls a servo motor acting as a physical door lock, stores the password persistently in the internal EEPROM (survives power cycles), and allows secure in-system password changes. A 16x2 I2C LCD and UART serial output provide real-time status feedback. |
| + | * **Key features:** Password-protected alarm, PIR motion detection with arming delay, servo door lock, EEPROM password persistence, 4-state FSM, UART debug output. | ||
| </note> | </note> | ||
| ===== General Description ===== | ===== General Description ===== | ||
| - | The system is structured around the following hardware and software modules: | + | The system is structured around a **4-state Finite State Machine (FSM)** running on the ATmega328P. All peripherals are driven using direct register manipulation. |
| + | |||
| **Hardware Modules:** | **Hardware Modules:** | ||
| - | * **ATmega328P X-Mini** — the central processing unit | + | * **ATmega328P (Arduino Nano)** — central processing unit, 16 MHz, 5V |
| - | * **Passive Buzzer** — driven by PWM (Timer1) to produce variable-frequency alarm tones | + | * **PIR Sensor (HC-SR501)** — motion detection for automatic arming |
| - | * **Push Buttons (4x)** — used to input the password digits (e.g. a 4-button combination lock) | + | * **Servo Motor SG90** — actuates the physical door lock mechanism (PC0) |
| - | * **Reset Button** — triggers a software or hardware reset of the system state | + | * **Passive Buzzer** — variable-frequency acoustic feedback via GPIO toggle (PD7) |
| - | * **Green LED** — indicates correct password entry | + | * **4x Password Buttons** — 4-digit code input (PD3, PD4, PB0, PB1) |
| - | * **Red LED** — indicates wrong password entry | + | * **Start/Reset Button** — alarm trigger and system reset (PD2) |
| - | * **16x2 LCD Display ** — displays system status messages | + | * **Arming Button** — PIR sensor arm/disarm toggle (PB4) |
| + | * **Password Change Button** — enters secure password-change mode (PC1) | ||
| + | * **Green LED** — correct password / system disarmed indicator (PD5) | ||
| + | * **Red LED** — active alarm indicator (PD6) | ||
| + | * **PIR Status LED** — visual indicator when PIR is armed (PB2) | ||
| + | * **16x2 LCD (HD44780 + PCF8574 I2C adapter)** — real-time status messages (A4/A5) | ||
| **Bill of Materials:** | **Bill of Materials:** | ||
| Line 25: | Line 31: | ||
| | Component | Quantity | Notes | | | Component | Quantity | Notes | | ||
| |----------------------------|----------|------------------------------------| | |----------------------------|----------|------------------------------------| | ||
| - | | ATmega328P X-Mini board | 1 | 16 MHz, 5V | | + | | Arduino Nano ATmega328P | 1 | 16 MHz, 5V | |
| | Passive buzzer | 1 | Sound | | | Passive buzzer | 1 | Sound | | ||
| | Push buttons | 4 | Password input, pull-up resistors | | | Push buttons | 4 | Password input, pull-up resistors | | ||
| Line 63: | Line 69: | ||
| **Block Design** | **Block Design** | ||
| - | {{:pm:prj2026:theodor_ioan_buliga:block_design.png}} | + | {{:pm:prj2026:theodor_ioan.buliga:block_design.png}} |
| **Laboratories Used:** | **Laboratories Used:** | ||
| Line 72: | Line 78: | ||
| - Laboratory 2 Interrupts - Used for the reset button and potentially for handling button presses to ensure immediate response from the microcontroller without constant polling in the main loop. | - Laboratory 2 Interrupts - Used for the reset button and potentially for handling button presses to ensure immediate response from the microcontroller without constant polling in the main loop. | ||
| - Laboratory 3 Timers - Essential for the acoustic feedback. | - Laboratory 3 Timers - Essential for the acoustic feedback. | ||
| + | - Laboratory 6 I2C - Essential for the UX. | ||
| + | **Schematics** | ||
| + | {{:pm:prj2026:theodor_ioan.buliga:bb-schem.png}} | ||
| + | Pins Layout | ||
| + | | Arduino Nano Pin | Pin Type | Connected Component | Functional Description | | ||
| + | |------------------|-----------------|----------------------|--------------------------------------------| | ||
| + | | D2 | Input | SW_Push (Reset) | System reset button | | ||
| + | | D3 | Input | SW4 | Password input button | | ||
| + | | D4 | Input | Start | Process start / arming button | | ||
| + | | D5 | Input | SW1 | Password input button | | ||
| + | | D6 | Input | SW3 | Password input button | | ||
| + | | D7 | Input | SW2 | Password input button | | ||
| + | | D8 | Output | D2 (Red LED) | "Access Denied" indicator (via 220Ω R1) | | ||
| + | | D9 | Output | D1 (Green LED) | "Access Granted" indicator (via 220Ω R2) | | ||
| + | | D10 | Output (PWM) | BZ1 (Buzzer) | Acoustic alarm / feedback signal | | ||
| + | | A4 | I/O (SDA) | J1 (LCD I2C) | I2C data line | | ||
| + | | A5 | I/O (SCL) | J1 (LCD I2C) | I2C clock line | | ||
| ===== Results ===== | ===== Results ===== | ||
| + | {{:pm:prj2026:theodor_ioan.buliga:bb.png}} | ||
| ===== Conclusions ===== | ===== Conclusions ===== | ||