This shows you the differences between two versions of the page.
|
pm:prj2026:alexandru.jipa2803:vnedelceva [2026/05/04 23:19] vnedelceva created |
pm:prj2026:alexandru.jipa2803:vnedelceva [2026/05/05 00:07] (current) vnedelceva [Descriere generala] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | s | + | ====== PIR-Based Home Security System ====== |
| + | |||
| + | ===== Introducere ===== | ||
| + | |||
| + | Proiectul reprezinta un sistem simplu de securitate pentru casa, construit pe ATmega328P-Xplained Mini, folosind un senzor de miscare PIR, un keypad 4x4 si un display LCD 16x2. Sistemul poate fi armat si dezarmat prin introducerea unui cod PIN. Odata armat, monitorizeaza miscarea si ofera un interval de timp pentru dezarmare inainte de declansarea alarmei (buzzer si LED). Logica este implementata folosind o masina de stari, pentru un comportament eficient, fara blocaje. | ||
| + | |||
| + | Pe langa functionalitatea de baza, sistemul este proiectat sa poata fi extins cu senzori suplimentari (senzor de fum, senzor de gaz, contact magnetic pentru usi/ferestre) si conectivitate wireless (Bluetooth prin HC-05) pentru trimiterea de notificari in timp real catre utilizator. | ||
| + | |||
| + | ===== Descriere generala ===== | ||
| + | |||
| + | Sistemul functioneaza ca o masina de stari cu 4 stari principale: | ||
| + | |||
| + | **DEZARMAT → EXIT DELAY → ARMAT → ENTRY DELAY → ALARMA → DEZARMAT** | ||
| + | |||
| + | * **DEZARMAT** — LED verde aprins, LCD afiseaza "System disarmed". Utilizatorul armeaza sistemul apasand * si introducand PIN-ul. | ||
| + | * **EXIT DELAY (10s)** — countdown pe LCD, bip la fiecare 2 secunde, timp sa iasa din camera. | ||
| + | * **ARMAT** — PIR activ prin intrerupere externa (INT0), LED rosu aprins. | ||
| + | * **ENTRY DELAY (15s)** — miscare detectata, countdown pe LCD, bip accelerat. Utilizatorul introduce PIN-ul. | ||
| + | * **ALARMA** — buzzer continuu + LED rosu clipeste + LCD afiseaza "ALARM!". Se dezactiveaza doar prin PIN corect. | ||
| + | |||
| + | Schema bloc: | ||
| + | |||
| + | {{:pm:prj2026:alexandru.jipa2803:schema-bloc.png?600|}} | ||
| + | |||
| + | |||
| + | ===== Hardware Design ===== | ||
| + | |||
| + | **Lista de piese:** | ||
| + | |||
| + | ^ Componenta ^ Model ^ Rol ^ | ||
| + | | Microcontroller | ATmega328P-Xplained Mini | Unitate centrala de control | | ||
| + | | Senzor PIR | HC-SR501 | Detectie miscare | | ||
| + | | Display LCD | 16x2 + modul I2C PCF8574 | Afisare stare sistem | | ||
| + | | Keypad | Membrana 4x4 | Introducere cod PIN | | ||
| + | | Buzzer | Pasiv 5V | Alerta sonora | | ||
| + | | LED rosu | 5mm + rezistor 220Ω | Indicator alarma | | ||
| + | | LED verde | 5mm + rezistor 220Ω | Indicator sistem dezarmat | | ||
| + | | Breadboard + fire | — | Prototipare | | ||
| + | | Modul Bluetooth | HC-05 | Notificari wireless | | ||
| + | | Senzor fum | MQ-2 | Detectie fum/gaz | | ||
| + | | Contact magnetic | Reed switch | Detectie usi/ferestre | | ||
| + | |||
| + | **Conexiuni principale:** | ||
| + | * PIR OUT → PD2 (INT0) | ||
| + | * LCD SDA → PC4, SCL → PC5 (TWI) | ||
| + | * Keypad rows → PD7, PB0, PB1, PB2 / cols → PB3, PB4, PB5, PB6 | ||
| + | * Buzzer → PD6 (OC0A - Fast PWM) | ||
| + | * LED rosu → PD5, LED verde → PD4 | ||
| + | |||
| + | ===== Software Design ===== | ||
| + | |||
| + | **Mediu de dezvoltare:** AVR-GCC + Atmel Studio | ||
| + | |||
| + | ^ Periferic ^ Utilizare ^ | ||
| + | | INT0 | Intrerupere externa PIR | | ||
| + | | Timer0 Fast PWM | Generare ton buzzer | | ||
| + | | Timer1 CTC | Timekeeping non-blocant | | ||
| + | | TWI (I2C) | Comunicare LCD prin PCF8574 | | ||
| + | | GPIO | Scan keypad matriceal, LED-uri | | ||
| + | | UART | Comunicare modul wireless | | ||
| + | |||
| + | **Structura software:** | ||
| + | * Masina de stari in ''main()'' cu ''switch(alarm_state)'' | ||
| + | * ISR pe INT0 seteaza flag la detectie PIR, procesat in bucla principala | ||
| + | * Scan keypad prin polling matriceal cu debounce software | ||
| + | * Timere non-blocante bazate pe Timer1 (fara ''_delay_ms()'') | ||
| + | * Verificare PIN prin comparare cu codul stocat in EEPROM | ||
| + | |||
| + | ===== Rezultate Obtinute ===== | ||
| + | |||
| + | |||
| + | ===== Concluzii ===== | ||
| + | |||
| + | |||
| + | ===== Download ===== | ||
| + | |||
| + | ===== Jurnal ===== | ||
| + | |||
| + | * **04.05.2026** — Milestone documentatie | ||
| + | |||
| + | ===== Bibliografie/Resurse ===== | ||
| + | |||
| + | **Hardware:** | ||
| + | * [[https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42743-ATmega328P_Datasheet.pdf|Datasheet ATmega328P]] | ||
| + | |||
| + | **Software & Tutoriale:** | ||
| + | * [[https://ocw.cs.pub.ro/courses/pm/tutorial/proiect|Ghid proiect PM]] | ||
| + | * [[https://www.instructables.com/Arduino-Home-Security-System/|Arduino Home Security System - Instructables]] | ||