- Overview
- Problem Statement
- Features
- Components Used
- Circuit Diagram
- Pin Connections
- How It Works
- Arduino Code and Setup
- User Guide
- Team Members
- Technologies and Tools
- Project Photos
- Future Improvements
- License
- Contact
- Support
The Smart Medicine Reminder System is a hands-on embedded systems project built from scratch using an Arduino UNO, DS3231 RTC Module, and a 16×2 I2C LCD Display. Our main focus was on hardware integration — designing a real-world, low-cost healthcare solution that helps users remember their medication schedules through audio-visual alerts.
This project was developed entirely as a team effort, where each member contributed to circuit assembly, component selection, embedded C++ programming, and system testing. Together, we transformed a simple concept into a fully functional hardware prototype that demonstrates practical applications of embedded systems in everyday life.
“This project reflects our passion for building hardware, solving real problems, and working together as a team.”
Medication non-adherence is a serious global issue, especially among elderly patients. Instead of just simulating a solution, we decided to build a physical, working prototype — because we believe in learning by doing. Every wire, resistor, and line of code was carefully placed to create a system that is:
- ✅ Practical – Solves a real-world healthcare problem
- ✅ Affordable – Built with low-cost, easily available components
- ✅ User-Friendly – Simple buttons and clear LCD feedback
- ✅ Team-Built – Designed, assembled, and tested collaboratively
| Component | Our Contribution |
|---|---|
| Arduino UNO | Programmed and interfaced with all modules |
| DS3231 RTC | Integrated for accurate real-time clock |
| 16×2 LCD (I2C) | Displayed time, status, and alerts |
| Buzzer + LED | Added audio and visual alarm signals |
| Push Buttons | Enabled user input for setting time and stopping alarm |
All of these components were carefully assembled on a breadboard, wired according to a custom circuit diagram, and programmed in C++ (Arduino IDE) — with real-time debugging and testing at every step.
Built with ❤️, hardware, and teamwork — because great projects are never built alone.
Millions of people worldwide forget to take their medication on time, leading to:
⚠️ Worsening of chronic conditions- 🏥 Increased hospitalizations
- 💰 Higher healthcare costs
- 📉 Reduced quality of life
Our goal was to create a simple, affordable, and effective reminder system that can be used by anyone, anywhere.
| Feature | Description |
|---|---|
| ⏰ Real-Time Clock | Displays accurate time using DS3231 RTC Module |
| 🔔 Audio Alert | Piezo buzzer triggers when it's time to take medicine |
| 💡 Visual Alert | LED blinks simultaneously with buzzer |
| 🖥️ LCD Display | Shows current time, set reminder time, and status messages |
| 🔘 Adjustable Timer | Hour and Minute push buttons to set reminder time |
| 🛑 Stop Button | Dismisses the alarm after acknowledgment |
| 🔋 Low Cost | Built with affordable, easily available components |
| ⚡ User-Friendly | Simple interface – anyone can use it without technical knowledge |
| Component | Quantity | Purpose |
|---|---|---|
| Arduino UNO | 1 | Main microcontroller |
| DS3231 RTC Module | 1 | Real-time clock for accurate timekeeping |
| 16×2 LCD Display (I2C) | 1 | Display time, status, and alerts |
| Piezo Buzzer | 1 | Audio alert/alarm |
| LED (Red) | 1 | Visual alert/alarm |
| Push Buttons | 3 | Hour adjustment, Minute adjustment, Stop alarm |
| Resistors (220Ω) | 2 | Current limiting for LED and buzzer |
| Breadboard | 1 | Circuit assembly |
| Jumper Wires | Multiple | Connections between components |
| USB Cable | 1 | Power and programming |
+---------------------------+
| Arduino UNO |
| |
| 5V ---------------------+-----> RTC VCC, LCD VCC, Buzzer VCC
| GND ---------------------+-----> RTC GND, LCD GND, Buzzer GND
| |
| A4 (SDA) --------------> RTC SDA / LCD SDA
| A5 (SCL) --------------> RTC SCL / LCD SCL
| |
| D2 ---------------------> Push Button 1 (Hour +)
| D3 ---------------------> Push Button 2 (Minute +)
| D4 ---------------------> Push Button 3 (Stop Alarm)
| D5 ---------------------> LED (Anode via 220Ω)
| D6 ---------------------> Buzzer (via 220Ω)
| |
+---------------------------+
LCD 16x2 (I2C)
+-----------------+
| VCC ---- 5V |
| GND ---- GND |
| SDA ---- A4 |
| SCL ---- A5 |
+-----------------+
DS3231 RTC
+-----------------+
| VCC ---- 5V |
| GND ---- GND |
| SDA ---- A4 |
| SCL ---- A5 |
+-----------------+
[Buzzer] ---- D6 ---- GND
[LED] ---- D5 ---- GND
[Button1] ---- D2 ---- GND
[Button2] ---- D3 ---- GND
[Button3] ---- D4 ---- GND
| Arduino Pin | Connected To | Notes |
|---|---|---|
| 5V | RTC VCC, LCD VCC, Buzzer VCC | Power supply |
| GND | RTC GND, LCD GND, Buzzer GND, LED Cathode, Buttons | Common ground |
| A4 (SDA) | RTC SDA, LCD SDA | I2C data line |
| A5 (SCL) | RTC SCL, LCD SCL | I2C clock line |
| D2 | Push Button 1 | Increment hours |
| D3 | Push Button 2 | Increment minutes |
| D4 | Push Button 3 | Stop alarm |
| D5 | LED (via 220Ω) | Visual alert |
| D6 | Buzzer (via 220Ω) | Audio alert |
-
System Initialization
- The Arduino boots up and initializes the RTC module and LCD.
- The LCD displays the current time and a default reminder time.
-
Setting the Reminder Time
- The user presses Hour Button (D2) to increase the hour.
- The user presses Minute Button (D3) to increase the minute.
- The set time is stored and displayed on the LCD.
-
Real-Time Monitoring
- The system continuously compares the current time (from RTC) with the set reminder time.
-
Triggering the Alarm
- When the current time matches the set reminder time, the system triggers both audio and visual alerts.
-
Dismissing the Alarm
- The user presses the Stop Button (D4) to silence the buzzer and turn off the LED.
The project is programmed in C++ using the Arduino IDE. Below are complete instructions to get your system up and running.
Before uploading the code, you need to install two libraries in the Arduino IDE.
Step-by-step:
- Open Arduino IDE on your computer.
- Go to Sketch → Include Library → Manage Libraries...
- In the search bar, type
RTClib. - Find "RTClib by Adafruit" and click Install.
- In the search bar, type
LiquidCrystal I2C. - Find "LiquidCrystal_I2C by Frank de Brabander" and click Install.
- Close the Library Manager window.
Connect the components to your Arduino UNO as per the pin connections table above.
Quick Reference:
| Arduino Pin | Connected To |
|---|---|
| 5V | RTC VCC, LCD VCC |
| GND | RTC GND, LCD GND, Buzzer GND, LED Cathode, Button pins |
| A4 (SDA) | RTC SDA, LCD SDA |
| A5 (SCL) | RTC SCL, LCD SCL |
| D2 | Hour Button (other pin to GND) |
| D3 | Minute Button (other pin to GND) |
| D4 | Stop Button (other pin to GND) |
| D5 | LED Anode (via 220Ω resistor) |
| D6 | Buzzer Positive (via 220Ω resistor) |
⚠️ Important: Buttons use internal pull-up resistors, so one leg goes to the Arduino pin and the other leg goes to GND. When pressed, the pin reads LOW.
- The full Arduino code (
medicine_reminder.ino) is available in thecode/folder of this repository. - Or copy the code directly from the
code/medicine_reminder.inofile.
Step-by-step:
- Connect your Arduino UNO to your computer using a USB cable.
- Open Arduino IDE.
- Click File → Open and select the
medicine_reminder.inofile. - Go to Tools → Board → select "Arduino Uno".
- Go to Tools → Port → select the COM port your Arduino is connected to (e.g.,
COM3on Windows or/dev/ttyUSB0on Linux/Mac). - Click the Upload button (➡️ right arrow icon) in the top left corner.
- Wait for the upload to complete. You should see "Done uploading" in the bottom status bar.
The first time you run the system, you need to set the correct time on the RTC module.
Option A: Automatic (Compile Time)
- The code is already configured to set the RTC to the time when the sketch was compiled.
- Just uncomment this line in
setup():// rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
Remove the // to enable it, upload once, then comment it again to prevent resetting on every upload.
Replace the line with your current date and time:
rtc.adjust(DateTime(2026, 6, 27, 14, 30, 0));
// Year, Month, Day, Hour, Minute, Second (24-hour format)Upload once, then comment it out.
- The LCD should display "Smart Medicine Reminder System" for 2 seconds, then show the current time and alarm time.
- Press the Hour Button (D2) to increase the alarm hour.
- Press the Minute Button (D3) to increase the alarm minute.
- Set the alarm to 1–2 minutes ahead of the current time.
- Wait – when the time matches, the buzzer will sound and the LED will blink.
- Press the Stop Button (D4) to dismiss the alarm.
| Issue | Solution |
|---|---|
| LCD shows "RTC ERROR!" | Check wiring: SDA → A4, SCL → A5, 5V → VCC, GND → GND |
| LCD shows nothing/boxes | Change LCD_ADDRESS from 0x27 to 0x3F in the code |
| Time resets when power is off | The RTC battery (CR2032) is dead – replace it |
| Buttons not responding | Buttons must connect between the pin and GND (using INPUT_PULLUP) |
| Alarm triggers at wrong time | RTC time is incorrect – re-run the rtc.adjust() code |
| "Library not found" error | Install both required libraries via Library Manager |
| Upload fails | Check Port selection and USB cable connection |
The full code is saved as:
code/medicine_reminder.ino
You can view it directly in this repository or download it to upload to your Arduino.
| Step | Action | Result |
|---|---|---|
| 1 | Power on the system | LCD shows current time and default reminder |
| 2 | Press Hour Button | Hour value increments (0–23) |
| 3 | Press Minute Button | Minute value increments (0–59) |
| 4 | Wait for set time | System monitors time in background |
| 5 | Alarm triggers at set time | Buzzer sounds, LED blinks, LCD alerts |
| 6 | Press Stop Button | Alarm stops, system resets to monitoring mode |
| Name | Role | Contributions |
|---|---|---|
| Muhammad Umar Afzal | Project Lead / Programmer | LCD integration, buzzer logic, code debugging, system testing, README documentation |
| Abdul Rehman | Hardware Engineer | Circuit assembly, hardware connections, component selection, soldering |
| Maheen Rashid | Embedded Developer | RTC module programming, push button logic, I2C communication, documentation |
All team members collaborated on testing, troubleshooting, and finalizing the project.
| Category | Technologies |
|---|---|
| Microcontroller | Arduino UNO (ATmega328P) |
| Programming Language | C++ (Arduino IDE) |
| Communication Protocol | I2C (for RTC and LCD) |
| RTC Module | DS3231 (High-precision real-time clock) |
| Display | 16×2 LCD with I2C backpack |
| Version Control | Git & GitHub |
| Documentation | Markdown (README.md) |
---
- Add a buzzer snooze function – Allow user to snooze the alarm for 5 minutes.
- Multiple medication times – Support up to 3 different reminder times.
- Wireless connectivity – Integrate ESP8266 for IoT notifications via mobile app.
- OLED display upgrade – Replace LCD with OLED for better visibility.
- Battery backup – Add battery so the RTC retains time even when unplugged.
- Voice alerts – Add a speaker module for voice-based reminders.
- Mobile app integration – Send push notifications to mobile phones.
- Data logging – Log missed/acknowledged reminders to SD card.
This project is licensed under the MIT License – you are free to use, modify, and distribute it for personal or commercial purposes. See the LICENSE file for details.
MIT License
Copyright (c) 2026 Muhammad Umar Afzal, [Friend 1 Full Name], [Friend 2 Full Name]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
For questions, suggestions, or collaboration, feel free to reach out:
Muhammad Umar Afzal
Maheen Rashid
Abdul Rehman
If you found this project helpful:
- ⭐ Star this repository on GitHub
- 🔄 Share it with your network
- 💬 Leave a comment or feedback



