Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| report:dvp [2026/05/21 12:06] – [Software] team3 | report:dvp [2026/06/01 15:19] (current) – [Structure] team3 | ||
|---|---|---|---|
| Line 47: | Line 47: | ||
| </ | </ | ||
| </ | </ | ||
| + | {{: | ||
| === Choice of the subject === | === Choice of the subject === | ||
| Immediately following the initial presentation, | Immediately following the initial presentation, | ||
| Line 109: | Line 110: | ||
| - | The bottle will be prices at approximately 330 €. For mass production the team could look to reduce the production price up to 100 € per bottle. Meaning the end price of the bottle would be around | + | The bottle will be prices at approximately 330 €. For mass production the team could look to reduce the production price up to 140 € per bottle. Meaning the end price of the bottle would be around |
| ==== Design ==== | ==== Design ==== | ||
| - | MATERIAL SELECTION : "The materials for each component of the smart water bottle were selected based on both functional requirements and aesthetic considerations, | + | === Material selection === |
| + | |||
| + | The materials for each component of the smart water bottle were selected based on both functional requirements and aesthetic considerations, | ||
| Polypropylene (PP) is used for the cap due to its durability and ability to withstand repeated use, while also providing a clean and smooth finish that contributes to a modern appearance. | Polypropylene (PP) is used for the cap due to its durability and ability to withstand repeated use, while also providing a clean and smooth finish that contributes to a modern appearance. | ||
| The bottle body is made from polished aluminum, chosen not only for its lightweight structure and corrosion resistance, but also for its sleek, reflective surface, which enhances the overall aesthetic and gives the product a premium look. | The bottle body is made from polished aluminum, chosen not only for its lightweight structure and corrosion resistance, but also for its sleek, reflective surface, which enhances the overall aesthetic and gives the product a premium look. | ||
| For the compartment containing the electronic components, a plastic material such as polycarbonate is used. This ensures proper electrical insulation and waterproof protection, while also allowing for a precise and refined design that integrates seamlessly with the rest of the bottle. | For the compartment containing the electronic components, a plastic material such as polycarbonate is used. This ensures proper electrical insulation and waterproof protection, while also allowing for a precise and refined design that integrates seamlessly with the rest of the bottle. | ||
| - | Overall, the combination of these materials supports a design that is durable, safe, and visually appealing for everyday use." | + | Overall, the combination of these materials supports a design that is durable, safe, and visually appealing for everyday use. |
| === Structure === | === Structure === | ||
| Line 215: | Line 218: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Finite Element Analysis (FEA) was carried out in SolidWorks to evaluate the bottle' | ||
| + | |||
| + | Next, a 1.5-meter drop test was simulated. In this dynamic scenario, the maximum stress peaked at 133.7 MPa, with the impact forces heavily concentrated along the bottom edge of the bottle. To properly protect the internal electronics, | ||
| <color # | <color # | ||
| Line 442: | Line 463: | ||
| <WRAP centeralign> | <WRAP centeralign> | ||
| <figure fig: | <figure fig: | ||
| - | {{:packaging_solution_v2.png?400|}} | + | {{:report: |
| < | < | ||
| </ | </ | ||
| Line 465: | Line 486: | ||
| Refer main changes in relation to the designed solution. | Refer main changes in relation to the designed solution. | ||
| - | === Structure === | ||
| - | Detail and explain any changes made in relation to the designed solution, including structural downscaling, | ||
| - | === Hardware | + | ===Structure=== |
| - | Detail and explain any change | + | During the prototype phase, several modifications were made compared to the original design |
| - | In case there are changes regarding | + | |
| + | Another major change concerned the bottle base and sensor mounting. In the original design, the system included a separate base structure intended to contain some of the hardware and provide mounting points for the sensors. In the prototype version, this structure was simplified by attaching the sensors directly to the bottom section of the bottle instead of using a detachable or independent base. Although the base structure was removed, the electronic hardware is still protected inside a custom 3D-printed plastic casing. This downscaled the mechanical design and reduced the number of structural parts required for assembly. To secure and seal the components, superglue and silicone were used during assembly. Superglue was mainly used for mounting and fixing components in place, while silicone was applied to improve sealing and provide protection against water and moisture. | ||
| + | |||
| + | An additional modification was the inclusion of an OLED display. The original design did not include a display screen, but during development an OLED module was added because it was supplied as an extra component by the manufacturer. The display improved the functionality of the prototype by allowing real-time system information and sensor readings to be shown directly to the user. Compared to the initial design, this provided a more interactive and user-friendly experience while also making testing and debugging easier during development. | ||
| + | |||
| + | ===Hardware=== | ||
| + | |||
| + | |||
| + | During the prototype development, | ||
| + | |||
| + | The main issue concerned the battery system. The original design specified a 3S lithium-ion battery pack with a matching 3S BMS. However, 4 18650 batteries and a 4S BMS were received instead. This created a compatibility problem, since a 4S BMS is designed to monitor and balance four cells and cannot be properly used with a 3-cell configuration. It would also result in incorrect voltage levels compared to the intended system design. | ||
| + | |||
| + | After evaluating the available options, the decision was made to use all 4 batteries in series together with the 4S BMS, effectively changing the system to a 4S configuration. Due to this change, the original charging setup was no longer compatible with the new voltage system, and the charging function was therefore omitted from the prototype implementation. | ||
| + | |||
| + | Another modification involved the system fuse. The original design specified a 5A fuse to handle normal operating current and short peaks from components such as the ESP32, sensors, and UV-C LED module. However, a 3A fuse was used instead due to availability. This lowers the maximum current threshold and increases the sensitivity of the protection system, meaning the fuse is more likely to blow during peak load conditions. | ||
| + | |||
| + | Overall, these changes were necessary to adapt to available components, but they also introduced deviations from the original electrical design, particularly in terms of voltage configuration and power system robustness. | ||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{: | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | === Functional Testing Results === | ||
| + | |||
| + | To verify the reliability and functionality of the TRAQUA smart bottle prototype, all major electronic and sensing components were tested individually and as part of the integrated system. The table below summarizes the performed tests, expected behavior, obtained results, and final status of each subsystem. | ||
| + | |||
| + | ^ Component / System ^ Function Tested ^ Expected Result ^ Actual Result ^ Status ^ | ||
| + | | TDS Water Quality Sensor | Water quality measurement | Detect changes in TDS values accurately | Stable ppm measurements for different water samples | PASS | | ||
| + | | Accelerometer (LIS3DHTR) | Motion and orientation detection | Correctly detect bottle tilt and movement | Accurate orientation measurements with stable readings | PASS | | ||
| + | | Battery Pack (4S Li-ion) | Power delivery | Supply stable voltage to system | Stable voltage supplied during operation | PASS | | ||
| + | | BMS Protection Module | Voltage regulation and protection | Stable input/ | ||
| + | | Buck Converter (16 V → 5 V) | Voltage step-down conversion | Regulated 5 V output | Stable 5.01 V output achieved | PASS | | ||
| + | | Charger System | Battery charging | Proper charging of 4S battery pack | Charging failed due to configuration mismatch | FAIL | | ||
| + | | UV-C Sterilization Module | UV-C activation and control | Safe activation/ | ||
| + | | Temperature & Humidity Sensor | Environmental monitoring | Stable temperature and humidity readings | Accurate and stable measurements obtained | PASS | | ||
| + | | Force Sensitive Resistor (FSR) | Water level estimation | Detect weight and fill level changes | Sensor values increased correctly with weight | PASS | | ||
| + | | ESP32 DevKit V1 | System control and communication | Stable operation and Wi-Fi communication | Reliable communication and stable operation | PASS | | ||
| + | |||
| + | == Review and Validation Process == | ||
| + | |||
| + | Each subsystem of the TRAQUA prototype was tested under practical operating conditions using serial monitoring, voltage measurements, | ||
| + | |||
| + | The obtained results were compared against the expected functionality of each subsystem. Stable measurements, | ||
| + | |||
| + | == Overall Conclusion == | ||
| + | |||
| + | The functional testing confirmed that the TRAQUA smart bottle prototype operates reliably and that all major subsystems function as intended. The sensors, ESP32 microcontroller, | ||
| + | |||
| + | The only major issue identified during testing was the incompatibility between the charger and the selected 4S battery configuration, | ||
| === Software === | === Software === | ||
| + | ** Implementation Changes and Prototype Code** | ||
| + | Changes Made in Relation to the Designed Solution | ||
| + | Temperature sensing — sensor and library change. The initial design used a DS18B20 digital probe driven by the OneWire and DallasTemperature libraries. This was replaced with an SHT21/ | ||
| + | |||
| + | Additional sensing and output components. Several components were integrated beyond the original sensor set: an analog pressure sensor (used to estimate the water volume in the bottle and, from that, detect drink events), a Gravity TDS meter (replacing the placeholder TDS value with a real, temperature-compensated reading in ppm), a magnetic reed switch (acting as a safety interlock), a UVC light control output, an SSD1306 OLED display, and two status LEDs (green/red) indicating drinking-water quality. The pH value remains a placeholder pending a calibrated pH probe. | ||
| + | Safety architecture. Because the prototype includes a UVC light, a reed-switch interlock was added: the firmware forces the UVC output off at every boot and continuously verifies that a magnet is detected before the device operates. The interlock is fail-safe — an open or broken switch reads as " | ||
| + | |||
| + | Development tools and platforms. The Arduino IDE was upgraded from version 1.8.x to 2.x after the older version produced a package-manager fault and slow, un-cached compiles; version 2.x provides working build caching and noticeably faster recompilation. Firmware is built on the Espressif ESP32 Arduino core. Libraries added during development: | ||
| + | Mobile application platform. The app is built with React Native and Expo (expo-router, | ||
| + | Application-level code changes. Three notable changes were made to the app's BLE layer. First, the connection now negotiates an enlarged MTU (247 bytes); the default 23-byte MTU truncated the JSON sensor payload. Second, device scanning was changed to filter by the service UUID rather than by device name, which proved more reliable on recent Android (Samsung) devices. Third, the data model was extended: the SensorReading type gained humidity and bottleVolumeMl fields, the BLE parser was updated to read them, and the global state provider (BottleProvider) gained logic that automatically logs a drink when the measured bottle volume drops.charts. | ||
| + | |||
| + | ** Prototype Code Flowcharts** | ||
| + | |||
| + | Smart device firmware — initialisation (setup) | ||
| + | |||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{: | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | Smart device firmware — main loop (loop) | ||
| + | |||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{: | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Mobile application — BLE connection and data flow | ||
| + | |||
| + | |||
| + | <WRAP centeralign> | ||
| + | <figure fig: | ||
| + | {{: | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| === Tests & Results === | === Tests & Results === | ||
| Line 481: | Line 596: | ||
| == Software tests == | == Software tests == | ||
| + | Our software testing framework directly addresses functionality, | ||
| Software tests comprise: | Software tests comprise: | ||
| (i) functional tests regarding the identified use cases / user stories; | (i) functional tests regarding the identified use cases / user stories; | ||