Next Article in Journal
Performance of Dense Millimeter Wave Network with Uniform Cylindrical Array
Previous Article in Journal
Feature-Based Semi-Supervised Learning Approach to Android Malware Detection
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Design of a Smart Medical Box for Automatic Pill Dispensing and Health Monitoring  †

Department of Electrical and Computer Engineering, Air University, Islamabad 44230, Pakistan
*
Author to whom correspondence should be addressed.
Presented at the 2nd International Conference on Emerging Trends in Electronic and Telecommunication Engineering, Karachi, Pakistan, 15–16 March 2023.
These authors contributed equally to this work.
Eng. Proc. 2023, 32(1), 7; https://doi.org/10.3390/engproc2023032007
Published: 23 April 2023

Abstract

:
Medication non-adherence or mismanagement in medicines schedules such as missing doses, taking the wrong amounts, or having medicines at incorrect times is a serious problem, especially in elderly patients or patients with serious illnesses, and may lead to deadly consequences. This paper proposed a smart medical box that dispenses not only medicines at prescribed schedules but also has a basic health monitoring system for the patient’s temperature, oxygen level, and heart rate detection, thus relieving the patient from visiting a doctor. This device is Raspberry Pi-controlled, having an added security feature of biometric recognition so that the medicine is dispensed to the correct patient. Moreover, the user is notified once their medicine has been dispensed via SMS. The main aim of this project was to keep the device cost-effective, user-friendly, simple, and beneficial for the elderly population.

1. Introduction

Continuous advances in the public health sector and medicine are resulting in a miraculous increase in life span and more population division of older adults. This is creating a challenge for the whole world in terms of managing efficient care for elderly people. A recent study showed that the estimation of the annual gain of adults from age 65 and above will drastically exceed 10 million every year around the globe, and more than 60 countries will have around 2 million people in this group by 2030 [1]. Most of the pill-dispensing machines designed so far contain compartments as per the requirement of the product and are dispensed by anyone. This device proves to be reliable, easy to use, and very useful in the coordination of personal medication management, especially for older adults.

2. Literature Review

Medicine dispensers are used to give patients medicine according to a predetermined schedule. The use of pill boxes is an old and common method to remind people about their medicines. Some previous work in this field is as follows; Jabeena Aftab, et al. [1] used Arduino (AT mega328P) for a simple electronic reminder system with a rectangle box subdivided into three equal sub-boxes where each sub-box contains an LED and a buzzer. It used LCD (Liquid Crystal Display) to display the pillbox, a GSM (Global System for Mobile Communications) for sending messages, and an RTC (Real Time Clock Module) for keeping track of the time [1].
Othman, Nurmiza Binti, et al. [2] proposed a pill dispenser with an alarm via smartphone notification. It consists of a power supply of 5 V, a button, an RTC Module, and an IR sensor to count the medicine which is going to be dispensed. Additionally, Arduino Mega 2560 was used and all the outputs and inputs of the system were connected to it. It used a relay model for the indirect connection of the Raspberry Pi and the vibration motor to the Arduino ’Instapush’ application [2].
Jayamani et al. [3] presented an automatic pill dispenser and consumption monitoring system where a PIC 16F877A Microcontroller was used. This method used Proteus and Mikroc software for the simulations [3]. Our project aimed at introducing a biometric recognition mechanism that improves the system’s performance by dispensing the medicine to the concerned person only. The novelty of our project is that besides pill dispensing, it is capable of performing a basic health check on the patient. The previous works proposed medical boxes which can only be used by one person. So, due to biometric verification, multiple users can use it, which is an advantage over the already available designs along with basic health checks at home.

3. Problem Statement

Mismanagement of medication can escalate health issues and can have deadly consequences, especially in elderly persons. This problem needs to be addressed effectively by devising a system through which patients can independently take medicines at prescribed times.

4. Methodology

A Smart Medical Box is a microcontroller-based machine that controls different sensors and motors. Three stepper motors are used for operating the three compartments. The medicines are stored in the compartment for three different times for instance morning, afternoon, and night. An embedded system is used for the alarm and clock module, and an ultrasonic sensor for hand detection [4]. When the patient’s hand is detected, the stepper motors will operate, which in turn dispenses the medicine. The heart rate, oxygen, temperature, and biometric sensors are used for basic health monitoring. The patient’s medical record along with their previous health record is stored in the database [5]. A GSM (Global System for Mobile Communication) is used for sending alert messages to both patients and doctors for medicine time. There is a touch LED attached to the box through which the users will interact with the machine such as adding/removing medicines and checking basic health. When the user clicks on the screen, the keypad appears, and they can easily enter the details. The block diagram is shown in Figure 1a.
We are using the rotating disk dispenser design shown in Figure 1b. This design is still not 100 percent feasible, but it has minimum limitations and can fulfill the maximum goals of our project. We utilized a disk with a hole big enough to catch a single pill only. If the size is not exact, then more than one pill will be dispensed, which is the main problem. As there are a lot of pills in the box at a time, there is almost no chance that the pill will not be aligned with the hole. Therefore, the problem of only one pill dispensing at a time is resolved. We incorporated disks that are interchangeable with holes of varying lengths for different pill sizes. The size of the holes is according to the standardized pill sizes [6].

4.1. Software Implementation

The software contains coding on a Raspberry Pi using Python, catching, retrieving, and manipulating raw data from the sensors, simulations, and calculations of motor driving circuitry, an ultrasonic sensor for hand detection, biometric verification of patients, and maintaining and updating the database. We used a biometric sensor, R307, which was directly interfaced with Raspberry Pi with the UART interface. The patient needs to put their thumb on the sensor for biometric verification. For Heart Rate and SPO2, we used MAX30102 with its I2C interface protocol. DS18B20 was used for measuring the temperature, and the patient needs to hold it in their hand for measurements. The ultrasonic sensor HC-SR04 was used for hand detection. All the abovementioned sensors were incorporated with the Raspberry Pi directly and readings were shown on an LCD. The SIM800L GSM/GPRS module was used for alert messages, whose circuitry is shown in Figure 2. The GUI was designed on the ’Qt’ software to provide a user-friendly interface, PCB on ’Proteus’, and the rotating disk dispenser on ’AutoCAD’.
The driver IC (L293D) was used for motor driving circuitry as a two-phase motor driver. L293 and L293D are quadruple high-current half drivers. The sequences used were 0101, 0110, 1001, and 1010. The circuit was then implemented on PCB. The circuit diagram is shown in Figure 2b.

4.2. Hardware Implementation

The hardware consists of a power source, circuit boards, stepper motors, a fiber body for the hardware, pill containers, and dispensing path for the pills.
In the hardware, the calculations for motor driver circuitry, disk size, time for the medicine to dispense out of the bottle, and power supply are required. The SIM800L GSM/GPRS module was used to carry out any characteristic, just as a regular mobile. It can receive and send any GPRS information using TCP/IP, HTTP, etc. We used a helical GSM antenna due to its small size, which can save a lot of space on the project [7]. We integrated all the components for the final outcome, which is shown in Figure 3.

4.3. Design Calculations

In the IC L293D, the calculated current consumed by the coil is 384 mA. In a bipolar stepper motor, the step angle is 1.8 degrees with 200 steps. After summing the currents of sensors, motors, and the Raspberry Pi, the total current was 3.525 mA. Therefore, we could easily use the power supply of 5 V, and 5 A to power the device directly from the power source. For the disk size calculations, we used a bottle with a diameter of 5.8 cm, along with a disk diameter of 5.4 cm, shaft size of 5.8 mm, and the disk hole for the motor was 5.6 mm.
The diameter of the medicine to dispense was calculated as approximately 1.3 cm to 1.5 cm. Therefore, the size of the slit was selected to be 2 cm as shown in Figure 4. The time for the medicine to dispense was calculated using the second equation of motion with the distance of medicine given as 1.5 cm.
S = Vit + 1/2(gt2)
The time was calculated as 39 ms. Therefore, the motor was rotated at a speed so that the hole and slit did not interface more than one time.

5. Results and Discussions

The prototype of the Smart Medical Box was completely successful and all the modules were in working condition. Initially, the testing was performed on one person by saving their biometric data and medicine schedule, and checking their basic health as shown in Figure 5. All the data were successfully saved and checked with all the required details, which are shown clearly in Table 1 of the database. We can save the data of up to 1000 patients. The module was tested on 13 patients. Therefore, when the patients receive the notification, they verify their biometrics and the required medicine will be dispensed automatically. Additionally, new patients can be added by clicking on the new patient entry where they can add new medicines along with details such as medicine names, number of medicines taken, and number of times in a day they have to take medicines. They can enter the time in hours only, such as 0900 (9 am), 1400 (2 pm), or 2100 (9 pm). An existing user can also add/delete/update the medicines. The details are automatically saved when the user moves to a new page.

6. Conclusions

The smart medicine box is a standalone medical box that not only dispenses medicines according to a prescribed schedule but also provides the facility of checking basic health conditions of the patient such as heart rate, temperature, and oxygen level. The machine has the advantage of biometric recognition so that the medicine is dispensed to the correct user. This project aimed to make the device user-friendly and cost-effective, especially for elderly patients. The time and amount of the medicine can be changed as per the user’s requirements. This medical box is incapable of handling non-oral medication, such as inhalers, eye drops, and creams. Therefore, in the future, we can work on non-oral medications, and develop an app that can be accessed by both patients and doctors. This device can currently store three different medicines per patient, which can be enhanced to as many as the user wants.

Author Contributions

Conceptualization, A.A.; methodology, Z.N., A.A., M.A. and M.N.; software, Z.N.; validation, M.N., M.A. and A.A.; formal analysis, Z.N.; investigation, A.A.; resources, Z.N., M.A. and M.N.; data curation, Z.N., A.A., M.A. and M.N.; writing—original draft preparation, Z.N.; writing—review and editing, Z.N. and A.A.; visualization, Z.N., A.A., M.A. and M.N.; supervision, A.A.; project administration, A.A.; funding acquisition, Z.N., A.A., M.A. and M.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author, Z.N. The data are not publicly available due to restrictions e.g. their containing information that could compromise the privacy of research participants.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Jabeena, A.; Sahu, A.K.; Roy, R.; Basha, N.S. Automatic pill reminder for easy supervision. In Proceedings of the 2017 International Conference on Intelligent Sustainable Systems (ICISS), Palladam, India, 7–8 December 2017; pp. 630–637. [Google Scholar]
  2. Othman, N.B.; Ek, O.P. Pill dispenser with alarm via smart phone notification. In Proceedings of the 2016 IEEE 5th Global Conference on Consumer Electronics, Kyoto, Japan, 11–14 October 2016; pp. 1–2. [Google Scholar]
  3. Jayamani, S.; Mohanram, D.; Nandhakumaran, L.; Nila, T.; Nivetha, S. Automatic 149 pill dispenser and consumption monitoring system. Int. J. Res. Eng. Sci. Manag. 2020, 3, 647–649. [Google Scholar]
  4. Kumar, S.K.; Manimegalai, R.; Rajeswari, A.; Deekshita, R.; Dhineshkumar, M.; Manikandan, G. A Literature Review: Performance Evaluation of Wearable system with Pill Dispenser Box for Post Covid Elderly Patients. In Proceedings of the 2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICAC3N), Greater Noida, India, 17–18 December 2021; pp. 2008–2014. [Google Scholar]
  5. Farcas, C.; Ciocan, I.; Palaghita, N.; Fizesan, R. Weekly electronic pills dispenser with circular containers. In Proceedings of the 2015 IEEE 21st International Symposium for Design and Technology in Electronic Packaging (SIITME), Brasov, Romania, 22–25 October 2015; pp. 125–129. [Google Scholar]
  6. Reichelt, F.; Schmid, P.; Maier, T.; Sahlab, N.; Jazdi-Motlagh, N.; Weyrich, M.; Meyer-Philippi, G.; Kalka, G.; Matschke, M. User Centered Design of a Pill Dispenser for the Elderly. In Human Systems Engineering and Design II; Springer: Berlin/Heidelberg, Germany, 2020; pp. 699–704. [Google Scholar]
  7. Abdallah, K.; Wissam, A.; Mustapha, H.; Chady, E.-M. A Comprehensive Approach for A Smart Medication Dispense. Int. J. Comput. Digit. Syst. 2019, 8, 131–141. [Google Scholar] [CrossRef]
Figure 1. Methodology for the project. (a) Block diagram; (b) rotating disk dispenser design.
Figure 1. Methodology for the project. (a) Block diagram; (b) rotating disk dispenser design.
Engproc 32 00007 g001
Figure 2. Circuit Diagrams (a) SIM 800L Circuit Diagram (b) Motor Driver Using Microcontroller.
Figure 2. Circuit Diagrams (a) SIM 800L Circuit Diagram (b) Motor Driver Using Microcontroller.
Engproc 32 00007 g002
Figure 3. Automatic Pill Dispenser.
Figure 3. Automatic Pill Dispenser.
Engproc 32 00007 g003
Figure 4. Rotating disk.
Figure 4. Rotating disk.
Engproc 32 00007 g004
Figure 5. GUI for medicine entry. (a) Add new medicine schedule; (b) medicine schedule.
Figure 5. GUI for medicine entry. (a) Add new medicine schedule; (b) medicine schedule.
Engproc 32 00007 g005
Table 1. Database of the patients.
Table 1. Database of the patients.
NameGenderAgeWeightM1 TimeM2 TimeM3 TimeM1 QuantityM2 QuantityM3 QuantityTempHeart RateSPO2
M. NawazMale2270090014002100121979896
M. AliMale2160090014002100211969798
ZaraFemale4465090014002100111989697
ShehrozMale2380090014002100212969494
MugheesMale4555090014002100222959799
MustabeenMale3067090014002100121989896
UsmanMale2054090014002100111999997
ZainMale48760900140021001211009598
HasnainMale5056090014002100211949497
UzairMale5576090014002100112919895
HassanMale6780090014002100122929590
FazeenFemale4060090014002100212969798
AyeshaFemale4470090014002100111979599
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Nasir, Z.; Asif, A.; Nawaz, M.; Ali, M. Design of a Smart Medical Box for Automatic Pill Dispensing and Health Monitoring . Eng. Proc. 2023, 32, 7. https://doi.org/10.3390/engproc2023032007

AMA Style

Nasir Z, Asif A, Nawaz M, Ali M. Design of a Smart Medical Box for Automatic Pill Dispensing and Health Monitoring . Engineering Proceedings. 2023; 32(1):7. https://doi.org/10.3390/engproc2023032007

Chicago/Turabian Style

Nasir, Zara, Amina Asif, Muhammad Nawaz, and Muhammad Ali. 2023. "Design of a Smart Medical Box for Automatic Pill Dispensing and Health Monitoring " Engineering Proceedings 32, no. 1: 7. https://doi.org/10.3390/engproc2023032007

Article Metrics

Back to TopTop