Back to Parent

Outcome


Problem

The target audience of this IoT appliance is my husband. As we talked about the problems he had when staying at home, he mentioned he had three pain points for sleep:

  • It’s hard to get up in the morning (especially in winter like this…).
  • He wants to know if he has slept for enough/too long/too short time.
  • Alarms on the phone can’t wake him up. Sometimes he just snoozes or turns off the alarms unconsciously, and then get up late.

Goal

A smart pillow that can record how much time you have slept and wake you up at the time you set.

Process

Step1: Define basic logic



Step2: Get familiar with the FSR sensor



Step3: Record sleep start and end status

Detect sleep start and end status, and publish the events to the Particle Cloud.



Step4: Sleep data persistence

Since the data on Particle console is temporary, I decided to transfer sleep data from Particle to Google Cloud to make it long-term. I referred to tutorials in Particle docs (https://docs.particle.io/tutorials/integrations/google-cloud-platform/) and here are my main steps:

  1. Add Google Cloud Platform integration on Particle console.
  2. Transfer data from Particle to Google Cloud Pub/Sub.
  3. Store data from Pub/Sub in Google Cloud Datastore.



Step5: Use IFTTT to tell the pillow when to buzz

  1. Create a new applet on IFTTT with two services: Data&Time and Particle.
  2. Wire the buzzer to the circuit.
  3. Define and register a function called "alarm" to Particle Cloud so that IFTTT can call it directly.



Step6: Play the music!

I referred to a tutorial on Arduino (https://www.arduino.cc/en/Tutorial/ToneMelody) to learn how to code music for the buzzer.


Outcome


List of Parts:

  • 1 Breadboard
  • 1 Particle Argon
  • 1 FSR Sensor
  • 1 Buzzer
  • 1 LED Light
  • 2 Resistors
  • 1 USB Micro B Cable
  • 8 Jumper Wires
Show Advanced Options
Show Advanced Options

Next Steps
  • All the sleep data currently are stored in Google Cloud, and the next step would be data visualization and to make the data more accessible to the user on a day to day basis.
  • One feedback I got from my husband is that the "music" of the buzzer is a bit annoying, so in the next iteration, I may replace the buzzer with vibrators so that the waking up experience can be more "friendly".
  • Waking up is hard, so is falling asleep! Inspired by Headspace, I am considering integrating medication guide for sleep to the smart pillow to help relax the body and mind and increase the sleep quality.


Reflection

For the current prototype, I roughly count all the time a user spends on the pillow as sleep time, which might not be very accurate. I did some research on how to detect if a person is asleep or awake. A common method used by sleep monitor apps like Sleep Cycle is using the accelerometer inside the phone (the part that knows when you turn it sideways) to detect the movements as you sleep. To make the Smart Pillow smarter, I still need to do more experiments with different sensors to find out the best and most accurate way to collect information.

Drop files here or click to select

You can upload files of up to 20MB using this form.