Sleep plays an extremely important role in your physical health and it is essential that we maximize the amount of sleep we get. However, I found that often I would either sleep through my alarm, or wake up, shut it off then go back to sleep. Eventually I got sick and tired of all the rushed mornings, and that’s where Alarm Buddy comes in!

What it does

Alarm buddy helps users maximize the amount of sleep they get without jeopardizing punctuality. Alarm Buddy is an alarm clock that takes traffic (live and historical averages) as well as preparation time into account when waking you up in the morning. Once the alarm sounds in the morning, it cannot be shut off unless the alarm clock senses light (this forces people to turn on their lights and get out of bed). For a short period after shutting off the alarm, if no motion is detected, the alarm will go off again to ensure the user is awake.

Alarm buddy goes into "Night mode" every night which shuts off the backlight so the user cannot see the time (watching the clock makes it more difficult to sleep) and the light won’t brighten up the room. Alarm buddy uses a red LED to warn you if the alarm is going to go off in <20 minutes, so if you wake up and see no red light, go back to sleep! Alarm buddy can be controlled through an android application which you can use to get the current temperature in the room, set alarms, set the time and date, change the colour of the display, etc.

How I built it

The physical alarm clock is built with a Genuino 101, a Groove Starter Kit, a DHT22 temperature sensor and a PIR motion sensor. The alarm clock is programmed using C/C++. The app portion of Alarm Buddy was coded using Java and XML in Android Studio. To get the traffic reports/ how long it takes in traffic, Google Maps Distance Matrix API was used. To see code or to learn how to wire it, see below!

Challenges I ran into

One of the biggest challenges was controlling the alarm clock through the android app. Because this was my first android application and only my second time using an arduino, I found it difficult using BLE to send information (such as time, date, alarm time, alarm date, etc.) from the app to the arduino.

Accomplishments that I'm proud of

Being only my 2nd time using an Arduino and first time using Android Studio, I am extremely proud of everything that I was able to accomplish. I was able to learn a lot of new things and put them all together to create Alarm Buddy. I am proud of taking such a large task and breaking it up into smaller, more manageable tasks until finally Alarm Buddy was one complete, functioning unit. I am proud of all the hard work and research I put in to it and all of the new things that I was able to learn!

What I learned

Throughout the creation of Alarm Buddy I learned plenty of new things. I learned the basic concepts behind Android applications (Intents, Activities, etc.) as well as some more complex things such as Asynchronous Tasks and Job Scheduling. In addition to Android app development, I learned a lot about the Arduino as well as coding in C and C++. My familiarity with these two languages was pretty low since I've only used C once before. Most of the things required to complete alarm buddy I had never done before, so overall was an incredible learning experience and I got the opportunity to work with new languages, IDES, hardware and APIs.

What's next for Alarm Buddy

-Machine Learning could be extremely helpful. For example if you put it takes you 20 minutes to get ready but on average it takes you 30, the alarm clock could automatically adjust and start waking you up 10 minutes earlier. Or if you tend to stop for coffee on your drive to work, it could automatically add 5 minutes.

-Using the temperature to automatically adjust the thermostat to keep the temperature right where you want it at all times or perhaps to turn on a fan in your room.

-Starting the coffee machine when the alarm is triggered in the morning.

-Giving Alarm Buddy a voice (Alexa, Google Assistant, etc.)

Share this project: