meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ixc2025:lappeenranta:team_1:start [2025/05/22 11:43] – [7. Behavioral Change Analysis] mrcixc2025:lappeenranta:team_1:start [2025/05/22 15:51] (current) – [1. Group Introduction] mrc
Line 5: Line 5:
 ==== 1. Group Introduction ==== ==== 1. Group Introduction ====
  
 +We are DAMP+J, a team formed during the hackathon to explore how IoT can be used to influence individual behavior for sustainability and well-being. Our group brings together complementary skills in embedded systems, software engineering, UX design, and environmental awareness.
  
 +Our approach prioritizes simplicity, functionality, and measurable impact. Rather than building complex systems for their own sake, we focused on applying accessible technologies to address everyday habits that have long-term environmental consequences.
 +
 +Our final project, FRoast, reflects this mindset—a behavior-aware smart fridge prototype designed to promote conscious food habits, reduce waste, and make sustainability both personal and actionable.
 +
 +
 +=== Our team members ===
 +- Jorge Leon
 +- Marcia Rodrigues
 +- Daniella Fajardo
 +- Prachi Singhal
 +- Abdulkadir Abubakar
 ==== 2. Initial brainstorming ideas/concepts ==== ==== 2. Initial brainstorming ideas/concepts ====
  
Line 13: Line 25:
 We explored several IoT-based concepts that aim to nudge individuals toward sustainable, healthy, and inclusive behaviors, using a combination of sensors, actuators, for IoT tools. Below are the documented ideas from our brainstorming process: We explored several IoT-based concepts that aim to nudge individuals toward sustainable, healthy, and inclusive behaviors, using a combination of sensors, actuators, for IoT tools. Below are the documented ideas from our brainstorming process:
  
-=== 🚿 Smart Bath / Water Control System ===+=== Smart Bath / Water Control System ===
   * **Goal**: Reduce water and energy waste by encouraging shorter, more efficient showers.   * **Goal**: Reduce water and energy waste by encouraging shorter, more efficient showers.
   * **What it’s about**: This system monitors shower duration using steam and temperature sensors. It gives real-time feedback using buzzers, RGB lights, or LCD messages when a user exceeds optimal limits. The aim is to build awareness of water usage and promote sustainable bathing habits.   * **What it’s about**: This system monitors shower duration using steam and temperature sensors. It gives real-time feedback using buzzers, RGB lights, or LCD messages when a user exceeds optimal limits. The aim is to build awareness of water usage and promote sustainable bathing habits.
Line 22: Line 34:
     * Eco-feedback or daily stats to reward water-efficient behavior.     * Eco-feedback or daily stats to reward water-efficient behavior.
  
-=== 🌱 Sustainability Coach – In-Room Behavioral Monitoring ===+=== Sustainability Coach – In-Room Behavioral Monitoring ===
   * **Goal**: Help individuals become more energy-conscious in their personal spaces.   * **Goal**: Help individuals become more energy-conscious in their personal spaces.
   * **What it’s about**: This system acts as a digital coach inside a user’s room. It monitors air conditioning use, artificial lighting, fan activity, and motion detection to identify unnecessary resource consumption. Feedback is delivered via lights, screen messages, and audio cues.   * **What it’s about**: This system acts as a digital coach inside a user’s room. It monitors air conditioning use, artificial lighting, fan activity, and motion detection to identify unnecessary resource consumption. Feedback is delivered via lights, screen messages, and audio cues.
Line 32: Line 44:
     * Idle Energy Consumption: Alerts if no motion is detected but devices/lights are left on.     * Idle Energy Consumption: Alerts if no motion is detected but devices/lights are left on.
  
-=== 🥩 Meat Consumption Awareness Coach (Concept) ===+=== Meat Consumption Awareness Coach (Concept) ===
   * **Goal**: Encourage more sustainable dietary choices by reducing unnecessary meat consumption.   * **Goal**: Encourage more sustainable dietary choices by reducing unnecessary meat consumption.
   * **What it’s about**: While not fully developed, the concept involved using fridge/cooking access data to infer meat-heavy consumption patterns. The system would then prompt users with healthy plant-based alternatives or reminders through the display or audio.   * **What it’s about**: While not fully developed, the concept involved using fridge/cooking access data to infer meat-heavy consumption patterns. The system would then prompt users with healthy plant-based alternatives or reminders through the display or audio.
Line 41: Line 53:
     * While not implemented, this idea is aligned with the final fridge project selected.     * While not implemented, this idea is aligned with the final fridge project selected.
  
-=== ♿ EcoAccess Station – Adaptive Smart Environment for Inclusion ===+=== EcoAccess Station – Adaptive Smart Environment for Inclusion ===
   * **Goal**: Combine energy efficiency with personalized accessibility for users with diverse needs.   * **Goal**: Combine energy efficiency with personalized accessibility for users with diverse needs.
   * **What it’s about**: EcoAccess Station uses **RFID** to identify users and adapt room conditions based on their physical or sensory requirements (e.g., mobility-impaired, heat-sensitive). It combines **motion**, **temperature**, and **humidity** sensors to optimize energy use while respecting user comfort.   * **What it’s about**: EcoAccess Station uses **RFID** to identify users and adapt room conditions based on their physical or sensory requirements (e.g., mobility-impaired, heat-sensitive). It combines **motion**, **temperature**, and **humidity** sensors to optimize energy use while respecting user comfort.
Line 51: Line 63:
     * Provides accessible feedback through color-coded LEDs and simple audio/text messages.     * Provides accessible feedback through color-coded LEDs and simple audio/text messages.
  
-=== ❄️ Coach Fridge – Personal Eating Habits(Selected Project) ===+=== Coach Fridge – Personal Eating Habits(Selected Project) ===
   * **Goal**: Promote healthier eating habits and reduce unconscious fridge use through personalized feedback.   * **Goal**: Promote healthier eating habits and reduce unconscious fridge use through personalized feedback.
   * **What it’s about**: Coach Fridge uses **RFID** to identify users and monitors their **frequency**, **duration**, and **timing** of fridge access using **motion**, **steam**, **gas**, and **temperature** sensors. Based on the behavior, it provides real-time nudges such as reminders to avoid late-night snacking or to shorten door-open time.   * **What it’s about**: Coach Fridge uses **RFID** to identify users and monitors their **frequency**, **duration**, and **timing** of fridge access using **motion**, **steam**, **gas**, and **temperature** sensors. Based on the behavior, it provides real-time nudges such as reminders to avoid late-night snacking or to shorten door-open time.
Line 75: Line 87:
 ==== 3. Day 2 Presentation slides ==== ==== 3. Day 2 Presentation slides ====
  
 +{{ :ixc2025:lappeenranta:team_1:measuring-user-behavior-change-in-froast.pdf |}}
 ==== 4. Finalised Idea, description & Functions ==== ==== 4. Finalised Idea, description & Functions ====
  
Line 82: Line 94:
 The project is a smart fridge system designed to monitor and influence users’ eating habits through real-time feedback and personalized behavior tracking. It uses RFID identification, sensors, and actuators to encourage healthier and more sustainable routines such as avoiding late-night snacking, reducing energy waste, and improving food management. The project is a smart fridge system designed to monitor and influence users’ eating habits through real-time feedback and personalized behavior tracking. It uses RFID identification, sensors, and actuators to encourage healthier and more sustainable routines such as avoiding late-night snacking, reducing energy waste, and improving food management.
  
-=== 🔎 Description ===+=== Description ===
  
 Each time a user approaches the fridge, they are identified using an RFID tag. The system monitors fridge access patterns — how often, when, and for how long the fridge is used — and cross-references this with sensor data (e.g., steam, gas, temperature, motion) to detect potential habits like: Each time a user approaches the fridge, they are identified using an RFID tag. The system monitors fridge access patterns — how often, when, and for how long the fridge is used — and cross-references this with sensor data (e.g., steam, gas, temperature, motion) to detect potential habits like:
Line 94: Line 106:
 Real-time nudges are provided through LEDs, buzzer sounds, and messages on an LCD display, mimicking the role of a digital “fridge coach.” Real-time nudges are provided through LEDs, buzzer sounds, and messages on an LCD display, mimicking the role of a digital “fridge coach.”
  
-=== ⚙️ Functions ===+=== Functions ===
  
   * **User Identification**: RFID module links behavior to individual users.   * **User Identification**: RFID module links behavior to individual users.
Line 112: Line 124:
 ==== 5. Future Improvements ==== ==== 5. Future Improvements ====
  
-While the current prototype effectively demonstrates the core concept of behavior tracking and real-time feedback, several improvements can be made to expand functionality and user impact:+While the current prototype of FRoast successfully demonstrates real-time behavior tracking and feedback mechanisms, several enhancements could significantly broaden its impact, adaptability, and long-term user engagement. The following proposals aim to transform the system from a fixed, rule-based framework into a dynamic, user-centered behavioral assistant.
  
-  * **Data Logging and Analysis**   +=== 1. Nutritional Categorization and Food Typing === 
-    Store user behavior data (e.g.access timeduration, triggers) to analyze trends over days or weeks and generate visual feedback or reports.+Integrating basic food identification features—such as barcode scanningNFC tags, or weight sensors—could enable FRoast to provide context-specific feedback based on the type of food being storedThis would allow the system to: 
 +  * Encourage the storage of healthier food options 
 +  * Discourage excessive processed food consumption 
 +  * Track diversity in food selection
  
-  * **Mobile App or Dashboard Integration**   +=== 2. Inventory Management and Waste Reduction === 
-    Develop a simple companion interface to allow users to view their eating habits, receive personalized suggestions, and set behavioral goals.+By associating RFID tags with specific food items or enabling manual item logging, FRoast could offer inventory tracking capabilities. This would support: 
 +  Food rotation recommendations 
 +  * Alerts for items nearing expiration 
 +  * Waste reduction via proactive usage reminders
  
-  * **Nutritional Categorization**   +=== 3. Multimodal Feedback: Voice Integration === 
-    Add basic food recognition (via weight sensor or barcode scan) to help detect the type of food being accessed and give more specific dietary feedback.+To enhance accessibility, especially for users with visual impairments or limited literacy, the system could include auditory feedback through basic speech synthesis. Voice guidance could supplement or replace LCD text, making the system more inclusive for children, elderly users, or individuals with disabilities.
  
-  * **Fridge Inventory Tracking**   +=== 4. Energy Efficiency Adaptation === 
-    Track stored items using RFID or manual input to suggest food rotation and reduce waste (e.g., reminders for expiring items).+Incorporating ambient temperature sensing would enable FRoast to adjust its behavioral prompts based on seasonal energy considerationsFor example: 
 +  * Stricter alerts during hot weather when open-door cooling loss is more severe 
 +  * Relaxed thresholds during colder months when external temperatures mitigate loss
  
-  * **Voice Feedback System**   +=== 5. Machine Learning and Personalized Adaptation === 
-    Replace or supplement LCD messages with audio guidance for better accessibility, especially for children or visually impaired users.+Introducing a lightweight machine learning layer could allow the system to evolve beyond fixed thresholds. Using historical behavior data, the model could: 
 +  Adapt the intensity and tone of feedback to each user’s responsiveness 
 +  Identify subtle habit shifts and adjust nudging strategies accordingly 
 +  * Differentiate between habitual and intentional exceptions 
 +==== 6SUSAF Analysis ====
  
-  * **Energy Optimization Module**   +{{:ixc2025:lappeenranta:team_1:screenshot_2025-05-22_at_2.04.45 pm.png?400|}}
-    Add external temperature detection to adapt internal feedback based on seasonal energy demands (e.g., reducing unnecessary opening in summer).+
  
-  * **Machine Learning Integration**   +{{:ixc2025:lappeenranta:team_1:screenshot_2025-05-22_at_2.04.30 pm.png?400|}} 
-    Train a simple model to adapt nudging patterns based on user-specific behaviors rather than using static thresholds.+ 
 +{{:ixc2025:lappeenranta:team_1:screenshot_2025-05-22_at_2.04.11 pm.png?400|}} 
 + 
 +{{:ixc2025:lappeenranta:team_1:screenshot_2025-05-22_at_2.04.06 pm.png?400|}}
  
-These improvements would help transform FRoast from a rule-based behavior tool into a more adaptive, personalized, and accessible smart system. 
  
-==== 6. SUSAF Analysis ==== 
  
  
Line 198: Line 222:
 ==== 8. Final Day Presentation Slides ==== ==== 8. Final Day Presentation Slides ====
  
 +{{ :ixc2025:lappeenranta:team_1:impactxchange-hackathon-3.pdf |}}
 ==== 9. Final Code ==== ==== 9. Final Code ====
  
Line 208: Line 232:
 import dht import dht
 from mfrc522_i2c import mfrc522 from mfrc522_i2c import mfrc522
 +import collections
 +
 +class MessageQueue:
 +    def __init__(self):
 +        self.queue = []
 +
 +    async def put(self, item):
 +        self.queue.append(item)
 +
 +    async def get(self):
 +        while not self.queue:
 +            await asyncio.sleep(0.1)  # Non-blocking wait
 +        return self.queue.pop(0)
 +
 +message_queue = MessageQueue()
  
 # Constants # Constants
Line 253: Line 292:
 STEAM_SENSOR.atten(ADC.ATTN_11DB)  # Full voltage range (0-3.3V) STEAM_SENSOR.atten(ADC.ATTN_11DB)  # Full voltage range (0-3.3V)
 STEAM_THRESHOLD = 800  # Analog value above this = steam detected STEAM_THRESHOLD = 800  # Analog value above this = steam detected
 +
 +current_user = "Unknown"
  
  
Line 288: Line 329:
  
  
-async def scroll_text(text, row, delay=1):+async def scroll_text(text, row, delay=0.5):
     if len(text) <= 16:     if len(text) <= 16:
         lcd.move_to(0, row)         lcd.move_to(0, row)
Line 297: Line 338:
         lcd.putstr(text[i:i + 16])         lcd.putstr(text[i:i + 16])
         await asyncio.sleep(delay)         await asyncio.sleep(delay)
- +     
-async def show_message(upper, lower=""): +async def message_handler(): 
-    lcd.clear() +    while True: 
-    await scroll_text(upper, 0) +        upper, lower = await message_queue.get(
-    await scroll_text(lower, 1)+        lcd.clear() 
 +        await scroll_text(upper, 0) 
 +        await scroll_text(lower, 1)
  
 # --- ASYNC TASKS --- # --- ASYNC TASKS ---
Line 313: Line 356:
                 data = sum(rc522.uid.uidByte[0:rc522.uid.size])                 data = sum(rc522.uid.uidByte[0:rc522.uid.size])
                 print("Card UID:", data)                 print("Card UID:", data)
 +                current_user = data
 +                print("USER,TYPE={}, TIMESTAMP={}".format(current_user, time.time()))
 +                
                 if data == AUTHORIZED_ID:                 if data == AUTHORIZED_ID:
                     if door_opened:                     if door_opened:
 +                        print("LOG,TYPE=OPEN_DOOR, TIMESTAMP={}".format(time.time()))
                         duration = time.time() - open_time                         duration = time.time() - open_time
                         print("Duration:", duration)                         print("Duration:", duration)
Line 320: Line 367:
                         if duration > 15:                         if duration > 15:
                             await play_alarm()                             await play_alarm()
-                            await show_message("Your indecision is heating the planet.")+                            await message_queue.put(("Your indecision is heating the planet.", "")) 
 +                            print("WARNING,TYPE=OPEN_DOOR, TIMESTAMP={}".format(time.time())) 
                         else:                         else:
-                            await show_message("Thanks", "For closing me")+                            await message_queue.put(("Thanks", "For closing me"))
                     else:                     else:
                         await open_door()                         await open_door()
Line 329: Line 378:
                         current_hour = time.localtime()[3]                         current_hour = time.localtime()[3]
                         if current_hour >= 23 or current_hour < 5:                         if current_hour >= 23 or current_hour < 5:
-                            await show_message("You hungry or just emotionally empty again?", "Go to sleep, goblin.")+                            await message_queue.put(("You hungry or just emotionally empty again?", "Go to sleep, goblin.")) 
 +                            print("WARNING,TYPE=LATE_NIGHT, TIMESTAMP={}".format(time.time()))
                         else:                         else:
-                            await show_message("Welcome!", "Door is open")+                            await message_queue.put(("Welcome!", "Door is open"))
  
                 else:                 else:
                     print("Not authorized")                     print("Not authorized")
-                    await show_message("Access Denied", "Invalid Card"+                    await message_queue.put(("Access Denied", "Invalid Card")
-        await asyncio.sleep(0.5)+        await asyncio.sleep(1)
  
 def monitor_steam_sensor(): def monitor_steam_sensor():
Line 346: Line 396:
  
             if analog_value > STEAM_THRESHOLD:             if analog_value > STEAM_THRESHOLD:
-                await show_message("The fridge is not your sauna, pal."+                await message_queue.put(("The fridge is not your sauna, pal.", "")
-                print("🔥 Roast: The fridge is not your sauna.")+                print("WARNING,TYPE=HOT_FOOD, TIMESTAMP={}".format(time.time()))
  
             await asyncio.sleep(2)             await asyncio.sleep(2)
Line 353: Line 403:
         except Exception as e:         except Exception as e:
             print("DHT read error:", e)             print("DHT read error:", e)
-        await asyncio.sleep(4)+        await asyncio.sleep(2)
                  
 async def monitor_humidity(): async def monitor_humidity():
Line 365: Line 415:
             print('temperature:', temperature_value,'℃','humidity:', humidity_value,'%')             print('temperature:', temperature_value,'℃','humidity:', humidity_value,'%')
             if temperature_value > TEMP_THRESHOLD:             if temperature_value > TEMP_THRESHOLD:
-                await show_message("Want to cool the Sahara too?")+                await message_queue.put(("Want to cool the Sahara too?", "")) 
 +                print("WARNING,TYPE=HOT_FOOD, TIMESTAMP={}".format(time.time()))
             elif humidity_value > HUMIDITY_THRESHOLD:             elif humidity_value > HUMIDITY_THRESHOLD:
-                await show_message("Too hot in here!", "Not a sauna, pal.")+                await message_queue.put(("Too hot in here!", "Not a sauna, pal.")) 
 +                print("WARNING,TYPE=HOT_FOOD, TIMESTAMP={}".format(time.time()))
         except Exception as e:         except Exception as e:
             print("DHT read error:", e)             print("DHT read error:", e)
-        await asyncio.sleep(4)+        await asyncio.sleep(2)
  
 async def monitor_compartments(): async def monitor_compartments():
Line 386: Line 438:
  
             if(btnVal1 == 0):             if(btnVal1 == 0):
 +                await message_queue.put(("Those vitamins won’t drink themselves.", ""))
  
-                print("Those vitamins won’t drink themselves.")+                print("LOG,TYPE=VITAMIN, TIMESTAMP={}".format(time.time()))
                    
             btnVal2 = button2.value()             btnVal2 = button2.value()
  
             if(btnVal2 == 0):             if(btnVal2 == 0):
 +                await message_queue.put(("Food compartment opened.", ""))
  
-                print("Food compartment opened")+                print("LOG,TYPE=FOOD, TIMESTAMP={}".format(time.time()))
         except Exception as e:         except Exception as e:
             print("Compartments read error:", e)             print("Compartments read error:", e)
-        await asyncio.sleep(0.1)+        await asyncio.sleep(0.5)
  
 async def monitor_gas(): async def monitor_gas():
Line 404: Line 458:
             print("Gas Level:", gas_level)             print("Gas Level:", gas_level)
             if not gas_level:             if not gas_level:
-                await show_message("You really like cultivating diseases, huh?", "Did your fruit die?")+                await message_queue.put(("You really like cultivating diseases, huh?", "Did your fruit die?")) 
 +                print("WARNING,TYPE=FOOD_SPOILAGE, TIMESTAMP={}".format(time.time()))
         except Exception as e:         except Exception as e:
             print("Gas sensor error:", e)             print("Gas sensor error:", e)
-        await asyncio.sleep(5)+        await asyncio.sleep(3)
  
 # --- MAIN --- # --- MAIN ---
Line 416: Line 471:
         monitor_compartments(),         monitor_compartments(),
         monitor_steam_sensor(),         monitor_steam_sensor(),
-        monitor_gas()+        monitor_gas(), 
 +        message_handler()
     )     )