Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Persistent alarm clock

From Texas Instruments Wiki
Jump to: navigation, search

Have you ever turned off your alarm, telling yourself that you would wake up a few minutes later, only to wake up an hour later? Have you ever missed a meeting because you turned off your alarm and continued to sleep? With the Persistent Alarm Clock you never will again. The Persistent Alarm clock records movement data from a TI Chronos EZ430 Watch to ensure that you actually get up when you wake up. The software works with any Android device, making it not only effective at waking you up, but also simple to use.


  • David Mace ([1])
  • John-Nicholas Furst
  • Ayse Coskun

Persistent Alarm Clock

The Persistent Alarm Clock sets out to solve the problem of continuing to sleep after turning off your alarm. The software is packaged into a simple application that can be run from any Android device. The application features an easy to use graphic interface, which allows you to easily set an alarm. Also the software comes with thorough installation instructions that can help you use the application with no issues.

The graphical user interface allows you to easily change between two modes: clock and alarm. You can also easily adjust the time of the alarm and regular clock just by toggling a button. Users can also turn on the alarm with just a single touch. The application can also run in the background on a device so that you can run other applications on your Android device while your alarm is set. It couldn't possibly be simpler to operate the alarm clock; it is designed for ease of use.

All that you need to do to use the alarm is put on the TI Chronos EZ430 Watch before you go to sleep and set your alarm. Then you can sleep sound, without any worries that you will turn off your alarm in the morning and sleep through a meeting, a class, or any important event. In the morning when you wake up, all you need to do is press the off button on the interface and the alarm will stop. If you stay up and begin getting ready, the alarm will stay off and you can happily go about your morning routine. However, if you happen to turn off the alarm and rest your eyes, only to doze off, the alarm will sense the lack of movement and go off until you wake up.

How the alarm works

The alarm uses a simple threshold-based method to determine the difference sleeping movement and walking about movement. Obviously everybody moves slightly while they sleep; however, these movements are mostly short and slow. Most people don't shake about abruptly as they rest. By averaging movement over a long period of time(around 20 seconds), the software can detect the difference between the slight movements of a sleeper versus the more consistent and abrupt movements of someone who is up and about.

To communicate movement wirelessly between the watch and the Android device, a serialport is set up. The USB that comes with the watch must be connected to the device for data to be transmitted through the port. Converters are available for most devices to communicate with USB devices, so this is not too large of a problem. Additionally the Android device must be rooted to gain read/write access to the USB. Once all of this is done, the software is ready to send and receive data from the watch.

Setup Instructions

Initial Setup

  1. First you will need a TI Chronos EZ430 Watch.
  1. You must also purchase a USB converter so that your Android device can communicate with the watch.
  1. To read from and write to the USB you must also root your device if you have not done so already.
  1. Now download the FREE Persistent Alarm Clock software on your Android device from here:
  1. Congratulations, you have now completed the setup. Continue on to learn how to use your new favorite alarm clock.

Per Usage Setup

  1. First take the watch's accompanying USB with the square base and attach this to the adapter that you purchased in the initial setup.
  1. Next connect the adapter to the Android device.
  1. Go to the terminal emulator and type the lines "su", "cd dev", "chmod 777 ttyACM0". Note: the last line may differ depending on what Android device you are using.
  1. Now open back up the Persistent Alarm Clock application and you are ready to go.

Usage Instructions

The application features a simple interface with 4 panes across the top reading from left to right the current hour, minute, second, and am/pm. When the clock starts up, both the regular time and the alarm time should sync the the time set on the Android device.

There are three buttons towards the bottom of the screen, which all can be toggled by clicking on them. The first button from the left controls which clock mode you are currently viewing: regular time or alarm time. The second button allows you to change the time of either clock. When the button reads "Set Time," you can change the current time by clicking on the clock panes. Clicking on the hour, minute, or second moves the time up one unit and clicking on the am/pm toggles the current selection. The button on the farthest right allows you to turn on your alarm. When the button is green, your alarm is set and ready to wake you up.

Now to allow the watch to transmit acceleration data, first press the “#” button on the watch until “Acc” appears on the screen. Then press the “down arrow” key on the watch. A wave graphic should now start flashing on the right of the screen. If this graphic is not flashing, the watch is not transmitting data. If the graphic does not continue to flash, you might need to replace the watch battery.

Important: This application, to our knowledge, can run in the background on an Android device without crashing and can sound an alarm while the Android device is asleep. However, it is still important that you test out the application on your specific Android device before using it to make sure that it does not crash while you are asleep and fail to wake you up. We have not tested the application extensively and make no guarantee that it will work on every Android device.

Source Code

You do not need to compile any source code to run the application; however, we have released a copy of the source code for anyone that is curious or wants to build off our idea. Additionally, if you find a bug in this code or a fix to any error, feel free to email us so that we can improve the application.

Click to download