This shows you the differences between two versions of the page.
|
pm:prj2026:florin.stancu:alexandra.zahiu [2026/05/08 15:39] alexandra.zahiu created |
pm:prj2026:florin.stancu:alexandra.zahiu [2026/05/23 11:57] (current) alexandra.zahiu |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Nume proiect ====== | + | ====== Vital Desk ====== |
| - | ===== Introducere ===== | + | ===== Introduction ===== |
| + | Vital Desk is an interactive embedded system designed to check and prevent the health risks of modern remote work environments. In a context where sedentary time has increased by an average of 2 hours per day , this project serves as a companion that bridges environmental monitoring with behavioral intervention. | ||
| <note tip> | <note tip> | ||
| - | Prezentarea pe scurt a proiectului vostru: | ||
| - | * ce face | ||
| - | * care este scopul lui | ||
| - | * care a fost ideea de la care aţi pornit | ||
| - | * de ce credeţi că este util pentru alţii şi pentru voi | ||
| - | </note> | ||
| - | ===== Descriere generală ===== | ||
| + | * What it does: The device monitors air quality (MQ8), climate (DHT11), and user proximity (HC-SR04). It uses a servo to break the user's static posture and displays real-time health metrics on an I2C LCD. | ||
| + | |||
| + | * Purpose: To combat the lack of an optimal microclimate in improvised workspaces and reduce cardiovascular risks associated with prolonged sitting and bad posture. | ||
| + | |||
| + | * The Concept: Moving away from passive measurement toward a proactive, artistic guardian that interacts physically with the user. | ||
| + | |||
| + | * Utility: It provides a stand-alone health assistant that functions independently of a desktop PC, ensuring a healthier and more focused workflow. | ||
| + | </note> | ||
| + | ===== General Description ===== | ||
| + | {{:pm:prj2026:florin.stancu:screenshot_2026-05-08_at_19.42.39.png?300|}} | ||
| <note tip> | <note tip> | ||
| - | O schemă bloc cu toate modulele proiectului vostru, atât software cât şi hardware însoţită de o descriere a acestora precum şi a modului în care interacţionează. | + | The project is based on three main components: data acquisition, local processing and intervenions based on alerts. |
| + | - The sensors are collecting the data, such as the temperature, humidity, gas, proximity | ||
| + | - The data is checked and based on the limits that we set at first, we can see wether the working environment is good or not. | ||
| + | - If something is above or below limits, we alert through the LCD and/or servo sensor movement | ||
| + | - Also, there’s an alert if the user is sitting way too close to the PC that they work on, or if the user hasn’t been standing for a longer period of time. | ||
| - | Exemplu de schemă bloc: http://www.robs-projects.com/mp3proj/newplayer.html | ||
| </note> | </note> | ||
| ===== Hardware Design ===== | ===== Hardware Design ===== | ||
| + | Electrical Scheme (done in Wokwi) | ||
| + | {{:pm:prj2026:florin.stancu:screenshot_2026-05-08_at_19.45.37.png?300|}} | ||
| <note tip> | <note tip> | ||
| - | Aici puneţi tot ce ţine de hardware design: | + | The physical build is a frame where the sensors are integrated as facial features of a robot assistant. |
| - | * listă de piese | + | Component List: |
| - | * scheme electrice (se pot lua şi de pe Internet şi din datasheet-uri, e.g. http://www.captain.at/electronic-atmega16-mmc-schematic.png) | + | * Microcontroller: Arduino-UNO board. |
| - | * diagrame de semnal | + | * Climate Sensor: DHT11 for temperature and humidity tracking. |
| - | * rezultatele simulării | + | * Air Quality Sensor: MQ8 for gas and CO2 detection. |
| + | * Proximity Sensor: HC-SR04 Ultrasonic sensor to detect user presence/absence and how close the user is sitting to their computer. | ||
| + | * Actuator: SG90 Servomotor for physical intervention. | ||
| + | * Display: LCD 1602 with I2C interface for status updates. | ||
| + | * Connectivity: USB cable. | ||
| </note> | </note> | ||
| + | |||
| + | ==== Proposed pinout ==== | ||
| + | |||
| + | **Arduino UNO:** | ||
| + | ^ Component ^ Arduino Pins ^ | ||
| + | | DHT11 | DATA -> D7 (PD7), VCC -> 5V, GND -> GND | | ||
| + | | HC-SR04 | TRIG -> D9 (PB1), ECHO -> D8 (PB0), VCC -> 5V, GND -> GND | | ||
| + | | MQ-8 Gas Sensor | AO -> A0 (PC0 / ADC0), VCC -> 5V, GND -> GND | | ||
| + | | SG90 Servo | Signal -> D6 (PD6), VCC -> 5V, GND -> GND | | ||
| + | | LCD 1602 (I2C) | SDA -> A4 (PC4), SCL -> A5 (PC5), VCC -> 5V, GND -> GND | | ||
| + | | Buttons (x4) | D2, D3, D4, D5 (PD2-PD5), INPUT_PULLUP, common pin -> GND | | | ||
| + | |||
| + | **Button mapping:** | ||
| + | * **Button 1 (D2):** ARM / DISARM the system. | ||
| + | * **Button 2 (D3):** Monitoring screen (temperature, humidity, gas, distance). | ||
| + | * **Button 3 (D4):** Temperature min / max screen. | ||
| + | * **Button 4 (D5):** Humidity min / max screen. | ||
| + | |||
| + | Power Supply: | ||
| + | The project is directly linked to the Laptop, using a USB cable, making the data collection easier. All sensors are powered through 5V from the Arduino UNO. | ||
| + | |||
| + | <note warning> | ||
| + | **Servo power note.** The SG90 draws short current spikes (hundreds of mA) when it starts moving. When the servo is powered from the Arduino 5V pin (especially over USB), these spikes cause brief voltage dips that can disturb the I2C bus and make both the LCD and the servo behave erratically. For a stable build, the servo should ideally be powered from a separate 5V source with a common ground to the Arduino, with a decoupling capacitor (470-1000 uF) close to the servo. In firmware, a short "quiet window" is inserted before the servo starts moving (no I2C traffic, no sensor reads) to reduce this interference. | ||
| + | |||
| + | </note> | ||
| + | {{:pm:prj2026:florin.stancu:whatsapp_image_2026-05-18_at_15.29.31.jpeg?200|}} | ||
| + | {{:pm:prj2026:florin.stancu:whatsapp_image_2026-05-18_at_15.29.31_1_.jpeg?200|}} | ||
| + | |||
| ===== Software Design ===== | ===== Software Design ===== | ||
| Line 31: | Line 73: | ||
| <note tip> | <note tip> | ||
| - | Descrierea codului aplicaţiei (firmware): | + | **Development environment** |
| - | * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) | + | * **PlatformIO** with the Arduino framework (board: ''uno'', platform: ''atmelavr''). |
| - | * librării şi surse 3rd-party (e.g. Procyon AVRlib) | + | * Build flags: ''-Os'' (optimize for size) and ''-Wall'' (all warnings). |
| - | * algoritmi şi structuri pe care plănuiţi să le implementaţi | + | * Serial monitor speed: 9600 baud. |
| - | * (etapa 3) surse şi funcţii implementate | + | |
| </note> | </note> | ||
| + | |||
| + | ==== 3rd-party libraries ==== | ||
| + | |||
| + | The firmware uses a small set of well-known Arduino libraries (declared in ''platformio.ini'' under ''lib_deps''): | ||
| + | |||
| + | * **DHT sensor library** (Adafruit) + **Adafruit Unified Sensor** - reading the DHT11 temperature and humidity. | ||
| + | * **LiquidCrystal_I2C** (marcoschwartz) - driving the 1602 LCD over I2C. | ||
| + | * **Servo** (arduino-libraries) - generating the control pulses for the SG90. | ||
| + | |||
| + | The GPIO access for the HC-SR04 and the buttons, as well as the MQ-8 ADC reads, are done **bare-metal** (direct register manipulation), in the PM lab style, instead of using ''digitalRead''/''analogRead''. | ||
| + | |||
| + | **Alert thresholds:** | ||
| + | |||
| + | Alert Trigger When? | | ||
| + | | Temperature | T > 28 C | immediate | | ||
| + | | Humidity | H > 65 % | immediate | | ||
| + | | Gas | gas > 250 ppm | immediate | | ||
| + | | Too far | distance > 30 cm | held for 10 s | | ||
| + | | Too close | distance < 10 cm | held for 30 s | | ||
| + | |||
| + | For the distance alerts, a generic **temporal timer** requires the condition to hold continuously for the configured duration before the alert fires; an ultrasonic timeout reading is treated as "very far" (nobody at the desk) so that walking away is detected reliably. | ||
| + | |||
| ===== Rezultate Obţinute ===== | ===== Rezultate Obţinute ===== | ||
| Line 44: | Line 107: | ||
| </note> | </note> | ||
| - | ===== Concluzii ===== | + | ===== Conclusions ===== |
| + | |||
| + | Vital Desk meets its original goal: a stand-alone health assistant that monitors the work environment and intervenes physically and visually when something is off, without depending on a host PC for its logic. | ||
| + | The most useful lessons from the project were on the debugging side rather than the feature side. The servo jitter was instructive: it showed clearly where the boundary between a software fix and a hardware fix lies. Spacing out the I2C traffic and the servo activity in firmware reduced the symptom, but the residual jitter is a current/power problem that software cannot fully solve. | ||
| + | |||
| + | If the project were continued, the natural next steps would be: a dedicated 5V supply for the servo to eliminate the remaining jitter, replacing the ''_delay_ms''-based tick with a hardware timer so the 10 s / 30 s timers are exact. | ||
| ===== Download ===== | ===== Download ===== | ||