A unique and effective alarm clock built on the Arduino platform.
Designed to guarantee the user is alert and awake, TERALARM is no ordinary alarm clock. Paired with a loud buzzer and on screen instructions providing a sequence of buttons which need to be pushed in order to disable the alarm, all risk of sleeping in is effectively eliminated. The user friendly design features only four buttons, each of which serves many functions depending on the current mode. The time is always accurate, even when switched off thanks to the hardware real time clock which also provides a precise temperature reading, visible from the clockface. Using a light intensity sensor, the system will automatically adjust the LCD's brightness to ensure the screen is always visible during the day while maintaining a comfortable light level at night.
A 24 hour clock (including seconds), a full worded date string, the time the alarm is set for and the temperature are available at a glance on the clockface.
The time, date and alarm settings can be selected at the push of a few buttons and individual components such as hours, minutes, days, etc. can be incremented and decremented until the user is happy with their choice using the well designed on screen interface.
The brightness of the LCD can be finely set by the user using the up and down buttons or automatic brightness can be enabled which uses the built in light intensity sensor to automatically to adapt to the environment.
Every sensor and internal value is made available to the user via debug mode. The exact readings from the temperature and light sensors, as well as uptime and data from the RTC and EEPROM are shown on the LCD in a easy to read form.
Even when the power is lost to the system, your time and alarm settings will remain saved using the microcontroller's EEPROM and the battery powered real time clock (RTC).
Where most alarm clocks can be disabled using a single button press, TERALARM promotes a much more involved procedure. This is its defining feature, avoiding muscle memory and requiring the user to be awake (preventing oversleeping). The system generates random numbers between 1 and 4 and instructs the user to press the corresponding button. Each correct press adds a point to the users score and each incorrect deducts a point. Once the score reaches the challenge value set by the user, the alarm is disabled. The challenge can also be set to 'None' where the system functions as a regular alarm clock, with any button disabling the alarm.
During alarm setup, users can optionally set a snooze period of their choosing which can be configured with minute and second precision, up to a maximum of an hour. When enabled, the alarm will snooze for the specified time after being disabled initially, while counting down and displaying an on-screen progress bar. Once the snooze period has elapsed, the buzzer will sound briefly every 5 seconds until the snooze alert is dismissed by pushing a button.
Equipped with a buzzer and a pair of red/blue LEDs, user feedback is provided via sound and light. A different colour will flash and a different sound will play when the user confirms or cancels a setting. Both LEDs and the buzzer are also used when the alarm triggers.
A 100 second countdown timer is included as an additional feature which can be accessed by holding down all buttons during startup. Makes use of a red flashing LED and buzzer sounds played at an increasing rate.
Algorithms such as a button press handler/debouncer and the reciprocal brightness function have been written from scratch to use the hardware to its full potential.
- With the clockface showing, press button 1 to enter time setup.
- The time/date setup screens progress as shown:
[TIME] -> [DATE] -> [WEEKDAY]
- Use the up (button 3) and down (button 4) buttons to increment or decrement the current value (hour).
- The currently editing value wraps, so increasing the hour past 23 gives 00 and vice versa.
- Press confirm (button 1) to move across and edit the value to the right (minute).
- Use the up and down buttons again to alter the value.
- Press confirm once again to save the time and edit the date.
- Use the same buttons as above for altering the date.
- Press confirm to save the date and edit the weekday.
- Use the same buttons as above for altering the weekday.
- Press confirm to save the weekday and return to the clockface.
- Press cancel (button 2) at any point during setup to discard the shown values and return to the clockface.
- With the clockface showing, press button 2 to enter alarm setup.
- The alarm setup screens progress as shown:
[ALARM TIME] -> [CHALLENGE] -> [SNOOZE TIME] -> [STATE]
- Use the up (button 3) and down (button 4) buttons to increment or decrement the current value (hour).
- The currently editing value wraps, so increasing the hour past 23 gives 00 and vice versa.
- Press confirm (button 1) to move across and edit the value to the right (minute).
- Use the up and down buttons again to alter the value.
- Press confirm once again to save the alarm time and edit the challenge.
- Use the same buttons as above for altering the challenge.
- Press confirm to save the challenge and edit the snooze time.
- Use the same buttons as above for altering the snooze time. To disable snoozing, set a value of 00:00 and observe that this is displayed as NONE.
- Press confirm to save the snooze time and edit the state.
- Use the same buttons as above for altering the state.
- Press confirm to save the state and return to the clockface.
- Press cancel (button 2) at any point during setup to discard the shown values and return to the clockface.
- The brightness wraps, so increasing from automatic turns off the backlight where decreasing from off sets to automatic. Refer to the diagram:
[OFF] -> 6% -> 12% -> ... -> 94% -> [MAX] -> [AUTO]
- With the clockface or brightness UI showing, press the up (button 3) button to increase the brightness and temporarily show the brightness UI.
- With the clockface or brightness UI showing, press the down (button 4) button to decrease the brightness and temporarily show the brightness UI.
- Provided the alarm state is set to on, when then time reaches the chosen alarm time, the alarm will sound.
- When the challenge is set to none, press any button to disable the alarm and return to the clockface or begin snoozing.
- When a challenge is set, press the button which corresponds with the instruction shown on the LCD.
- Pressing the correct button will increase your score, where pressing the incorrect button will decrease it.
- When the score meets the set challenge value, the alarm is disabled and if snooze is configured, the countdown for the set time begins. Otherwise, snoozing is skipped and the clockface is returned to.
- Snoozing can be skipped during the countdown by pressing all four buttons simultaneously to return to the clockface immediately.
- Once the configured snooze time has elapsed, the audible and visual alert will be given until dismissed.
- Press any of the four buttons to dismiss the alert and return to the clockface.
- Alter the brightness by pressing either the up (button 3) or down (button 4) buttons while the clockface or brightness UI is showing.
- While the brightness UI is showing, hold down buttons 1 and 2 until the debug mode is displayed.
- While the system is starting up, hold down any of the buttons until both LEDs flash. The startup sound will not play.
- While the system is starting up, hold down all four buttons before the title is fully shown on the LCD.
- Continue holding until the system prompts you to press any button to start the countdown.
- LiquidCrystal I2C - Library to interface with the LCD
- DS3231 - Library to interface with the Real Time Clock (RTC)