Smart Pill Bottle Adherence Monitor
ISEF Category: Biomedical Engineering
Ready to Turn This Idea Into a Real Project?
This guide was put together with the help of AI research tools to give you a solid starting point.But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.
For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
Subcategory: Biomedical Devices · Difficulty: Advanced · Setup: Home Setup · Time: 1 to 2 Months
The Hook
Half of patients skip or misuse their medications. A pill bottle that weighs its contents and snaps a photo each time it opens can catch missed and wrong-pill events before harm happens. Add a small CNN trained on your own medication-photo dataset and the bottle becomes a smart auditor.
What Is It?
A load cell under the bottle reads the current pill weight. A cap-rotation encoder logs every open. A small camera in the cap photographs the dispensed pill.
A CNN trained on common pill shapes and colors classifies dispensed pills against the prescription. The system logs adherence events to a phone or local file.
The goal is a research auditing tool. Real medical use needs many more controls and regulatory approval.
Why This Is a Good Topic
Medication adherence is a top driver of avoidable hospital visits. Hardware is cheap and the ML problem is well-scoped. You will learn sensor calibration, embedded vision, and privacy-aware logging.
Research Questions
- How does pill count change classifier accuracy?
- What is the effect of lighting variability on misclassification?
- Does load-cell trend match camera-detected dispense events?
- To what extent does cap-rotation encoder reduce false events?
- Which CNN architecture fits on-device with target latency?
- How does pill-photo angle affect detection?
- What is the effect of bottle vibration on weight readings?
Basic Materials
- HX711 load cell.
- OV2640 camera module.
- ESP32 with built-in camera (e.g., ESP32-CAM).
- Rotary encoder.
- 3D-printed bottle housing.
- LiPo battery.
- Pill placebos for testing.
Advanced Materials
- Industry-grade load cell.
- Studio lighting rig.
- Clinical pharmacist mentor.
- Larger curated medication photo dataset.
Software & Tools
- TensorFlow Lite Micro: Deploys CNN on-device.
- PyTorch: Trains the model.
- Arduino IDE: Programs the ESP32.
- Python (NumPy, OpenCV): Curates the medication photo dataset.
Experiment Steps
- Lock the load cell and camera housing geometry.
- Calibrate the load cell with known weights.
- Build a labeled medication photo dataset.
- Train CNN with cross-validation.
- Test adherence simulation with planned errors.
- Report event-level precision and recall.
Common Pitfalls
- Letting bottle vibration register as weight changes.
- Training the CNN on only one lighting condition.
- Ignoring partial-pill dispensing events.
- Skipping rotation-encoder events and relying on camera alone.
- Reporting accuracy without confidence intervals.
What Makes This Competitive
Test against at least ten realistic medications, run a within-subject simulation with planned mistakes, and report both false-positive and false-negative rates. Calibrate the load cell, fix lighting, and document the privacy story (on-device only). Add a fairness slice across pill colors.
Project Variations
- Add a phone-app push notification for missed doses.
- Use mmWave radar to detect bottle handling without opening.
- Compare in-cap vs. external camera placements.
Learn More
- PubMed: Search medication adherence smart bottle reviews.
- NIH PubMed Central: Open-access adherence intervention papers.
- TensorFlow Lite Micro guides: Free embedded ML tutorials.
- NIST Image Quality Lab: Reference standards.
- MIT OpenCourseWare: Course 6.S191 Introduction to Deep Learning.
Biomedical Engineering pillar guide
How to Do Real Biomedical Engineering Research at Home: A High School Student’s Guide to Free Tools, Affordable Kits, and Public Databases →