G1:Smart Pill Reminderr - shalan/CSCE4301-WiKi GitHub Wiki

Smart Pill Reminder

Name GitHub
Freddy Amgad GH_UID1
Farida Ragheb FaridaRagheb05
Habiba Seif HabibaSeif

Github Repo: https://github.com/FaridaRagheb05/Smart_Pill_Reminder

1. The Proposal

Abstract / Elevator Pitch:

The system is built around a microcontroller running a Real-Time Operating System (RTOS), ensuring that timing-critical tasks such as scheduled reminders and Bluetooth command processing are handled with deterministic precision. Users or caregivers configure medication schedules wirelessly via a Bluetooth-connected interface, specifying pill times and associating each medication with a color-coded LED indicator. When a scheduled dose is due, the system triggers a buzzer alert and lights the corresponding LED to guide the patient to the correct pill β€” eliminating confusion in multi-medication scenarios. A SysTick-driven clock backbone guarantees that reminders fire accurately regardless of other system activity.

Project Objectives & Scope:

RTOS Integration: Deploy FreeRTOS with clearly separated tasks for: reminder scheduling, Bluetooth command handling, alert output (LED and buzzer) and logging. SysTick-Based Scheduling: Implement a SysTick interrupt-driven timekeeping backbone that accurately tracks time and triggers medication reminder events at user-defined intervals. Bluetooth Command Interface (UART): Accept and parse wireless commands over Bluetooth to allow users to: set or update pill reminder times, associate a reminder with a specific pill color, query the current schedule, retrieve the medication log Color-Coded LED Alerts (GPIO): Upon a scheduled reminder firing, illuminate the LED color corresponding to the commanded pill color (e.g., Red LED β†’ red pill compartment), guiding the patient to the correct medication. Buzzer Notification (GPIO): Sound a buzzer alert alongside the LED when a reminder triggers, with the alert persisting until acknowledged or timing out after a configurable window. Multi-Medication Support: Support scheduling for at least 3 independent medications with distinct times and color mappings concurrently

Stretch Goals:

Acknowledgement Button: Add a physical GPIO button the patient presses to confirm pill intake, updating the log with a confirmed-taken status and silencing the active alert. Missed Dose Escalation: Implement a secondary alert tier β€” if the patient does not acknowledge a reminder within a defined window (e.g., 5 minutes), the buzzer escalates (louder/faster pattern) and optionally re-alerts at a set interval. Companion Mobile Interface: Develop a minimal Android or cross-platform BLE app (or a serial terminal UI) to provide a friendlier interface for schedule configuration and log viewing beyond raw UART commands.

2. System Architecture

2.1 High-Level Block Diagram:

WhatsApp Image 2026-04-15 at 00 25 09

Subsystem Breakdown:

A brief text description of how the major modules (e.g., motor control, user interface, wireless communication) interact.

3. Hardware Design

Component Selection:

Schematics & Wiring:

Circuit diagrams, pinout tables, and breadboard layouts.

Bill of Materials (BOM):

A table listing component names, part numbers, quantities, costs, and links to datasheets.

Power Budget:

Calculations ensuring your power supply can handle the peak current draw of all components combined.

4. Software Implementation

4.1 Software Architecture:

Description of the firmware design (e.g., Bare-metal Superloop, Interrupt-driven, or RTOS).

4.2 Flowcharts & State Machines:

Visual diagrams mapping out the core logic, state transitions, and interrupt service routines (ISRs).

4.3 Key Algorithms:

Explanations of any complex logic used (e.g., PID control loops, digital filtering, sensor fusion).

4.4 Development Environment:

Compilers, IDEs, and toolchains used (e.g., Keil, PlatformIO, STM32CubeIDE).

5. Testing, Validation & Debugging

5.1 Unit Testing:

How individual hardware components and software functions were tested in isolation.

5.2 Integration Testing:

How the system was tested as a whole.

5.3 Challenges & Solutions:

A log of major bugs, hardware failures, or design flaws you encountered, and the engineering steps you took to solve them.

6. Results & Demonstration

6.1 Final Prototype:

High-quality photos of the completed build.

6.2 Video Demonstration:

A link to a short video showing the system working in real-time under various conditions.

6.3 Performance Metrics:

Data showing how well the project met its initial objectives (e.g., "Response time was measured at 12ms, well within our 50ms goal").

7. Project Management

7.1 Division of Labor

Team Member Primary Responsibilities
Freddy RTOS architecture, FreeRTOS task design, SysTick-based timekeeping backbone, reminder scheduling logic
Habiba Bluetooth UART command interface, command parsing, schedule configuration, medication log and query functionality
Farida Hardware design and wiring, GPIO for LEDs and buzzer, breadboard layout, integration testing and debugging

7.2 Timeline

A Gantt chart or milestone list showing the planned schedule versus the actual completion dates.

Milestone Deliverable Planned Date Owner(s)
M1: Team Formation Team formation sheet submitted Apr 14, 2026 All
M2: Proposal Presentation 5–7 min in-class proposal presentation + wiki Sections 1, 2.1, 7 live Apr 15, 2026 All
Checkpoint A: Wiki Setup Full proposal material on wiki (problem, solution, block diagram, requirements, BOM draft) Apr 20, 2026 All
M3: Progress Presentation & Demo At least one major working subsystem demoed live β€” target: SysTick timekeeping + FreeRTOS task skeleton running Apr 29, 2026 Farida and Freddy (hardware support)
Checkpoint B: Integration Update Wiki updated with integration status, testing evidence, remaining bugs May 6, 2026 All
M4: Final Demo & Presentation Full system demo, polished 10–12 min presentation, complete wiki, clean code repo May 13, 2026 All

Milestone-by-Milestone Breakdown:

M2 -> Checkpoint A (Apr 15 – 20)

  • Freddy: Define FreeRTOS task structure, begin SysTick timekeeping implementation
  • Habiba: Define Bluetooth command protocol, set up UART communication
  • Farida: Source components, wire up LED and buzzer circuits, create block diagram and schematic

M3 -> Checkpoint A (Apr 20 – 29)

  • Freddy: Complete SysTick clock backbone, implement reminder scheduling task
  • Habiba: Implement and test command parser, basic schedule set/query over Bluetooth
  • Farida: Validate all GPIO outputs, integrate hardware with Freddy’s scheduling task

M3 -> Checkpoint B (Apr 29 – May 6)

  • Freddy: Full multi-task integration
  • Habiba: Medication log with confirmed-taken status and missed dose escalation logic
  • Farida: End-to-end hardware testing and acknowledgement button (stretch goal)

M4 -> Checkpoint B (May 6 – 13)

  • All: System-wide integration testing, bug fixes, final demo prep, wiki completion

8. Appendices & References

8.1 Source Code Repository:

Link to your GitHub/GitLab repo.

8.2 References:

Links to datasheets, tutorials, academic papers, and course materials used during development.