This shows you the differences between two versions of the page.
|
pm:prj2026:bianca.popa1106:tudor.brandibur [2026/05/25 00:15] tudor.brandibur [Rezultate Obţinute] |
pm:prj2026:bianca.popa1106:tudor.brandibur [2026/05/25 00:22] (current) tudor.brandibur [Software Design] |
||
|---|---|---|---|
| Line 40: | Line 40: | ||
| ===== Software Design ===== | ===== Software Design ===== | ||
| - | Arhitectura software a proiectului adoptă un model distributiv de tip Master-Slave, în care sarcinile de procesare intensivă (rețea, video, stocare) sunt complet separate de execuția fizică în timp real (control servo, afișaj). | + | The project's software architecture adopts a distributed Master-Slave model, where intensive processing tasks (networking, video, storage) are completely separated from real-time physical execution (servo control, display). |
| - | Sistemul utilizează două medii de dezvoltare interconectate prin protocolul UART la o viteză stabilă de 38400 bps. | + | The system utilizes two development environments interconnected via the UART protocol at a stable speed of 38400 bps. |
| + | === A. ESP32-CAM Module (Master / Web Server) === | ||
| - | === A. Modulul ESP32-CAM (Master / Server Web) === | + | This module manages the user interface, video stream, and local storage. It initializes a local Wi-Fi Access Point and runs an asynchronous HTTP server on port 80. |
| + | **Camera Management (OV2640)**: To prevent chip overheating, the hardware clock frequency (XCLK) is reduced to 10MHz. The video stream runs natively at a low resolution (QVGA) for a high frame-rate, dynamically switching to UXGA (HD) resolution only when saving to the SD card. | ||
| - | Acest modul gestionează interfața cu utilizatorul, fluxul video și stocarea locală. Inițializează un punct de acces Wi-Fi (Access Point) local și rulează un server HTTP asincron pe portul 80. | + | **Video Stream Optimization**: The HTML page sent to clients uses a feedback mechanism based on the image's onload event. Unlike a rigid timer (setInterval), a new frame request (/jpg) is sent to the server only after the previous frame has been fully downloaded. This eliminates HTTP buffer congestion and prevents system freezing. |
| - | **Gestionarea camerei (OV2640)**: Pentru a preveni supraîncălzirea cipurilor, frecvența ceasului hardware (XCLK) este redusă la 10MHz. Stream-ul video rulează nativ la rezoluție mică (QVGA) pentru frame-rate ridicat, trecând dinamic la rezoluție UXGA (HD) doar în momentul salvării pe cardul SD. | + | === B. ATmega328P Module (Slave / Hardware Controller)=== |
| - | **Optimizarea fluxului video**: Pagina HTML transmisă clienților folosește un mecanism de feedback bazat pe evenimentul onload al imaginii. Spre deosebire de un timer rigid (setInterval), o nouă cerere de cadru (/jpg) este trimisă către server doar după ce cadrul anterior a fost complet descărcat. Acest lucru elimină aglomerarea buffer-ului HTTP și previne înghețarea sistemului. | + | This module runs a finite state machine that asynchronously processes incoming commands on the UART bus and controls the attached peripherals. |
| + | **Servo Motor Control**: It uses the Servo.h library to generate PWM signals on pins 9 and 10. Movement on the Pan and Tilt axes is implemented discretely, in 5-degree steps, with strict software limitations between the 0° and 90° thresholds to prevent mechanical jamming of the mount. | ||
| - | === B. Modulul ATmega328P (Slave / Controler Hardware)=== | + | **Display Management (I2C)**: It uses the LiquidCrystal_I2C library to update the LCD screen. To avoid screen flickering, the updateLCD() function rewrites only the dynamic angle values at fixed coordinates, clearing residual characters by overwriting them with blank spaces. |
| - | Acest modul rulează o mașină de stări finite ce procesează asincron comenzile venite pe magistrala UART și controlează perifericele atașate. | + | Data Flow Diagram (UART Protocol) |
| - | **Controlul Servomotoarelor**: Folosește biblioteca Servo.h pentru a genera semnale PWM pe pinii 9 și 10. Mișcarea pe axele Pan și Tilt este implementată discret, în pași de 5 grade, cu limitare software strictă între pragurile 0° și 90° pentru a preveni blocarea mecanică a suportului. | + | Remotely transmitted commands are mapped directly onto unique characters (1 Byte), minimizing bus latency: |
| - | ** Managementul Afișajului (I2C)**: Folosește biblioteca LiquidCrystal_I2C pentru a actualiza ecranul LCD. Pentru a evita pâlpâirea (flicker) ecranului, funcția updateLCD() rescrie doar valorile dinamice ale unghiurilor la coordonate fixe, curățând caracterele reziduale prin suprascrierea cu spații goale. | + | - U (Up) / D (Down) -> Modifies the angle on the Pan axis. |
| - | Schema fluxului de date (UART Protocol) | + | - L (Left) / R (Right) -> Modifies the angle on the Tilt axis. |
| - | + | ||
| - | Comenzile transmise de la distanță sunt mapate direct pe caractere unice (1 Byte), reducând la minimum latența pe magistrală: | + | |
| - | + | ||
| - | - U (Up) / D (Down) -> Modifică unghiul pe axa Pan. | + | |
| - | + | ||
| - | - L (Left) / R (Right) -> Modifică unghiul pe axa Tilt. | + | |
| - | + | ||
| - | - S (Snapshot) -> Rămâne intern pe ESP32 pentru scrierea pe cardul SD (nu se trimite către ATmega). | + | |
| + | - S (Snapshot) -> Remains internal to the ESP32 for writing to the SD card (it is not sent to the ATmega). | ||
| ===== Rezultate Obţinute ===== | ===== Rezultate Obţinute ===== | ||
| - | {{ :pm:prj2026:bianca.popa1106:signal-2026-05-25-001201.jpeg |}} | + | {{ :pm:prj2026:bianca.popa1106:signal-2026-05-25-001201.jpeg?600 |}} |
| + | {{ :pm:prj2026:bianca.popa1106:img_6435.jpg?600 |}} | ||
| + | {{ :pm:prj2026:bianca.popa1106:img_6437.jpg?600 |}} | ||
| + | {{ :pm:prj2026:bianca.popa1106:img_6436.jpg?600 |}} | ||
| + | {{ :pm:prj2026:bianca.popa1106:img_6438.jpg?600 |}} | ||
| ===== Concluzii ===== | ===== Concluzii ===== | ||