Skip to content

Mahmud-Mahi/NoRTC-AlarmClock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🚀 No RTC Alarm Clock

A fully functional Arduino-based digital clock system built using embedded programming techniques.
This project implements real-time clock behavior using millis() instead of an RTC module, along with advanced features like alarm, snooze, and multi-mode user interaction.


✨ Features

⏱️ Timekeeping

  • 12-hour format with AM/PM support
  • Accurate timing using millis() (non-blocking)
  • Manual drift compensation system
  • No external RTC module required

⏰ Alarm System

  • Set custom alarm time (hours & minutes)
  • AM/PM-aware alarm triggering
  • Alarm rings with buzzer pattern
  • Auto-stop after 60 seconds

😴 Snooze Functionality

  • Short press → Snooze (5 minutes)
  • Long press → Stop alarm completely
  • Snooze auto-reactivates alarm after delay
  • Snooze cancel option

🎛️ User Interaction

  • Multiple buttons with:
    • Debouncing
    • Short press detection
    • Long press detection
  • Modes:
    • Clock run mode
    • Time setting mode
    • Alarm setting mode

🔢 Display System

  • 4-digit 7-segment multiplexed display
  • Efficient refresh (~2ms per cycle)
  • Leading zero suppression
  • Blinking digits during setting modes

🔔 Visual Feedback

  • Colon LED behavior:
    • Normal → 1 Hz blink ( 1 second blink per 2 seconds)
    • Alarm → fast blink
    • Snooze → slow blink
    • Setting mode → AM/PM indicator
  • Alarm enable/disable blink indication

⚡ Embedded Design Highlights

  • Fully non-blocking code (no delay())
  • Event-driven button handling
  • Clean modular functions
  • Efficient memory usage
  • Real-time system behavior

🛠️ Hardware Requirements

  • Arduino Uno / Nano
  • 4-digit 7-segment display (common cathode)
  • Transistors (for digit control)
  • Resistors (for segments & base)
  • Push buttons (x4)
  • Buzzer
  • Connecting wires & breadboard

🔌 Pin Configuration

Component Pin
Segments (A–G) 2, 3, 4, 5, 10, 11, 12
Digit Control 6, 7, 8, 9
Colon LED 13
Buzzer A3
Mode Button A0
Increment Button A1
Alarm Mode Button A2
Stop/Snooze Button A4

🧠 How It Works

  • Uses millis() for precise timing instead of delay()
  • Multiplexing displays digits rapidly for persistence of vision
  • Button input handled via custom debounce + event system
  • Alarm system compares real-time clock with set values
  • Snooze implemented using time offsets

⚠️ Limitations

  • Time accuracy depends on Arduino clock (may drift)
  • Manual drift compensation is approximate
  • No backup power (resets on restart)

🔮 Future Improvements

  • Add RTC module (e.g., DS3231) for high accuracy
  • Store time/alarm in EEPROM
  • Add brightness control
  • Improve UI (hold-to-fast-increment)
  • Convert to full finite state machine

📸 Demo

Add images or videos of your project here


👨‍💻 Author


⭐ If You Like This Project

Give it a ⭐ on GitHub and feel free to fork or improve it!


License

This project is licensed under the MIT License - see the LICENSE


😊 Thank You.

About

A fully functional Arduino-based embedded clock system with alarm, snooze, AM/PM support, multiplexed 7-segment display, and millis()-based timekeeping, implemented without an RTC module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages