1. Introduction
According to the World Health Organization (WHO), in 2030, one in six people will be 60 years old or older. Moreover, it is expected that by 2050, the number of people aged 80 or older will have tripled [
1]. With the growth of the adult population, governments must be prepared to provide efficient health services.
Unfortunately, as people age, the immune system slows down and becomes less efficient. Therefore, the risk of disease in older adults tends to increase [
2]. Consequently, it is recommended that older adults consult a doctor to understand the underlying causes of a health condition. Through experience and after an examination, the doctor determines the cause of the health condition and recommends a medication to treat it. Medications are chemical compounds that are the first choice for relieving pain (physical suffering) [
3].
An older adult must take the medication prescribed by the doctor on time to control the disease. Medication treatment adherence refers to the process through which patients take their prescribed medications [
4]. A lack of medication adherence can lead to consequences such as relapse, disease progression, life quality deterioration, and increased healthcare costs [
5]. However, older adults often struggle to adhere to treatment. Some factors that affect adherence include fear of medication side effects, physical problems such as declining memory, lack of financial resources, and forgetfulness [
6]. Through studies, physicians have determined that non-adherence to treatment is largely the patient’s responsibility and can be intentional or unintentional [
7]. Regardless of the cause, non-adherence to treatment is a significant public health concern.
Mehrdad et al. [
7] explained that avoiding complex regimens, providing individualized follow-up, offering family support, education, and positive feedback, as well as fostering an appropriate understanding of the disease, can help improve patients’ adherence to medication. Moreover, technological tools can also be used to mitigate the problem of medication non-adherence. The tools include the following: (i) electronic–smart pillboxes, (ii) blister technology, (iii) telehealth medication management systems, (iv) patient self-reporting, (v) video-based technologies, (vi) motion-sensing technologies, and (vii) medication event monitoring system (MEMS) [
8,
9,
10]. Each tool offers advantages and disadvantages, and each older adult perceives them differently.
According to Pratiwi et al. [
11] and Horvat et al. [
12], combining compensation (daily routines, printed medication lists, third-party support, and education) with technology-mediated (electronic pill boxes, text message reminders, and mobile applications) strategies is one of the more effective solutions to support older adults’ medication adherence. For a compensation strategy to be successful, a family member or caregiver needs to assist the older adult. Regrettably, not all adults have a close relative, while some cannot afford a caregiver. On the other hand, there is often a barrier when older adults attempt to use technological tools to adhere to their treatment [
13].
Despite technological barriers, older adults are increasingly using mobile devices, mainly due to internet connectivity [
14]. For example, smartphones allow older adults to stay in touch with family and friends, read news, and shop online, and they also serve as a medication reminder [
15]. Applications that can run on mobile devices should include simple, personalized visual aids such as text message reminders, an electronic pillbox, and virtual or augmented reality-based systems. Particularly, mobile augmented reality (MAR) is transforming the smartphone user’s experience [
16]. MAR is defined as “a real-time direct or indirect view of a real-world environment that has been augmented by adding virtual computer-generated information to it [
17].”
The literature review shown in
Section 2 and summarized in
Table 1 revealed that not all studies involve only older adults. Two studies involved doctors and caregivers. None of the studies used an automatic pill box. In some cases, the sample size is very small. All papers argued that AR can be a valuable tool in promoting medication adherence. Aiming to address the limitations identified in the literature, this paper seeks to develop an automatic pill box that utilizes mobile augmented reality to support older adults in adhering to their medication regimen. Additionally, this study poses the question of whether a combined automatic pillbox and MAR app v1.0 is possible, usable, and supportive of short-term medication taking for older people.
The main contributions of this paper are the following:
We present the details of the design of an automatic pill box.
We explain how the MAR app was designed to help older adults with medication adherence.
We present the results of the proposal’s assessments, which support the claim that the proposal can help older adults adhere to their medication treatment.
The rest of the paper is organized as follows.
Section 2 presents the literature review.
Section 3 explains the research design and the instruments applied. The results are shown in
Section 4. Finally,
Section 5 presents the conclusions and proposes further work.
3. Materials and Methods
In this section, the design of the pill box and the MAR app are explained. Both elements work together to help older adults adhere to their medication treatment.
3.1. Pill Box Design
The review conducted by Pinto et al. [
31] revealed that smart devices, such as pillboxes, can enhance medication adherence by tracking patient outcomes, saving data in a database, and communicating the obtained information to a doctor or a family member of the patient. Considering these features, we began by designing the pill box. Moreover, the user type (older adults), quantity of medications, frequency of use, and ease of use were also considered in our design.
The pill box was designed using SolidWorks 2024 Computer-Aided Design (CAD) software. A parametric and iterative design methodology was applied, enabling the geometric and mechanical integration of each module. The modular architecture includes four independent reservoirs (containers): one designed for small tablets (diameter ≤ 8 mm), another for large tablets (diameter ≤ 15 mm), and two for capsules of different sizes (diameters of 12 mm and 20 mm, respectively). The main components of the system are the interchangeable reservoirs (containers), the dosing rotors, the lid, and the base structure, which comprises the dispensing channels and the collection chamber.
Figure 1 shows the external CAD model of the pill box.
The pill dispenser has four containers powered by four independent Pololu DC motors, each coupled to a custom-designed measuring bearing for each pill or tablet, as shown in
Figure 2. The dispensing drive stage is driven by an NPN 2N2222 bipolar junction transistor (BJT) in a hermetically sealed TO-18 metal package, which functions as a saturated switch to minimize conduction losses and thermal stress.
The geometry of the rotor, considering the aforementioned tolerances, delivers one unit per cycle. Final validation included experimental testing with 200 dispensing events per container, showing a 98.5% success rate in releasing a single unit. Limit switches with a mechanical repeatability of ±0.05 mm were integrated to define the resting position of the bearings, preventing overdosing. Energy efficiency was evaluated through consumption tests in continuous and intermittent operation, by varying the motor speed via pulse width modulation (PWM). The analysis conducted confirmed a 10% reduction in average current consumption compared to an on/off strategy [
32].
The four containers were designed with truncated cone geometries, and their angles of inclination were optimized using granular flow analysis. The final design used angles of 52° for tablets and 60° for capsules, values that prevent bridging and promote continuous flow. Each truncated cone leads to a specific dispensing bearing, sized to provide a functional clearance of 0.5–0.8 mm in relation to the nominal diameter of the stored tablet. This tolerance allows the bearing to store a corresponding tablet or capsule without introducing excessive clearance that could compromise dosing.
The collection chamber, located beneath the containers, incorporates an inclined plane and a curved guide radius of 15 mm. This geometry minimizes rebound during tablet release and directs each dose toward the final outlet, as shown in
Figure 3b.
A central microcontroller manages the actuators and maintains wireless connectivity. The interface, connected to the Telegram platform, issues immediate notifications and records the traceability of the therapeutic regimen, allowing dynamic adjustments according to the medical prescription.
As part of the automatic dispensing process, the control card is based on a low-power microcontroller with 2.4 GHz Wi-Fi and Bluetooth® Low Energy capabilities. It consists of a high-performance dual-core microprocessor (Xtensa® 32-bit LX7),a low-power coprocessor, an RF module, and peripherals, as shown in
Figure 4b. This module, developed by Espressif Systems (Shanghai, China) and acquired in Mexico City (CDMX), was subsequently integrated into the prototype. In addition, it enables the input of medication information, controls the motors of each container, and displays the status of the dispensed medications on the LCD screen shown in
Figure 4a.
The schematic diagram shown in
Figure 4b lists the internal and peripheral components (SoC, flash memory, regulator, charging chip, IMU, battery connector, USB-C port, and control buttons), which are explained below.
ESP32-S3R2—The SoC with WiFi and Bluetooth, up to 240 MHz operating frequency, with onboard 2 MB PSRAM.
W25Q128JVSIQ—16 MB NOR-Flash.
CH343P—USB to UART chip.
ME6217C33M5G—800 mA output, low dropout, high rejection rate.
ETA6096—high-efficiency lithium battery charging chip.
QMI8658—6-axis IMU includes a 3-axis gyroscope and a 3-axis accelerometer.
MX1.25 lithium battery interface—MX1.25 2P connector, for 3.7V lithium battery, supports charging and discharging.
USB Type-C port—USB to serial port for program flashing and log printing.
RESET button.
BOOT button—press before reset to enter download mode.
The ESP32-S3 device constitutes an embedded IoT-enabled mechatronic platform for an automated pill dispensing system designed for medication management in home care and clinical environments. Power is supplied via a 3.7 V lithium-ion rechargeable cell, ensuring stable operation and extended autonomy through an embedded power management module with charging and over-discharge protection.
The human–machine interface (HMI) was implemented using an integrated 1.28-inch thin-film transistor (TFT) capacitive touchscreen (Faranux Electronics Ltd., Kigali, Rwanda) with a resolution of 240 × 240 pixels and an RGB color depth of 65K. The screen displays information such as the following: the time according to the time zone, the number of pills or tablets in each container, and a quick response (QR) code for augmented reality integration, which will be explained in
Section 3.2. This information will be displayed on the HMI in an endless cycle for the end user.
During dispensing cycles, the motor performs a controlled rotation until a limit switch is activated, acting as a mechanical sensor to indicate the exact alignment of the pill compartment with the extraction slot. Upon confirmation, the system activates a multimodal alert subsystem consisting of acoustic transducers. Beyond local notifications, the device incorporates an IoT-based remote alerting mechanism. The mechanism leverages the Telegram Bot API to send notifications directly to a paired mobile device. This functionality enables the transmission of critical events such as “medication ready”, “dose missed”, or “low battery”. With this information, caregivers and patients remain informed regardless of their physical proximity to the dispenser. This capability is implemented through HTTPS-based asynchronous message dispatch routines within the firmware, with secure token-based authentication to prevent unauthorized access.
The control card is the automation core of the pill dispenser. It is based on an ESP32-S3 microcontroller (Waveshare Electronics Ltd., Shenzhen, China) with Wi-Fi and Bluetooth Low Energy connectivity. The card allows local management and remote communication via IoT. Its main functions are: synchronizing the system time via NTP for reminders; managing user interaction via a 1.28-inch circular TFT screen that displays the time, pill inventory, and a scannable QR code for the AR application; monitoring the logic of the motors and limit switches to ensure controlled dispensing and prevent overdosing; and finally, notifying relevant events in real time via the Telegram API (e.g., “medication dispensed,” “pill available,” or “low battery,” etc.).
The code implements display routines, touch detection, and automatic screen rotation, simplifying interaction when switching between time, inventory, and QR. In terms of physical integration, the card is mounted on the base of the device and connected directly to the container motors via power transistors. The limit switches are linked to digital inputs to stop the motor once the dose is released. The firmware also controls the speed and duty cycle of the motors via PWM, reducing energy consumption and extending the life of the system.
The interface was designed with usability criteria for older adults in mind. A large font, high contrast, and simplified navigation, based on three cyclical views (time, number of medications, and QR codes), are the main features. The features are complemented by the system’s ability to operate autonomously—automatically changing views if the user does not interact—which is crucial in scenarios where patients may have cognitive or motor difficulties.
The subsystems ensure that the user is immediately aware of unauthorized access, even in noisy environments or if they are out of range of the dispenser. The validation included experimental testing with 200 dispenses per container, demonstrating a 98.5% success rate in user attention to the available medication.
The firmware implements task scheduling algorithms, synchronizing doses according to medical prescriptions, with dynamic reconfiguration and information display via the HMI. The architecture is compatible with IoT interoperability, enabling secure bidirectional data exchange for remote program synchronization, compliance monitoring, and event logging on cloud-based medical platforms.
Figure 5 shows the interaction of the systems and subsystems operable in the pill box.
Stage 1: The operation and functionality of the automatic pill box prototype are based on the dispensing of medications. The first stage consists of configuring the system. Administrators use a mobile or web interface connected to cloud services to set the initial operating parameters. The process involves defining operating schedules according to the time zone, specifying which containers will be in operation, and entering the time intervals for dispensing doses. This configuration is crucial for the device to accurately interpret the patient’s specific needs and operate autonomously.
Stage 2: The system diagnosis is performed. The system controlled by the ESP32-S3 runs a series of internal tests to verify the correct functioning of its mechanical, electronic, and communication modules. The preventive diagnosis facilitates the detection and correction of potential faults before the dispensing process begins, thereby ensuring the integrity of the treatment. Once validated, the system activates the device. Then, and only if the functional tests are correct, the user will be asked to insert the medication into the previously configured containers, enabling the medication supply stage and all its subsystems to operate normally.
Stage 3: The system will be operating the programmed routines for dispensing the medication(s). During this stage, the dispensing mechanisms are synchronized with alerts sent to a mobile device configured in stage 2, and audible alerts will be activated to notify the user of the dose’s availability. The stage is critical for maintaining therapeutic adherence, as it combines mechanical precision with direct interaction with the patient.
Stage 4: The system sends security alerts, which can be sent to the patient’s mobile phone or to a third party. The alerts are activated under normal reminder conditions and in critical situations, such as failure to take the dose, unauthorized openings, disconnections from the system (power line), or clogging problems. The alerts can also be sent to family members, caregivers, or medical staff.
Stage 5: The device enables remote access, facilitating firmware updates, modification of operating parameters, and preventive and corrective maintenance without requiring direct physical intervention. These steps ensure continuous system operability and adaptability to the patient’s changing needs. Due to the modular system of the containers, they can be exchanged for the various existing medications, positioning the prototype as an innovative and robust tool in intelligent medication management.
The pill box initial design incorporates four separate containers, each optimized for different sizes of tablets and capsules. This approach ensures compatibility with a range of treatments and facilitates experimental testing with different drug presentations. However, we recognize that, in practice, many patients only require one or two types of medication, so maintaining four compartments could represent an unnecessary use of space and an increase in costs.
A modular architecture was adopted to address this situation. The containers can be interchanged according to the patient’s specific needs, allowing only those corresponding to their treatment to be installed. The remainder can be replaced with inserts or blind covers that reduce the device’s functional size. This modularity also simplifies cleaning, maintenance, and replacement in case of wear and tear.
3.2. Mobile Augmented Reality App Design
According to Buchner et al. [
33], superimposing information directly on top of real objects reduces cognitive load because older adults do not have to memorize the data. Through visual cues, MAR helps older adults remember their daily routines, which can include taking medication. Consequently, MAR can help older adults improve their quality of life [
34]. The use of virtual models as advertisements in MAR provides an intuitive and natural interaction for older adults [
35]. Moreover, according to Chen et al. [
36], the playful and interactive nature of MAR provides an engaging experience for older adults. Thereby, reducing the barrier to using new technologies and consequently promoting consistency in the use of the tool.
Considering that the target population was older adults, the initial goal was to design an app as simply as possible. Additionally, the size of the letters for all the messages should be large enough for older adults to read them easily. However, the app is not suitable for use by older adults with Parkinson’s disease or advanced visual impairment. As a starting point, we conducted a preliminary survey to assess the feasibility of designing an MAR app to support older adults in medication adherence.
3.2.1. Feasibility Survey
Convenience sampling was used to select feasibility survey participants because accessing a broad population of older adults was not feasible. Participants were family members, acquaintances, and professors from the universities where the authors of this paper work or study. The inclusion criteria included being between the ages of 60 and 85. The selection did not consider whether the adult had any medical conditions, although the results showed that most did.
The sample for the preliminary survey comprises 30 Mexican older adults aged from 60 to 85 years (18 (60%) were female, and 12 (40%) were male). The adults were from the states of Morelos, Mexico City, Chihuahua, Veracruz, the State of Mexico, and Puebla. Most of the participants were professionals, including some with postgraduate studies. We conducted the survey in March 2025.
The survey comprises four questions: (i) Do you have any chronic illnesses? (ii) Do you have trouble remembering to take your medication? (iii) Who helps you with your health care and app? (iv) Do you have a smartphone? If yes, please select Android or iPhone. Before answering the survey, all participants received information about the study’s aim. We informed the participants that the data obtained would be treated confidentially and used only for academic purposes. All participants who completed the survey also filled out a consent form regarding the use of their data.
The analysis of the preliminary survey responses, as shown in the first two paragraphs of
Section 4, revealed the feasibility of designing a tool for medication treatment adherence. Therefore, the design of the MAR app to support older adults in medication adherence treatment began.
3.2.2. Database
A crucial part of our proposal is the database. A database provides clinicians with access to patients’ medication records. Moreover, databases are essential for analyzing and tracking patient adherence to a medication treatment [
37]. A relational database in third normal form was developed to ensure the integrity of information, reduce the possibility of data anomalies, and avoid redundancy and transitive dependencies.
As shown in
Figure 6, the proposed database contains both patient data and medical prescription information, including medication names, dosages, administration schedules, and treatment durations. A corresponding alarm is programmed for each medication.
Figure 6 displays a section of the entity-relationship model that describes the relationship between a patient, their medical prescription, and the associated treatment. Each prescription contains the following: the prescribed medication, its type, and administration frequency. This frequency is implemented through a schedule specifying exact medication intake dates and times. The data serves as the information source for queries made by the smart pill box control module.
The data stored can be accessed via the mobile application via web services to generate necessary medication reminder alarms for patients. This data serves as input for the MAR application. When required, medication reminders are sent to the patient’s smartphone and to the list of people registered as responsible for the patient.
3.2.3. App Design
The cascade model was selected to design the MAR app. Additionally, the recommendations provided by Borsting et al. regarding pattern model implementation, consistent appealing design, and multimodal interaction concepts were considered to promote the app’s usability [
38].
The MAR app was developed in four stages: (i) requirements definition, (ii) solution design, (iii) development in each tool, and (iv) tool integration.
The following requirements were established in the first stage: (a) the application will work with Android devices. The Android operating system is the most widely used in smartphones, with approximately 70% of the global market [
39]; (b) the application must read a marker to display information. It is essential that marker reading be as simple as possible. Therefore, we decided to use a QR code; and (c) the application must display the name of the medication, dosage, schedule, and duration of treatment using large font types.
From the various alternatives available on the market for implementing augmented reality, the Vuforia Software Developer Kit (SDK) version 10.25.4 was selected during the solution design stage. Vuforia enables the execution of all computer vision operations, including marker recognition, pose estimation, rendering, and tracking. Moreover, Unity 3D version 6000.0.27f was selected to generate the visual environment and all the 2D virtual text that would be superimposed on each marker. Unity 3D was selected due to its flexibility, power, and wide range of tools. Finally, the QR Code Monkey website was chosen for marker design. The flow diagram shown in
Figure 7 was proposed to develop the solution on the third stage.
Unity allows deployment for various platforms, including Android and iOS operating systems. The Unity project incorporated elements such as the Panel, Scroll View, AR Camera, and Image Target. QR codes were selected as fiducial markers to incorporate virtual elements inside the scene. One QR code was designed for each medication in the database to allow easy identification. The set of markers was developed using the QR Code Monkey website. An example of a marker is shown in
Figure 8.
The use of QR codes does not represent a barrier because it is becoming common among older adults, and together with the MAR, their independence and confidence can be fostered [
40]. Additionally, the use of QR codes provides older adults with instantaneous access to the information they need, particularly regarding medication consumption. Using a QR code is easier than typing a URL, query string, or authentication code to search for specific medication information. According to Rivas et al. [
41] and Morrison et al. [
42], 62% of older adults find QR codes beneficial for accessing medical information. Moreover, according to Morrison et al., 72% of older adults feel comfortable using QR codes to read menus in restaurants or obtain information regarding transportation services.
Vuforia enables the development of augmented reality software. Once the set of QR codes was designed, it was added to the database generated in the Vuforia tool. Once the project was created in Unity and the database generated in Vuforia, including the QR code, the tools were integrated in the fourth stage.
The Vuforia package was downloaded and imported into the Unity project to integrate the MAR app. Once the package was imported, the features for working with augmented reality were enabled. Objects such as the AR Camera were added, to which an Image Target was associated. The corresponding license was added to the project to allow working with the database generated by Vuforia. Once the license was included, the database containing the target generated from the QR code was imported. An object was then created and linked to the Image Target. The objective was to display the text corresponding to the description of the medicine once the target was detected.
Figure 9 shows the integration of the tools into the project developed in Unity.
Once development was completed, the project’s Android Package Kit (APK) was generated for installation on a mobile device. When the alarm on the smartphone rings, the patient must tap the MAR app icon on the Android device to initiate execution. Immediately, the presentation screen is displayed, and the camera is turned on. The pill box will dispense the medication and show the marker on the LCD. The patient must point out the marker. Once the marker is recognized, virtual information is superimposed onto the smartphone screen. Also, an internal message is triggered, requesting a connection to the database to update information regarding satisfactory medication dispensing.
4. Experiments and Results
The feasibility survey was administered in March 2025, and 30 Mexican older adults participated. The authors of this paper administered the survey. Most of the participants filled out the survey on a printed sheet of paper, and a few used an online form.
Regarding question 1, 70% reported having some chronic condition (i.e., diabetes, hypertension, heart problems). Eighty percent of respondents admitted to having trouble taking their medication on time. Regarding question 3, 53.33% indicated that their family supported them in their care; a nurse attended to 6.66%, and the remaining 40% expressed that they had no one to help them. Finally, 93% of the older adults expressed having a smartphone. Moreover, 90% of participants who answered yes own an Android-based smartphone. The results were encouraging, so the MAR app was designed and implemented.
On the other hand, a functionality survey of the proposal was accomplished in June 2025. Convenience sampling was used to select participants because accessing a broad population of older adults was not feasible. Participants were family members, acquaintances, and professors from the universities where the authors of this paper work or study. The inclusion criteria included being between the ages of 60 and 85. Older adults who did not have a chronic illness were excluded from the study.
The survey was conducted with 100 people between 60 and 85 years old, 20 of whom also participated in the feasibility survey. Of the 100 patients who participated in the study, 51% were women and 49% were men. The average age was 77 years. The adults were from the states of Morelos, Mexico City, Chihuahua, Veracruz, the State of Mexico, and Puebla. Most of the participants were professionals, including some with postgraduate studies. Older adults reported having the diseases that require disciplined chronic treatment, including high blood pressure, diabetes, heart failure, asthma, osteoporosis, and kidney failure.
All the participants were informed about the research goal of the test. Participants were also notified that the data obtained would be treated confidentially and used only for academic purposes. Moreover, all patients completed a consent form regarding the use of their data.
The functionality survey lasted one week for each participant. An average of 20 participants received the instructions per day. The goal was to follow a treatment adherence for one week for each participant. Each participant received an explanation of the MAR app, including instructions on its use. The devices were configured according to each participant’s needs jointly by the adults and by the authors of this paper.
After one week of using the App, each participant completed the survey regarding the app’s functionality. In addition to demographic data, such as age and sex, the survey included 19 questions, each based on a five-point Likert scale. Each participant answered the survey on a printed sheet of paper. The average time to answer the survey was 25 min. Two experts validated the survey. Moreover, the internal reliability of the survey was measured with a Cronbach’s alpha of 0.83, indicating a good to excellent level of reliability. The responses to the 19 questions are shown in
Table 2.
The minimum score on the survey is 19, and the maximum is 95, with a midpoint of 57. It can be observed from
Table 2 that most of the responses correspond to strongly agree and agree. This generally indicates that older adults accepted the proposal. The most significant result is observed in question 19, regarding whether the app would help with adhering to medical treatment, where 88 participants responded with a strong agreement and 11 with agreement.
Additionally, it is worth noting that none of the participants chose “strongly disagree“ for any question. Moreover, only two participants selected the disagree option in two questions. A total of 22 responses raise doubts when choosing the “undecided“ option.
Table 3 shows the mean, standard deviation, and item-total correlation computed. The total item correlation computed does not reflect the necessity of eliminating any item.
After the functionality survey, a second study was conducted to measure adherence factors and app usability. Twenty older adults from the first study participated in the second examination. All participants received instructions about the study’s aim, and a set of QR’s to emulate a medical treatment. We asked the participants not to forget to scan the QR code at the time of “medication intake“.
In the second study, a log was automatically created to compare the time elapsed between the scheduled time for taking the medication and the time it was actually marked as taken. The effectiveness of the alarm and QR code recognition was also validated. It is essential to note that the 20 participants were taking different medications. Furthermore, the doses and timing of consumption also varied.
At the end of the study, 189 records were collected. Each record included the time of consumption as indicated by the test treatment, the actual time of task completion, and the difference between the two. For example, a medicine should be taken at 7:00 a.m., but it was taken at 7:04 a.m. Therefore, the difference annotated is four minutes.
We conducted a Shapiro–Wilk test with a significance level
= 0.05 and Q-Q plots to determine whether the data followed a normal distribution. The
p-value obtained was zero, which is less than
. Therefore,
was rejected, and it was assumed that the data are not normally distributed. The test statistic
signifies that it is not in the 95% region of acceptance. In
Figure 10, the quantile–quantile (QQ) plot is shown. As can be observed, the plotted points do not follow the straight line. The deviated points indicate a violation of the assumption of normality.
After data analysis, a final difference of 14 h and 15 min was computed. Dividing 855 min by 189 records yields a mean of 4.5238 and a standard deviation of 8.3345. Other statistics obtained are as follows: median interquartile range = 4, skewness = 7.5852, minimum = 0, and maximum = 92. The results indicated that the remainder was marked as completed 120 times (63.5%) within 4.5 min and 69 times (36.5%) after the average time.
In addition, eight extreme observations or outliers (12, 12, 15, 16, 25, 30, 54, 92) were detected, which can badly influence the test results. Two extreme values were recorded: one patient marked the remainder after 54 min, and another after one hour and 32 min.
After a thorough analysis, it was concluded that the cause of the last two delays was the smartphone running out of battery. Fortunately, when the smartphone was powered on again, the alarm sounded immediately, and the medication alert was marked as complete. A summary of the 189 records can be consulted in
Figure 11.
The stock thresholds ≤5, ≤10, and ≤15 min were established to identify critical levels in medication consumption. A total of 150 intakes were realized in a 5-min interval, 180 in a 10-min interval, and 184 in a 15-min interval.
We used a generalized linear mixed model (GLMM) to evaluate the effect of the difference between the programmed time and the actual time of task completion on the probability of adherence. We grouped the records into on-time and late categories. Values minor or equal to 4.5 were assigned to on-time. Meanwhile, values higher than 4.5 were assigned to the late category. The on-time category comprised 125 records, while the late category consisted of 64 records. Because the data are binary, a binomial distribution and a logit link were used.
The results revealed that, as the delay in “taking“ the pill increases, the probability that the patient will comply with taking it on time decreases significantly. For every additional minute of delay, the probability of adherence decreases by approximately 5%. Random effects showed that some patients are naturally more adherent than others, even if they have the same delay. Adherence may not depend solely on the time difference but also on individual patient characteristics.
The model revealed that the time difference was a significant predictor of adherence (, standard error , , ). This indicates that for each additional minute of delay, the likelihood of taking the medication on time decreases, with an odds ratio (OR) of 0.95 (95% CI: 0.94–0.96). The results suggest that delays in taking medication are a critical factor in adherence, and that tailored interventions may be necessary for patients with greater variability.
The study also showed that, in all 189 cases, the alarm always sounded at the scheduled time and that the QR code displayed always corresponded to the medication that was to be consumed.
Following the study, several practical implications were identified to enhance the performance of our proposal. Although many older adults frequently use mobile devices, a new application must be user-friendly and easy to use, and it must contain clear instructions. Interoperability (data exchange) and connectivity are crucial elements for monitoring medication intake. Caregivers can use the data to track treatment progress.
Furthermore, data protection processes are essential. It must be ensured that unauthorized third parties do not access or use the data of older adults. The tool must be affordable and compatible with both Android and iOS, and it must be regularly monitored for adjustments and updates. In summary, the proposed approach aims to support older adults in adhering to their medical treatment.
Limitations and Future Research
The proposal can serve as a tool to help older adults adhere to their medication treatment. However, it will always be important for a doctor or family member to inspect or support the “patient”. The results revealed that, in the particular case of our study, the use of a technological device did not have a negative influence on older adults.
Regarding the automatic pill box, the future work plans to develop configurable versions with different numbers of compartments. The aim will be to facilitate the transition from a compact model with one or two containers to an extended model for users taking multiple medications. This strategy strikes a balance between flexibility for different user profiles and reduced costs and space requirements for most use cases.
The proposal’s implementation time was short (1 week). According to Biener et al. [
43], a one-week longitudinal study is suitable for observing user interaction under real-life conditions. However, it would be essential to conduct a long-term study in the future to determine whether the novelty of the system is responsible for such good results. Through a long-term study, data on the actual adoption of the technology can be collected, and its long-term usability and acceptance can be assessed. Data could also be collected on eye strain and difficulty integrating technology into daily routines.
Monitoring certain aspects of smartphones proved to be a challenging task. For example, it is difficult to ensure that patients always have a charged smartphone battery. Moreover, some patients were unable to recall where they had left their device. In the future, we will implement strategies to help older adults when they forget to charge their cell phones. The strategies include positioning wireless chargers in strategic locations, promoting the use of cases with built-in batteries and power banks, monitoring battery life to send alerts, and utilizing machine learning [
44]. In cases where older adults do not remember the location of their cell phone, we will promote strategies such as the use of smartwatches, location applications, voice assistants, and smart tags [
45].
In the consumption study, the 20 participants were directly monitored, and it was found that, on average, they marked “the medication” alert as completed within 4.5 min. However, it was almost impossible to verify whether “the medication” was certainly taken. In the future, it will be desirable to add an ingestible sensor system (ISS) to the proposal. The idea is to activate the sensor by stomach fluids. Consequently, a message will be sent to the pill box to inform about the medication consumption [
46].
Currently, the proposal is unsuitable for older adults with Parkinson’s disease or advanced visual impairment. Regarding users with Parkinson’s disease, we plan to integrate voice commands into the pill box [
47]. On the other hand, MAR is mostly based on visual stimuli. However, multisensorial channels can be employed to support users with visual impairment. In the future, we should consider incorporating automated narrations that provide information about the medication being taken. Haptic feedback can also be included to generate warnings or errors [
48].
Only older Mexican adults participated in the study. Therefore, the results may be biased due to the country’s cultural and educational context. In the future, it will be important to include participants of other nationalities to observe the system’s widespread use. For example, include countries with greater exposure to the use of technological devices and those with lower smartphone penetration rates [
49].
The study was conducted only on Samsung tablets with the Android operating system. In the future, testing is planned for a wide range of devices to ensure the app runs properly in smartphones with different architectures. Additionally, to ensure the app reaches a wider range of users, it will also be implemented for the iOS operating system [
50].
At the beginning of the study, we also considered the use of augmented reality glasses. However, the glasses can increase visual fatigue in older adults. Other limitations include the learning curve associated with using new technology, the problem of attention tunneling, which causes MRA users to focus more on the approaches of AR models than on medication use, and an even smaller percentage of older adults being resistant to or distrustful of using the technology.