When I set out to create a simple but effective alarm system that would wake a user up at an optimal point during their sleep cycle using natural light, I never imagined the project would grow to be quite so complex. Astonishingly, some of the features I imagined would be most difficult turned out to be simple, and working with some things that were simple turned out to be more convoluted. First I had one Arduino, then I had two. First I had one segment display, then I was forced to purchase another model because my Arduino did not have enough pins to run the first. First I had six buttons, now I have only three. First I had an idea put this project on a glove to track pulse via the finger, then I decided to try a sleep mask with LEDs, then I realized it would get too complicated and rethought the concept all over again. This project has evolved over many stages, yet here I am with almost exactly what I set out to do in the beginning.
The Easy-Wake Alarm System as it stands today consists of a fully working alarm clock and a not-yet finalized REM-detecting headband. As we can see in the picture above, the alarm clock is held within this little electric-tape-black box. The seven-segment display on the surface displays the time, and with the push of the big red button, shows you your alarm time. An apostrophe appears between the minute digits to denote “PM”, and it is off during “AM”. The square button also lets you adjust the alarm: when you hold it down, you are able to change the alarm using the hour button on the left and the minute button on the right. You can find the exact source code for my alarm clock at the bottom of the page.
Once you've set the alarm for the time of your choosing, you put on the REM-detecting headband. Ideally, this headband will know when you are in REM sleep via the ear-clip pictured above that reads your pulse and monitors HRV; as of yet, this portion of the project is not complete. If REM is detected, the transmitter (the green square) sends a simple message to the receiver on the alarm clock (obscured, but within the black box): 100 times in rapid succession, it sends the “#” character. I am not releasing final source code for this part of the project yet because it is incomplete.
When the receiver picks up on even one of these “#” messages, it knows it’s a good time to wake up. It then decides, based on the time you set your alarm, whether it’s appropriate to turn on. If the time is within an hour of when your alarm is set to, it turns on, and stays off otherwise. If it’s the time you set your alarm to and no REM has been detected within the hour, it turns on anyway at the exact time you set it to.
The actual lights are small, but put in a dark room, these LEDs are extremely powerful. The one in the center is different from the other 8, and delivers a very high-power light on its own. However, to avoid jolting you awake, these all turn on very slowly, in a way that mimics the sun rising. As I've said before, I use blue light because it is what we have evolved to be most responsive to, and it contributes to the general feeling of restfulness (to find specifics, see this). Once the light has reached its full brightness, it begins blinking as a last-resort to wake you up. When you’re up, you can either wait for the lights to turn off on their own (they do so within 15 minutes of the alarm turning on), or do so manually by hitting the red square button, which now functions as a snooze button (full disclosure: it's not magic).
Overall, I am happy with what I have accomplished so far with the project. I am but a bit of code-tinkering away from having the REM-detector finalized. As the project has progressed, I have thought of ways I can improve the project. For one, I believe integrating other projects would be useful. For example, the LIFX light bulb could provide a light source (instead of the small LEDs) that would ensure the user wakes up more effectively. In addition, something like Rest Devices Sleep Shirt could provide more detailed information about sleep. I believe the most difficult aspect has been having to purchase all the parts, having to wait for them to arrive, and then having to see if they are actually both functional and what I needed. As the semester draws to a close, my per-day time devoted to this project will decrease, but I will continue to work to improve the project nevertheless. I look forward to the day I can wake up to nice blue light feeling as refreshed upon awakening at 7:00AM as I would at 9:00AM. Here's to hoping that day comes sooner rather than later.