We wake you at the optimal time!

Our propietary technology determines the best time to wake you based on your REM Cycle

Four Engineers with a Vision

Kerolos Mikaeil

B.S. Electrical and Computer Engineering and Engineering and Public Policy Carnegie Mellon University

Carnegie Mellon University

Eric Hu

B.S. Electrical and Computer Engineering

Carnegie Mellon University

Doowon

B.S. Electrical and Computer Engineering

Carnegie Mellon University

Patrick G

B.S. Electrical and Computer Engineering

Carnegie Mellon University

Project Details

Concepts

Our aim is to create a sleep mask that wakes its user up at just the right time by lighting up the embedded LEDs inside the mask when its measured that a REM cycle has come to an end. The mask will link with a web application so that the user can customize settings such as a time range when he/she wants to be waken up. The mask will then detect when a cycle has ended during that time, then slowly wake the user up by brightening its LEDs that are embedded in front of the user’s eyes. REM cycles differ from person to person, so machine learning will be used to measure a user’s cycles to learn each user’s behavior over time.
We were able to complete the project on time and additional features. One such feature would be sleep statistics. It would allow the user to collect data such as how long he/she sleeps in specific sleep cycles per day, what her average bedtime and wakeup time looks like. It would then compile these data points into an easy-to-read graph.

Competitve

Project Title: “Detection of REM sleep by heart rate”
Project Link: http://www.psycho.hes.kyushu-u.ac.jp/~lab_miura/Kansei/Workshop/proceedings/P-205.pdf
Project Descriptions: A system designed for an experiment which one, tested to see how accurate heart rate is for detecting REM sleep and two, woke up subjects after a REM sleep cycle. While it doesn’t go into much detail about the system, it is very similar to our project in that it uses heart rate to wake up a subject after a REM sleep cycle in order to make him/her feel more rested.

Project Title: Sense
Project Link: http://www.theverge.com/2014/7/23/5927613/sense-sleep-tracker-is-a-glowing-sphere-that-watches-over-you-while-you-sleep
Project Descriptions: Sense is a sleep tracker much like a fitness device which records many different conditions in the room and your movements/noises as you sleep. It can be used to tell you if you were sleeping well, or what disturbed you in your sleep. While it’s not exactly similar to our project, it is a sleep-aiding sensory device which can be used for a variety of different data and statistics.

Project Title: Aurora
Project Link: https://www.kickstarter.com/projects/iwinks/the-aurora-dream-enhancing-headband
Project Descriptions: A sleeping mask “dreamband” which has a smartphone app linked to it designed to make lucid dreaming possible. The band measures brainwaves from the user and links to the user’s phone via bluetooth low energy. The user can set moods on their app to set the mood of their lucid dream.

Project Title: REMzen
Project Link: https://www.crowdsupply.com/remzen/intelligent-sleep-mask
Project Descriptions: This sleep mask is very similar to our idea, in that it uses sleep cycles to wake its user up at the “right” time to reduce grogginess. However, it is much more expensive than our proposed product, and does not allow the user to graph their sleeping habits.

Motivation

According to the Center for Disease Control and Prevention, “more than a third of American adults are not getting enough sleep on a regular basis” 1. The study further documents that many of the changes that can be made to improve our sleep is through lifestyle changes. Our goal is to improve the quality of sleep through a mask that would help its users fall asleep faster, and wake them up at just the right time to leave them feeling refreshed rather than tired. This sleep mask depends on two facts that were confirmed by research. The first fact is that people sleep in REM cycles that last around an hour and a half each.2 These cycles can be measured by movement, heart rate, electrical activity in the brain, or by eye twitching. When people wake up after a full cycle has ended, they wake up easily and feel refreshed, whereas the opposite would be true if they were waken up during a cycle. The second fact is that people wake up better with an external light stimulus rather than a sound stimulus.3 These facts are a driving motivation for our project.
1https://www.cdc.gov/media/releases/2016/p0215-enough-sleep.html
2 http://healthysleep.med.harvard.edu/healthy/science/what/sleep-patterns-rem-nrem
3http://www.businessinsider.com/i-tried-the-famous-wake-up-light-for-a-week-2015-8

Technical Specification

Explicit requirements for the project

Product shall measure heart beat eliminating noise
Technical Measures
Signal shall be sampled at least 6 time per minute
Signal shall be filtered and compared to a fitbit/other heart rate monitor to ensure reasonable accuracy
Product shall analyze heartbeat to determine REM cycle with reasonable accuracy
Technical Measures
Signal shall be compared to typical REM cycles to ensure that they are reasonably similar +- some error
Product shall record/remember an alarm time for the user via an application
Technical Measures
Several alarms set and tested to see if actuators are driven at specified times
Product shall illuminate led lights at exit of REM cycle closest to set alarm time
Technical Measures
At specified time led light shall illuminate via visual inspection
Product shall not disrupt sleep cycle of user
Technical Measures
Several users will sleep with product on eyes and will evaluate comfort level via interview questions

Any implicit requirements that you derive
Product shall wake user up at alarm time
Technical Measures
Set alarm and see if alarm occurs
Product shall have battery life to sustain sleep cycle measurements
Technical Measures
Battery life must sustain a sleep cycle (24 hours of sleep)

Components

Our system leverages the following main components:

  • Bodily Moniter Peripherals - Oximeter
  • Microcontroller - TI CC2650 Sensortag
  • Waking Mechanism - LEDs
  • Battery - 3V Battery
  • Web Application - Amazon Web Services Web Application
  • Mobile Device - Any Android Device

  • Team Members

    Kerolos Mikaeil (kmikaeil)
    Eric Hu (ezh)
    Doo Won Kang (doowonk)
    Patrick Glinsman (pcg)

    Architecture

    Our system architecture is depicted below:
    The sleep mask will contain a peripheral sensor - mainly a oximeter which will communicate via serial communciaiton/blueooth communication with our TI CC2650.The TI CC2650 will control the alarm LED illumination. In addition a mobile device will be connected to the TI CC2650 to recieve/transmit infromation to and form the TI CC2650 to our web application. The web application will run the machine learning computation to output visualiziation of the sleep cycle as well as determing the proper wake time for the user.

    Use Cases

    Our product offers three many use cases:

    1. Proper Wakeup - User can select an alarm time and window and be awoken at the optimal time in the specified window based on their personal REM cycle.
    2. Real-Time Sleep Analysis - User can login into our web application and view their specific data in an easy to read web application
    3. Helping You Sleep Better In the Future - Users can learn the best time they should be sleeping to awake at the best REM cycle.

    Interaction Diagram

    Our system leverages five main systems: Bodily Monitor Peripherals (Oxiometer), Computation (TI CC2650), Waking Mechanism (LEDs), Device Communication Relay (Bluetooth Module), and Application (AWS Web Application). Below is a system level view of the communication interaction between each component.
    Below is a system level view of the data flow interaction between each component.
    Bodily Monitor Peripherals
    There will be a range of sensors that will detect bodily activity. Each peripheral gives sensor data to Communications to transfer.

    Computation Below is a diagram detailing the data flow within the machine learning model.
    User Preferences: All data related to the user including but not limited to username,password,alarm preferences
    Heartbeat Sensor Data: All data from heartbeat sensor is streamed into this DB
    Reference DB: Data set necessary to train machine learning model to detect the REM Cycle phase
    Machine Learning Platform: Continues ML model - web service platform
    Output: Time to wake user sent back to device via Bluetooth
    Computation Summary: The computation component is responsible for processing the real time sensor input and determining the proper time to wake the user based on the machine learning model developed. In short, this section is the “brains” to our solution.

    Waking Mechanism
    There are no sensors involved with the waking mechanism, as it’ll receive input from the web application via bluetooth communication. As of now, there will be one output: a strip of LED embedded in the mask. The brightness and color of the LED will be determined by the input.

    Device Communication Relay
    This module relays information from sensors to the Computation and from Application to the Waking Mechanism. It should support many communication vectors. Communication flows do not overlap. Control is done by a microcontroller.

    Application
    The data will be transferred to the application which utilizes machine learning on the heart rate waveform in order to determine the sleep cycle. In general, sleeping reduces heart rate, but during a REM cycle, heart rate varies more and overall increases. Through machine learning and data analysis, the application will determine which sleep cycle the user is in. The application will also allow the user to select designated “wake up” hours in which the the application sends a signal to the waking mechanism to activate after a REM sleep cycle.