Inspiration

The members are part of a working/studying community that tends to rely on caffeine to improve their performance and focus. Over the years, this community has been expanding, as the idea of drinking a coffee or energetic drink becomes a trending activity, fostering new types of beverages in the market and coffee shops. While caffeine benefits one's performance, people tend to overestimate the advantages and neglect caffeine's side effects. If you consumes in the wrong amount or at the wrong time, caffeine can take the entire productivity thing against you: you will feel more fatigue, headaches, excessive anxiety, or harm sleep quality. The team's members and many others have experienced the side effects, without exactly knowing the underlying cause and feeling even more frustrated because they assumed that caffeine would enhance their performance. Therefore, the team created the Caffeine Intake Advisor to prevent people from consuming caffeine in an ineffective and potentially unhealthy way. Zepp's Smart watch also contributes to the ideation process. The advisor relies on a person's biological data to recommend accurate caffeine amounts, thus facilitating the user's life. Given that Zepp's Smart Watch is capable of collecting relevant and various data, such as sleep quality and stress level, the team is confident that the product will impact people's well-being.

What it does

In terms of direct interaction with the user: when the user wants to consume caffeine and have a productive session soon, they will enter the Caffeine Intake Advisor app in the smartwatch. The app will ask about their caffeine beverage or food preference, their goal ( duration of the work session), and based on the datasets that reveal the user's past biological responses to specific amounts of caffeine, the user's on-time health metrics, and the time of the day, recommend a final amount of caffeine to the user.

In terms of what happens in the back end:

To recommend the amount of caffeine a user can drink per day, the app needs to know: the user’s regular caffeine intake and the user’s caffeine sensitivity. These variables will be measured through Step 2 below.

How the user’s data will be collected and used:

1. (First, the app will give an initial questionnaire when the person creates the account) The questionnaire mainly aims to gather this information:

  1. Serving size: Amount of caffeinated drinks that the person drinks per day ( as well as the amount of caffeinated food)
  2. Time: The usual time period that the person is used to intake
  3. Variability: Does the person consume the same serving size every day? Or they drink more at specific times of the day
  4. Duration of habit: for how long does the person have this habit.

2.After, the app will begin to measure, for 5 days, the coffee sensitivity based on these real-time data:

  1. Sleeping pattern: sleep time and wake-up time
  2. Here is how the machine will track the sleeping pattern in these 5 days
    1. I*dentify the sleeping pattern baseline:* the usual sleep time and wake up time before the 5-days observation period. This can be extracted from the questionnaire above
    2. Identify the effects on sleeping pattern based on intake variation: During the monitoring week, the person can consume different amounts of caffeine and vary the timing of caffeine intake on different days. For example, they might have a standard amount of caffeine (their usual) on some days and a reduced or increased amount on other days. They can also adjust the time of caffeine consumption, such as having caffeine earlier or later in the day. Record the sleep-related data at regular intervals throughout the monitoring week.

After getting these data, the machine should :

  • Compare sleep patterns on days with standard caffeine intake to days with reduced or increased caffeine intake.
  • Regular Timing and sleep pattern: Compare sleep patterns on days with standard caffeine intake to days with hours before the sleeping time ( this can be extracted from extracting the time of the day the person consume caffeine)
  1. Stress level and Heart rate
  2. Here is how the machine will track the stress and heart rate in these 5 days
    1. Identify the person’s stress level and heart’s rate baseline***: starts recording stress levels and heart rate from the moment the individual wakes up in the morning, before consuming any caffeine.
    2. Measure the caffeine direct impact on the person :*** measure the stress and hear rate immediately after the person consumes their first dose of caffeine for the day.

3. After knowing the user’s Regular Caffeine Intake after 5 days. The watch can now recommend the caffeine intake every time the user wants to consume. To do that, the machine needs to calculate the x amount of caffeine per y hours of focus without yielding negative effects. To do that the machine will use this formula

Caffeine Amount (mg) = Regular Caffeine Intake x Caffeine Sensitivity Factor x Study Duration x Time Gap Factor

EXAMPLE:

**Hypothetical Values:**

- Regular Caffeine Intake: 200 mg (the individual's typical daily caffeine consumption)
- Caffeine Sensitivity Factor: 0.5 (a multiplier representing the individual's moderate caffeine sensitivity)
- Study Goal: Stay awake and enhance focus
- Study Duration: 4 hours (the intended duration of the study session)
- Time of Study: 7:00 PM to 11:00 PM (4 hours before the individual's typical bedtime at 11:00 PM)
- Desired Sleep Quality: The individual prefers to have high-quality sleep without disruptions.

**Simplified Calculation:**
Now, we'll consider the timing of caffeine consumption and its impact on sleep quality to estimate the amount of caffeine needed:

1. **Assessing Timing and Sleep Quality:**
    - Calculate the time gap between the end of the study session (11:00 PM) and bedtime (11:00 PM). In this case, it's zero hours, indicating the study session ends at bedtime.
    - Since the individual desires high-quality sleep, we aim to minimize caffeine's potential effects on sleep disruption.
2. **Caffeine Amount Calculation:**
    - To achieve the study goal (staying awake and enhancing focus) without impacting sleep quality, we aim to use the caffeine primarily during the study session.
    - We'll calculate the amount of caffeine needed during the study session to maintain focus, which is the 4-hour duration.
  • T*ime gap factor* = hours before sleep time ( time when intaking caffeine - sleep time)

How we built it

We use intel data to train an algorithm. Use minds dp to connect the machine learning algorithm with our software. The process can be categorized into several components:

Researching Key Factors and Features to Include in the Smartwatch We went through several scientific research about what factors affect people’s caffeine intake, and how different amounts of caffeine impact performance and trigger side effects based on people's caffeine sensitivity level and regular caffeine intake. We also organized a table that specifies types of caffeinated beverages and food according to the amount of caffeine based on their quantity in different units ( for example, in grams or ounces).

UI/UX Design/ Product Management We first designed two types of wireframes of the smartwatch and tried which provided an easier and smoother process, so the user can get their caffeine intake recommendation as easily, convenient, and accurately as possible. After deciding on the user flow, we looked into specific features and their placements on the interfaces, brainstorming the questions:

  • Which feature is needed to accomplish task x
  • Which feature is relevant ( but not necessary) to improve the user's experience during task x
  • What is the hierarchy of the visual and textual elements that prevent cognitive load ( consider the smartwatch interface) and appeal to the user's intuitive navigation in the app

Training Algorithms We make use of MindsDB pre-train models to predict the amount of caffeine each person can have according to the goal and body's condition. This algorithm is based on two types of datasets:

  • existing datasets online backed up by scientific research: it includes the biological factors that contribute to user's caffeine sensitivity
  • real-time data collected from the smartwatch of each user about their on-time body reactions ( through heartbeats, stress level, sleep quality) in the period of caffeine consumption.
    After research and training , the algorithm derives in the formula: Caffeine Amount (mg) = Regular Caffeine Intake x Caffeine Sensitivity Factor x Study Duration x Time Gap Factor.

Code To implement back-end code to the hardware and display the codes in the smart watch's interface, the team used JavaScript in VS code. Additionally, we integrated our work with Zepp OS API and their AutoGUI, as well as Figma in into visualize the UI/UX aspect

Challenges we ran into

One of the most significant challenges we met was discerning which features of the app to focus on, so we can maximize the social impact considering the time and resources constraints of the hackathon. There is not enough real user datasets available to the public because of the confidentiality of human biological data and the lack of existing solutions that use these datasets ( the topic of caffeine intake has been limited to scholarly research, but not applied largely in today's enterprise solutions). This was time-consuming and frustrating at first since we didn't know which problem to work on as we didn't have previous user experiences to refer to. Therefore, we had to put extra effort and time into the research outlined in the section above, in which we had to calculate with MindDB the mathematical formulas, and from them, hypothesize the values and elaborate our own data sets.

Accomplishments that we're proud of

One of our most notable achievements is integrating software with hardware given that no one in the team has any prior experience in this kind of development.

Another accomplishment is to work around our constraints and come up with a realistic and effective solution. Since there were no datasets regarding people’s reactions to varying amounts of caffeine, we had to draw on other types of data to estimate approximate statistics about a user’s caffeine sensitivity and regular intake. For example, we researched how factors like heart rate and sleep quality affect the caffeine effect on the user, and applied the insights on a mathematical formula to generate the data we needed

What we learned

The team improved its ability to connect the application's front end with the back end. Additionally, we enhanced our skills in critical thinking, helping us decide which datasets to gather and how to use them effectively to benefit the user.

Moreover, we honed our problem-solving skills to explore methods that can have a substantial impact on the user.

Lastly, we enhanced our communication skills by presenting the key aspects of our solution concisely and providing clear responses to the judges' questions.

What's next for Caffeine Intake Recommender

As we continue to develop our app, our aim is to make it more tailored to our users' needs. To provide even more personalized recommendations, we will also add questionnaire features for individual factors such as age, medications, pregnancy, menstrual cycles, and caffeine preferences. Our algorithms will monitor real-time data on users' responses to caffeine consumption and refine the predictions accordingly.

Moreover, we are working on integrating our app with other health and fitness apps and devices to create a more comprehensive view of users' health and fitness data. With this approach, users can get a more holistic understanding of their health and fitness. Specifically, we plan to add caffeine intake tracking to AI assistants such as Apple’s Siri and Amazon’s Alexa, with simple commands like "Alexa, log a cup of espresso."

These advancements will enable users to keep track of their caffeine intake more effectively and help them make better decisions for their overall health and wellness.

Built With

Share this project:

Updates