Automatic Pill Dispenser

The issue of medication misuse among senior patients is a significant concern. Forgetting to take medications on time is a common occurrence, increasing the risk of improper dosage. Additionally, there is a possibility of accidental ingestion of incorrect dosages, which can have serious consequences. Addressing these challenges is crucial to ensure the safe and effective administration of medications for senior patients. This project focuses on the design and implementation of an IoT-based Automatic Pill Dispenser, which aims to enhance medication by utilizing smart sensors and simplify pill administration. The system features a secure pill storage unit, a control module, and a user-friendly mobile application. Patients can personalize their medication schedules, receive reminders, and track their adherence through the mobile application. The integration of this innovative solution has the potential to revolutionize medication management practices and improve patient outcomes.


I. INTRODUCTION
In a society where the elderly population is steadily increasing, it becomes imperative to address the challenges associated with their declining health conditions, such as poor eyesight, poor memory, and the prevalence of cardiovascular illness, circulatory diseases, and cancer.These issues are particularly pronounced in rural areas, exacerbating the need for effective solutions.One promising approach to mitigate these challenges is the application of medication dispensing technology-an innovative tool designed to enhance medication management and alleviate the burdens on both the elderly and their caretakers.
Currently, the senior citizen population stands at a staggering 104 million individuals.Among them, over one third grapple with the aforementioned health issues, making it crucial to ensure their medication is administered correctly and consistently.However, even educated seniors often face difficulties in managing their medications due to limited knowledge and experience in this complex task.Consequently, the appointment of nurses or attenders to oversee their medication intake becomes a costly necessity.
To address these concerns, an automatic pill dispenser presents a compelling solution.This cutting-edge technology offers a range of benefits for the elderly and their caregivers alike.By automating the medication management process, it not only enhances the seniors' independence but also reduces the burden on healthcare providers, allowing them to allocate resources more efficiently.Moreover, the implementation of such technology significantly improves medication adherence, ensuring that seniors receive the appropriate treatment at the right time, leading to better health outcomes and a higher quality of life.
This research paper discusses on the numerous advantages of utilizing medication dispensing technology, exploring how it can revolutionize the management of medications for the elderly population.From its user-friendly interface and customizable features to its potential cost savings and enhanced safety measures, this technology has the potential to transform the lives of seniors and alleviate the strain on the healthcare system 979-8-3503-2518-8/23/ $31.00 © 2023 IEEE 1 Based on the survey feedback which was given in Fig. 1 shows that the user prefers the UI to be simple.Multiple actions on single screen should be avoided.The preferred font is Arial and font size should be greater than 19px.Pair icons and symbols with text for easy understanding

II. RELATED WORK
Reference [1] proposes an automated system to improve medication adherence in patients.It uses various components such as an LCD display, microcontroller, real-time clock module, alarm system, biometric fingerprint scanner, and the Blynk software tool.The system reminds patients to take their medications at the prescribed times.However, a drawback is the manual sorting of medications, which can be timeconsuming and error-prone.An alternative solution is to incorporate a pillbox with manual alarm settings to simplify the process and reduce errors.The biometric fingerprint scanner enhances security, and the integration of IoT technology allows seamless communication with patients' smartphones.Overall, the system offers a promising way to improve medication adherence by addressing sorting issues and providing userfriendly reminders.
Reference [2] introduces an innovative automated medicinal pill dispenser that leverages the integration of cellular and Wi-Fi IoT technologies.A standout feature of this dispenser is its built-in camera, enabling accurate pill identification and precise dosage dispensing.To further support medication adherence, the dispenser is equipped with the capability to send reminders to patients via SMS or email.Additionally, the dispenser can be remotely monitored and controlled through its connectivity to the internet.This feature allows caregivers to track patients' medication usage and provide necessary support when required.The effectiveness and usability of the dispenser were evaluated through a user study, which yielded promising results.The study indicated that the dispenser was not only user-friendly but also significantly improved medication adherence among patients.Both patients and caregivers expressed positive feedback regarding the dispenser's functionality and convenience.With its ability to enhance medication adherence and improve patient outcomes [3], the automated medicinalpill dispenser with cellular and Wi-Fi IoT integration holds great potential for individuals managing chronic diseases.
Reference [4] presents an IoT-enabled smart medicine dispenser that uses a camera for scanning prescriptions.Preprocessing techniques like MSER and OCR are employed to extract information.The dispenser notifies patients using a buzzer and displays medication details on an LCD screen.Fin-gerprint verification ensures secure access.Measures should be taken to prevent accidental dispensing [5].The proposed hardware model may be expensive, but cost-effective alternatives should be explored.Overall, the system improves medication management with enhanced information extraction and secure authentication.
Reference [6] presents an automated pill dispenser application that utilizes IoT to improve medication adherence for patients with chronic diseases.The dispenser is connected to the internet and can be remotely controlled and monitored.It incorporates features such as pill identification, correct dosage dispensing, and reminders sent via SMS or email.A user study demonstrated the dispenser's usability and effectiveness [7] in enhancing medication adherence, receiving positive feedback from patients and caregivers.The authors conclude that the IoT-based automated pill dispenser has promising potential to improve patient outcomes.Key features include pill identification, remote control, and monitoring, as well as the ability to detect pill intake.The dispenser offers benefits such as improved adherence, reduced medication errors, enhanced patient safety, and potential healthcare cost reduction.
Reference [8] presents an IoT-based automatic medicine dispenser designed to enhance medication adherence for patients with chronic diseases.It enables remote control and sends reminders via SMS or email.The dispenser incorporates a camera for pill identification and dispensing the correct dosage, along with a sensor to detect pill intake.Results from a user study showed positive outcomes, with improved medication adherence and positive feedback from patients and caregivers.The authors conclude that the automatic medicine dispenser shows promise in improving patient outcomes.Key features include pill identification, remote control, dosage accuracy, reminder functionality, and pill intake detection.Benefits include enhanced adherence, reduced medication errors, improved patient safety, and potential cost savings.However, challenges include cost, connectivity requirements, and maintenance.Patients should carefully consider the advantages and challenges when deciding to use an automated pill dispenser.
Reference [9] presents a comprehensive design and implementation of a custom prototyping embedded system, leveraging the Internet of Things (IoT) technology, for the automated dispensing of pills in precise doses at predetermined intervals.The developed system is intended for use in homes and hospitals, catering to individuals of all age groups, including children, adults, the elderly, and individuals with visual impairments.A key focus of the system is to provide a userfriendly experience [10] through a smartphone application, eliminating the need for any monthly subscription fees.The application enables users to monitor and control the pill dispensing system, configure the distribution range of pills, and set the desired number of pills per interval.Additionally, the system incorporates alerts to notify users when pills have not been removed from the dispensing tray.The cost and complexity of the model are the main drawbacks of this paper.Fingerprint sensor-A fingerprint sensor is a biometric device that is used to capture and verify the unique patterns on a person's fingerprint.It is used for authentication and identification due to the distinctiveness and uniqueness of fingerprints.The pill dispenser is designed with a moving mechanism and a stepper motor.The moving mechanism consists of compartments where the medicines are stored.The stepper motor is responsible for pushing the necessary medicines out of the designated slot.The app sends reminders to the user at scheduled medication times.The model incorporates a fingerprint sensor which ensures that only the authorized user can access the medication.When the alarm goes off, the user is prompted to verify their identity by placing their finger on the fingerprint sensor.This verification process adds an extra layer of security to prevent unauthorized access.Once this is

III. PROPOSED METHOD
The medicine details and user details are processed and given as API responses to the android app through a node and express js built server.Node packages such as express and firebase-admin are used to handle API calls and to retrieve data from firebase.A json file is added in the node js project to connect firebase and the server.The json contains information about the firebase database like client email, auth uri, token uri, project id etc.The android app uses the api provided by the nodejs server to fetch details of the user.The results were given from Fig. 8 to Fig. 12.
successfully verified, the system is activated, after which the model decides which pill to dispense with the help of code in ESP32 and data in firebase.Finally the moving mechanism and stepper motor work together to push the necessary medicines into the outlet.

RESULTS
The model is designed in a way so that it can easily push necessary medicines using its moving mechanism and stepper motor.Each time the user is alerted with an alarm from the app which then activates the system after verifying using fingerprint sensor.The results of the survey involving a few participants demonstrates positive outcomes, highlighting the benefits of integrating IoT with various domains.The majority of the respondents reported improved convenience, and overall satisfaction with the IoT model.Additionally, many of them had valuable insights into user preferences, challenges, and suggestions for further enhancements.

CONCLUSION
Our proposed system aims to address the challenges faced by patients, particularly the elderly, who struggle to effectively manage their medication.By leveraging IoT technology, our system ensures that patients do not unintentionally take the wrong medication, improving medication safety.The app's user interface provides clarity, user-friendliness, and intuitive usability, even for elderly patients.
The design (Fig 7) is less accurate as more pills are getting dispensed and the size of the model is too big for dispensing two types of pills.To overcome this problem a secondary prototype is designed (Fig 12) to dispense more types of pills with the help of shutters at the exit, however more than the prescribed pills can be dispensed and the mechanical component is complex

Fig. 6 .
Fig. 6. Circuit of the IoT model 2) Software: Android studio is required to build the android app.Data gets stored in the firebase which is a cloud database.

Fig 2
Fig 2 gives the flow diagram.Hardware components used were given from Fig. 3 to Fig. 7. 1) Hardware: ESP32-The ESP32 is a microcontroller development board that is used for Internet of Things (IoT) applications.It has a Dual-core processor which allows for efficient multitasking and performance optimization.The ESP32 includes built-in Wi-Fi and Bluetooth capabilities, making it easy to connect to wireless networks and communicate with other devices is given in Fig.3.