[Guest Blog] Can Technology Help Us Get Back to Sleep?

Published 06-04-2020 12:41 PM 977 Views

This article was written by Microsoft employee Jeff Van Nortwick as part of the Humans of IT Guest Blogger series. Read on to learn how Jeff uses hardware and software to try and determine the root cause of his daughter's sleep walking episodes. 


My daughter, Katie, suffers from a combination of Epilepsy and something you might call sleep walking.  This sleep walking behavior happens every night - about twelve or more times per night; at seemingly random intervals. When combined, the two conditions pose a very real and severe threat to her safety because at any moment, while sleep walking, she might suffer a seizure, fall and hurt herself. The problem with this behavior is that she often experiences seizures while sleep walking and ends up stumbling around her room, or falling to the floor, only to get back up and continue the cycle.  Our family has sought out help from numerous medical professionals, followed their advice, participated in sleep studies, etc., but none of that has improved the situation.  Therefore, I am now trying to determine the triggers for this behavior, in order to see if I can improve the situation myself.

One of the first things I did in order to try and understand the root cause of the problem was to install a security camera in her room.  Here, I use a combination of a PC and Blue Iris Software to monitor and record her sleeping.  This video has proven to be the most reliable way to determine what is going on at night.  However, it's very challenging to watch over eight hours of video - even at 128 times speed - every day.  I have therefore tried and had some success in using Microsoft's Video Indexer Service to highlight relevant portions of the video.   My main challenge here is upload speed from my home to the cloud.



The next device I tried to use in order to help the situation was a simple Fitbit Alta HR.  I thought that we might learn something by looking at her resting heart rate throughout the night.  So far, the data has not helped me predict when an episode might occur, but it does help me understand where in my video feed I should look for episodes.  The following is a crude screen capture I stitched together to show how heart rate spikes correspond to nightly episodes.


Now, more recently, I'm trying to determine if environmental conditions are somehow influencing this behavior.  To do this, I use a Microsoft Azure IoT Starter Kit w/ Adafruit Feather HUZZAH to record temperature and humidity data in Katie's room.  This data is transferred to an instance of Azure IoT Hub.  Then, the data is made available for analysis with Azure Time Series Insights.  This allows me to see if there is any correlation between an episode and her room's temperature or humidity.  I also have a few other temperature and humidity sensors deployed inside and outside our house, so I can add their data into the mix too.  The following image is an example of how this data looks.  Time Series Insights allows me to add markers to the visualization (the vertical bars) that correspond to her episodes.  These make it easier to see what is happening.


So far, I haven't found a root cause for this situation.  However, I am hopeful that technology will someday help us get back to regular sleep. If anyone has good suggestions on how to leverage tech to minimize sleep walking, please share your ideas in the comments section below!




Valued Contributor

I know you talked with expert doctors and you have more knowledge than me on this issue. 

But I may share some tips and you could try them out.

One method is using motion sensors, there are normally being used for robbery , but you may place them in locations where no one moves around after sleep and set timer like at this hour she would be sleeping and sensor should be on and once it detects movement, then trigger alert and let you know, so you could see the exact time.

You may monitor heartbeat through a day and compare it with lifestyle like when it is like higher rate, you might see there is something causing stress and investigate it. I believe you need to collect health related data through few weeks and check them with her lifestyle and consult with doctors.


@Reza_Ameri-Archived Thanks!  That's a great suggestion - and I already have a PIR sensor in my IOT kit.  I'll give it a shot.

Valued Contributor

@jeffvan1018 Welcome, I believe you will need to also collect as much as data related to heartbeat or even the pattern for movement, may be you could find some clue.

For me, when I ran into a problem where I am not sure what to do, I just collect data and observe and magically I find out something which I never though about it before.

Version history
Last update:
‎Jun 29 2020 10:23 AM
Updated by: