Home > Projects > Sleep Tracking using an Arduino

Sleep Tracking using an Arduino

Summary of Sleep Tracking using an Arduino


Summary: The project measured personal sleep-cycle timing and nighttime movement using three accelerometer tilt sensors placed on the forehead, forearm, and upper leg, logged by an Arduino. The goal was to identify natural movement patterns and estimate individualized sleep-cycle length to improve wakefulness by timing awakenings at cycle transitions.

Parts used in the Biorhythm-Based Awakening Timing Modulation:

  • Arduino
  • Three accelerometers (used as tilt sensors)
  • Mounting materials for sensors (to attach sensors to forehead, forearm, and upper leg)
  • Data logging/storage solution (for recording sensor output)
  • Wires and connectors
  • Power source for Arduino and sensors

Background and motivation

Two factors inspired this project: my struggle to wake up in the morning and my enjoyment of collecting and graphing data from daily tasks.

Sleep Tracking with Arduino

My main problem with waking up in the morning is that feeling of grogginess along with an intense desire to sleep more. However, I’ve noticed that sleeping without an alarm clock, and just waking up whenever I wake up, helps. And I’ve also noticed that sometimes when I wake up I am dramatically more refreshed than usual. Reading about sleep on the web led me to learn more about sleep cycles. One interesting page (“The power of the Sleep Cycle”) claimed that it wasn’t the amount of sleep one gets, but the part of the sleep cycle we wake up in. The author suggested that, because we sleep in cycles about 90 minutes long, we should aim to wake up in the transition between sleep cycles, since the brain is more alert and refreshed at that time. He quotes from the Center for Applied Cognitive Studies:

Research indicates that the duration of sleep does not determine how rejuvenated we feel when we wake up. The crucial element is the quantity of entire sleep cycles we experience. If a person sleeps for four cycles (6 hours), they will feel more refreshed compared to someone who sleeps for 8 to 10 hours but does not finish any cycle due to being woken up prematurely.

I’ve recently discovered another paper that explains a “wearable interface for controlling wake-up time” using this theory.

Biorhythm-Based Awakening Timing Modulation

Goal

The length of the sleep cycle varies for each person, and averages about 90 minutes. I wanted to try to measure the length of mine, without having to wake up and check a clock. I also wanted to get an idea of how much I naturally move around during the night, and what patterns I might find therein.

Sleep Tracking with Arduino diagram

Procedure

In order to examine this, I equipped myself with sensors that would assist me in assessing how my posture shifts throughout the duration of a night’s rest. I utilized three accelerometers as tilt sensors, positioned on three distinct locations on my body: my forehead, my forearm, and my upper leg.

Primary Elements in Project
Arduino

For more detail: Sleep Tracking using an Arduino

Quick Solutions to Questions related to Biorhythm-Based Awakening Timing Modulation:

  • What was the goal of the project?
    The goal was to measure the length of the author's sleep cycle and track natural nighttime movement to find patterns and better time awakenings.
  • How many accelerometers were used?
    Three accelerometers were used as tilt sensors.
  • Where were the sensors placed on the body?
    Sensors were positioned on the forehead, forearm, and upper leg.
  • What microcontroller was used to collect data?
    An Arduino was used to assist in assessing posture shifts and logging data.
  • What motivated the author to try this approach?
    The author was motivated by difficulty waking up, observations that waking without an alarm sometimes felt better, and reading that waking at sleep cycle transitions can improve refreshment.
  • What hypothesis about sleep cycles does the project rely on?
    The hypothesis is that sleep cycles average about 90 minutes and waking during transitions between cycles yields greater alertness than waking mid-cycle.
  • What additional information did the author seek from the data?
    The author wanted to estimate personal sleep cycle length without waking to check a clock and to quantify how much they move during the night.
  • Did the project reference prior work or papers?
    Yes, the author referenced an article about the power of the Sleep Cycle and a paper on a wearable interface for controlling wake-up time.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top