• Improved the movement detection algorithm

    Bhavesh Kakwani10/25/2021 at 22:20 0 comments

    Took things into my own hands and implemented movement detection from scratch using raw accelerometer data. Algorithm is based on calculating absolute "jerk" (derivative of acceleration) and recording it if it goes over a dead-band/threshold. Tried it on myself last night and results are much better! Can actually see patterns of tossing/turning vs still sleep in the graphs.

    Image

  • (Sped-up 10x) demo of the LED "sunrise" animation

    Bhavesh Kakwani10/25/2021 at 22:18 0 comments
  • Tried the v1 prototype on myself overnight

    Bhavesh Kakwani10/25/2021 at 22:17 0 comments

    Sliced open a generic (but quite nice!) sleep mask I got on Amazon and put the microcontrollers and batteries in. I wore it through the night! I should've created a little boundary between the 2 microcontrollers because the whole time I was afraid they would touch each other and cause a short circuit somehow. Anyway, it worked out just fine and my "simulated sunshine" morning light-alarm was amazing.

    As for the movement data, it was honestly not great and I need to iterate on the movement detection algorithm more to improve it.

    Image

  • Coded movement-detection and sunrise LED sequence

    Bhavesh Kakwani10/25/2021 at 22:15 0 comments

    Wrote the code and iterated fast on it. Circuit Python is amazing for this! I've been coding on a bench in a high street shopping zone and honestly in just 2-3 hours was able to bang out these features. Next step is to plug in batteries and test out the shake detection on the first sleeping subject: me!

  • Ordered parts for prototype!

    Bhavesh Kakwani10/25/2021 at 22:14 0 comments

    Ordered the microcontrollers, lipo batteries and two types of sleep masks. Can't wait to get started on them this weekend!

    Also did my first "hack" - kept trying common discount codes at checkout until one worked! In case you're wondering, it was "10OFF". Not bad!

  • Habits & life-hacks that are popular in the sleep community

    Bhavesh Kakwani10/25/2021 at 22:14 0 comments

    I reached out to people in sleep communities on facebook and reddit, and asked a couple of open-ended questions: What technologies/methods do you use to help you sleep at night? What do you wish was better?

    The responses were varied and amazing! I'm copying them below for your viewing pleasure, followed by my analysis at the bottom:

    • Headspace has changed my life so much. I have had anxiety disorder my entire life. I couldn’t sit through a movie. Had to be moving. Headspace has changed that. I can now fall asleep.

    • I keep a calming aroma-pillow spray.

    • Plants have completely changed my home. It feels relaxing, productive, and reminds me to both meditate, exercise and keep a good sleep schedule. So I would recommend plants in the home and the bedroom. I also recommend a strict sleep schedule.

    • An eyemask for sure! I need it pure dark to sleep so that helps so much. I also have a lamp that I set to fade over 30-45 minutes so that I don't stay up super late reading. It's also a wakeup light (starts getting brighter over 30 minutes), which is nice and makes bird sounds which is peaceful to wake to. And I use a bluetooth headband to listen to the [Sleep With Me] podcast.

    • I use this eye mask / headphone combo and I love it!

    • I wish I could make a play list of [Sleep With Me podcast] episodes I like and listen to it on my Alexa.

    • I started listening to the [Sleep With Me] podcast to get away from falling asleep to TV. I like to play this game (two dots) as I'm winding down and starting the podcast. i know screens aren't great before bed but it calms my mind down and keeps me from scrolling on social media!

    • I play a good old bubble popping game.

    • I wish that there were sleep phones with softer speakers.

    • Lavender linen spray. Dark room. Cold room. Meditative breathing.

    • Three pairs generic wired sleep phones went to the big farm. Also, I did not like the sound on the bluetooth. I bought these MMUSS replacement wired phones to put in my head bands.

    • I fall asleep instantly to these Headspace sleepcasts. (They are more visual than the [Sleep With Me] podcast.) Then later I put on an all night Sleep With Me episode.

    • Fan and a white noise machine in addition to a few hours of Scoots [/Sleep With Me podcast].

    • Tried a huge array of [sleep] masks including smart ones and fabric ones with specific eye cushions for $30+. Honestly, what has worked for me the best is a simple molded eye cup mask with nothing fancy. The molded eyecups are so that no fabric is touching your eyes/eyelashes as you're trying to fall asleep. It is the most basic one($4.99) and it has been the most effective. I have one by my bed, in the car(as a passenger), and in my travel kit when I'm on planes and at the airport.

    Very interesting responses! Let's break them down into some categories.

    Problems people deal with:

    1. Anxiety and/or inability to calm the mind.
    2. Inability to stick to regular sleep schedule.
    3. Bedroom not dark enough.
    4. The draw of social media scrolling at night.
    5. Jetlag.

    Solutions & hacks people employ:

    1. Audio:
    • Podcasts & "sleepcasts" (Sleep With Me or Headspace).
    • Sleep mask with Bluetooth/wired "soft" headphones.
    • White noise.

    2. Light:

    • Timer/smart lamps that fade out at night and up in the morning.
    • Well fitted sleep mask / dark room.

    3. Smell:

    • Pillow / linen spray (lavender, etc).

    4. Activity:

    • Meditation.
    • Calming smartphone games (bubble popping, etc).
    • Breathing exercises.

    I think there is definitely a market here. In any case, I could certainly personally use a solution that helps keep me keep a strong sleep schedule and feel refreshed everyday, given my busy life!

    Another interesting thing I noticed is that almost all the respondents were middle-aged women! Perhaps this is a sampling bias because most of them were from facebook, but I'll keep a lookout to see if this pattern continues in my future research.

  • Initial design for Morpheus prototype

    Bhavesh Kakwani10/25/2021 at 22:12 0 comments

    Selected a microcontroller platform for my prototyping. My criteria were:

    • Rapid iteration
    • Connects to smartphone
    • Rechargeable battery
    • Accelerometer and LEDs built-in

    Given all that, I've chosen the CircuitPlayground Bluefruit. It supports Circuitpython which is perfect for rapid iteration (no need to compile every time), and Bluetooth so I can control it from my phone right off the bat. Also supports using a LiPo although doesn't have a built-in charger - no biggie, I have a couple of external LiPo chargers lying around.

    Initial purchase is gonna be in the ballpark of ~$90 CAD which is pretty good for janking things together with no optimization! The sleep mask is ~$10, two Bluefruits for ~$65, and a couple of LiPos for ~$7 each.